Skip to content

Commit 77a93a5

Browse files
authored
[lake/paimon] Add exception in throwable in lake writer & committer (#1254)
1 parent 34ef90c commit 77a93a5

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

fluss-lake/fluss-lake-paimon/src/main/java/com/alibaba/fluss/lake/paimon/tiering/PaimonLakeCommitter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,15 @@ public void close() throws Exception {
183183
paimonCatalog.close();
184184
}
185185
} catch (Exception e) {
186-
throw new IOException("Fail to close PaimonLakeCommitter.", e);
186+
throw new IOException("Failed to close PaimonLakeCommitter.", e);
187187
}
188188
}
189189

190190
private FileStoreTable getTable(TablePath tablePath) throws IOException {
191191
try {
192192
return (FileStoreTable) paimonCatalog.getTable(toPaimon(tablePath));
193193
} catch (Exception e) {
194-
throw new IOException("Fail to get table " + tablePath + " in Paimon.");
194+
throw new IOException("Failed to get table " + tablePath + " in Paimon.", e);
195195
}
196196
}
197197

fluss-lake/fluss-lake-paimon/src/main/java/com/alibaba/fluss/lake/paimon/tiering/PaimonLakeWriter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void write(LogRecord record) throws IOException {
6666
try {
6767
recordWriter.write(record);
6868
} catch (Exception e) {
69-
throw new IOException("Fail to write Fluss record to Paimon.", e);
69+
throw new IOException("Failed to write Fluss record to Paimon.", e);
7070
}
7171
}
7272

@@ -76,7 +76,7 @@ public PaimonWriteResult complete() throws IOException {
7676
try {
7777
commitMessage = recordWriter.complete();
7878
} catch (Exception e) {
79-
throw new IOException("Fail to complete Paimon write.", e);
79+
throw new IOException("Failed to complete Paimon write.", e);
8080
}
8181
return new PaimonWriteResult(commitMessage);
8282
}
@@ -91,15 +91,15 @@ public void close() throws IOException {
9191
paimonCatalog.close();
9292
}
9393
} catch (Exception e) {
94-
throw new IOException("Fail to close PaimonLakeWriter.", e);
94+
throw new IOException("Failed to close PaimonLakeWriter.", e);
9595
}
9696
}
9797

9898
private FileStoreTable getTable(TablePath tablePath) throws IOException {
9999
try {
100100
return (FileStoreTable) paimonCatalog.getTable(toPaimon(tablePath));
101101
} catch (Exception e) {
102-
throw new IOException("Fail to get table " + tablePath + " in Paimon.");
102+
throw new IOException("Failed to get table " + tablePath + " in Paimon.", e);
103103
}
104104
}
105105
}

fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/MetadataManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ public TableInfo getTable(TablePath tablePath) throws TableNotExistException {
305305
try {
306306
optionalTable = zookeeperClient.getTable(tablePath);
307307
} catch (Exception e) {
308-
throw new FlussRuntimeException(String.format("Fail to get table '%s'.", tablePath), e);
308+
throw new FlussRuntimeException(
309+
String.format("Failed to get table '%s'.", tablePath), e);
309310
}
310311
if (!optionalTable.isPresent()) {
311312
throw new TableNotExistException("Table '" + tablePath + "' does not exist.");

0 commit comments

Comments
 (0)