linliu-code commented on code in PR #13656:
URL: https://github.com/apache/hudi/pull/13656#discussion_r2271805697
##########
hudi-common/src/main/java/org/apache/hudi/keygen/constant/KeyGeneratorType.java:
##########
@@ -136,7 +147,11 @@ public static String
getKeyGeneratorClassName(TypedProperties props) {
return ConfigUtils.getStringWithAltKeys(props, KEY_GENERATOR_CLASS_NAME);
}
if (ConfigUtils.containsConfigProperty(props, KEY_GENERATOR_TYPE)) {
- return KeyGeneratorType.valueOf(ConfigUtils.getStringWithAltKeys(props,
KEY_GENERATOR_TYPE)).getClassName();
+ KeyGeneratorType type =
KeyGeneratorType.valueOf(ConfigUtils.getStringWithAltKeys(props,
KEY_GENERATOR_TYPE));
+ if (USER_PROVIDED == type) {
+ return null;
Review Comment:
Done
##########
hudi-common/src/main/java/org/apache/hudi/keygen/constant/KeyGeneratorType.java:
##########
@@ -146,7 +161,11 @@ public static String getKeyGeneratorClassName(Map<String,
String> config) {
if (config.containsKey(KEY_GENERATOR_CLASS_NAME.key())) {
return config.get(KEY_GENERATOR_CLASS_NAME.key());
} else if (config.containsKey(KEY_GENERATOR_TYPE.key())) {
- return
KeyGeneratorType.valueOf(config.get(KEY_GENERATOR_TYPE.key())).getClassName();
+ KeyGeneratorType type =
KeyGeneratorType.valueOf(config.get(KEY_GENERATOR_TYPE.key()));
+ if (type == USER_PROVIDED) {
+ return null;
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]