1
0

[HUDI-4260] Change KEYGEN_CLASS_NAME without default value (#5877)

* Change KEYGEN_CLASS_NAME without default value

Co-authored-by: 854194341@qq.com <loukey_7821>
This commit is contained in:
luokey
2022-06-24 15:05:03 +08:00
committed by GitHub
parent 30ebdc708b
commit 59978ef4a9
3 changed files with 6 additions and 6 deletions

View File

@@ -363,7 +363,7 @@ public class FlinkOptions extends HoodieConfig {
public static final ConfigOption<String> KEYGEN_CLASS_NAME = ConfigOptions
.key(HoodieWriteConfig.KEYGENERATOR_CLASS_NAME.key())
.stringType()
.defaultValue("")
.noDefaultValue()
.withDescription("Key generator class, that implements will extract the key out of incoming record");
public static final ConfigOption<String> KEYGEN_TYPE = ConfigOptions

View File

@@ -116,7 +116,7 @@ public class RowDataKeyGen implements Serializable {
public static RowDataKeyGen instance(Configuration conf, RowType rowType) {
Option<TimestampBasedAvroKeyGenerator> keyGeneratorOpt = Option.empty();
if (conf.getString(FlinkOptions.KEYGEN_CLASS_NAME).equals(TimestampBasedAvroKeyGenerator.class.getName())) {
if (TimestampBasedAvroKeyGenerator.class.getName().equals(conf.getString(FlinkOptions.KEYGEN_CLASS_NAME))) {
try {
keyGeneratorOpt = Option.of(new TimestampBasedAvroKeyGenerator(StreamerUtil.flinkConf2TypedProperties(conf)));
} catch (IOException e) {