1
0

[MINOR] Pass root exception to HoodieKeyGeneratorException for more information (#2354)

Co-authored-by: Xi Chen <chenxi07@qiyi.com>
This commit is contained in:
jshmchenxi
2020-12-22 09:02:23 +08:00
committed by GitHub
parent e4e2fbc3bb
commit 0c821fecc2
2 changed files with 2 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ public class CustomAvroKeyGenerator extends BaseKeyGenerator {
try { try {
partitionPath.append(new TimestampBasedAvroKeyGenerator(config, partitionPathField).getPartitionPath(record)); partitionPath.append(new TimestampBasedAvroKeyGenerator(config, partitionPathField).getPartitionPath(record));
} catch (IOException e) { } catch (IOException e) {
throw new HoodieKeyGeneratorException("Unable to initialise TimestampBasedKeyGenerator class"); throw new HoodieKeyGeneratorException("Unable to initialise TimestampBasedKeyGenerator class", e);
} }
break; break;
default: default:

View File

@@ -113,7 +113,7 @@ public class CustomKeyGenerator extends BuiltinKeyGenerator {
partitionPath.append(new TimestampBasedKeyGenerator(config, partitionPathField).getPartitionPath(row.get())); partitionPath.append(new TimestampBasedKeyGenerator(config, partitionPathField).getPartitionPath(row.get()));
} }
} catch (IOException ioe) { } catch (IOException ioe) {
throw new HoodieKeyGeneratorException("Unable to initialise TimestampBasedKeyGenerator class"); throw new HoodieKeyGeneratorException("Unable to initialise TimestampBasedKeyGenerator class", ioe);
} }
break; break;
default: default: