diff --git a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java index 6266fd15c6b84..724cabdc73964 100644 --- a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java +++ b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java @@ -88,7 +88,7 @@ public String getPartitionPath(GenericRecord record) { try { partitionPath.append(new TimestampBasedAvroKeyGenerator(config, partitionPathField).getPartitionPath(record)); } catch (IOException e) { - throw new HoodieKeyGeneratorException("Unable to initialise TimestampBasedKeyGenerator class"); + throw new HoodieKeyGeneratorException("Unable to initialise TimestampBasedKeyGenerator class", e); } break; default: diff --git a/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/CustomKeyGenerator.java b/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/CustomKeyGenerator.java index 6727b79d78477..77896d2e88a06 100644 --- a/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/CustomKeyGenerator.java +++ b/hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/CustomKeyGenerator.java @@ -113,7 +113,7 @@ private String getPartitionPath(Option record, Option row) { partitionPath.append(new TimestampBasedKeyGenerator(config, partitionPathField).getPartitionPath(row.get())); } } catch (IOException ioe) { - throw new HoodieKeyGeneratorException("Unable to initialise TimestampBasedKeyGenerator class"); + throw new HoodieKeyGeneratorException("Unable to initialise TimestampBasedKeyGenerator class", ioe); } break; default: