This is an automated email from the ASF dual-hosted git repository.
vinoyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 3d5e9fe [MINOR] refactor code in HoodieMergeHandle (#2272)
3d5e9fe is described below
commit 3d5e9fee7f42d45f737e170a1937bdf676df9c60
Author: leesf <[email protected]>
AuthorDate: Sat Nov 28 21:47:05 2020 +0800
[MINOR] refactor code in HoodieMergeHandle (#2272)
---
.../src/main/java/org/apache/hudi/io/HoodieMergeHandle.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git
a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
index be324a3..ad03023 100644
---
a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
+++
b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/io/HoodieMergeHandle.java
@@ -241,14 +241,11 @@ public class HoodieMergeHandle<T extends
HoodieRecordPayload, I, K, O> extends H
if (copyOldRecord) {
// this should work as it is, since this is an existing record
- String errMsg = "Failed to merge old record into new file for key " +
key + " from old file " + getOldFilePath()
- + " to new file " + newFilePath + " with writerSchema " +
writerSchemaWithMetafields.toString(true);
try {
fileWriter.writeAvro(key, oldRecord);
- } catch (ClassCastException e) {
- LOG.debug("Old record is " + oldRecord);
- throw new HoodieUpsertException(errMsg, e);
} catch (IOException | RuntimeException e) {
+ String errMsg = String.format("Failed to merge old record into new
file for key %s from old file %s to new file %s with writerSchema %s",
+ key, getOldFilePath(), newFilePath,
writerSchemaWithMetafields.toString(true));
LOG.debug("Old record is " + oldRecord);
throw new HoodieUpsertException(errMsg, e);
}