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 0c821fe  [MINOR] Pass root exception to HoodieKeyGeneratorException 
for more information (#2354)
0c821fe is described below

commit 0c821fecc2140683de24d9b350c8142b4b8b8c47
Author: jshmchenxi <[email protected]>
AuthorDate: Tue Dec 22 09:02:23 2020 +0800

    [MINOR] Pass root exception to HoodieKeyGeneratorException for more 
information (#2354)
    
    Co-authored-by: Xi Chen <[email protected]>
---
 .../src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java    | 2 +-
 .../src/main/java/org/apache/hudi/keygen/CustomKeyGenerator.java        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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 6266fd1..724cabd 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 class CustomAvroKeyGenerator extends BaseKeyGenerator {
           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 6727b79..77896d2 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 @@ public class CustomKeyGenerator extends BuiltinKeyGenerator 
{
               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:

Reply via email to