Skip to content

Commit 3128a9e

Browse files
liufangqiliufangqi.chenfeng
authored andcommitted
[HUDI-5061] bulk insert operation don't throw other exception except IOE Exception (apache#7001)
Co-authored-by: liufangqi.chenfeng <[email protected]>
1 parent d9f4bee commit 3128a9e

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bucket/BucketBulkInsertWriterHelper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ public void write(RowData tuple) throws IOException {
6969
}
7070
handle.write(recordKey, partitionPath, record);
7171
} catch (Throwable throwable) {
72-
LOG.error("Global error thrown while trying to write records in HoodieRowDataCreateHandle", throwable);
73-
throw throwable;
72+
IOException ioException = new IOException("Exception happened when bulk insert.", throwable);
73+
LOG.error("Global error thrown while trying to write records in HoodieRowDataCreateHandle", ioException);
74+
throw ioException;
7475
}
7576
}
7677

hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bulk/BulkInsertWriterHelper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ public void write(RowData record) throws IOException {
113113
}
114114
handle.write(recordKey, partitionPath, record);
115115
} catch (Throwable t) {
116-
LOG.error("Global error thrown while trying to write records in HoodieRowCreateHandle ", t);
117-
throw t;
116+
IOException ioException = new IOException("Exception happened when bulk insert.", t);
117+
LOG.error("Global error thrown while trying to write records in HoodieRowCreateHandle ", ioException);
118+
throw new IOException(ioException);
118119
}
119120
}
120121

0 commit comments

Comments
 (0)