[HUDI-353] Add hive style partitioning path
This commit is contained in:
committed by
Balaji Varadarajan
parent
63e330b17c
commit
e555aa516d
@@ -105,7 +105,10 @@ public class TimestampBasedKeyGenerator extends SimpleKeyGenerator {
|
||||
if (recordKey == null || recordKey.isEmpty()) {
|
||||
throw new HoodieKeyException("recordKey value: \"" + recordKey + "\" for field: \"" + recordKeyField + "\" cannot be null or empty.");
|
||||
}
|
||||
return new HoodieKey(recordKey, partitionPathFormat.format(timestamp));
|
||||
|
||||
String partitionPath = hiveStylePartitioning ? partitionPathField + "=" + partitionPathFormat.format(timestamp)
|
||||
: partitionPathFormat.format(timestamp);
|
||||
return new HoodieKey(recordKey, partitionPath);
|
||||
} catch (ParseException pe) {
|
||||
throw new HoodieDeltaStreamerException("Unable to parse input partition field :" + partitionVal, pe);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user