[HUDI-1200] fixed NPE in CustomKeyGenerator (#2093)
- config field is no longer transient in key generator - verified that the key generator object is shipped from the driver to executors, just the one time and reused for each record
This commit is contained in:
@@ -118,7 +118,6 @@ public class CustomKeyGenerator extends BuiltinKeyGenerator {
|
||||
partitionPath.append(DEFAULT_PARTITION_PATH_SEPARATOR);
|
||||
}
|
||||
partitionPath.deleteCharAt(partitionPath.length() - 1);
|
||||
|
||||
return partitionPath.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ public abstract class KeyGenerator implements Serializable, SparkKeyGeneratorInt
|
||||
private static final String STRUCT_NAME = "hoodieRowTopLevelField";
|
||||
private static final String NAMESPACE = "hoodieRow";
|
||||
|
||||
protected transient TypedProperties config;
|
||||
protected TypedProperties config;
|
||||
private transient Function1<Object, Object> converterFn = null;
|
||||
|
||||
protected KeyGenerator(TypedProperties config) {
|
||||
|
||||
Reference in New Issue
Block a user