yihua commented on code in PR #12864:
URL: https://github.com/apache/hudi/pull/12864#discussion_r1968561191
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/JsonKafkaSource.java:
##########
@@ -69,48 +85,62 @@ public JsonKafkaSource(TypedProperties properties,
JavaSparkContext sparkContext
public JsonKafkaSource(TypedProperties properties, JavaSparkContext
sparkContext, SparkSession sparkSession, HoodieIngestionMetrics metrics,
StreamContext streamContext) {
super(properties, sparkContext, sparkSession, SourceType.JSON, metrics,
new
DefaultStreamContext(UtilHelpers.getSchemaProviderForKafkaSource(streamContext.getSchemaProvider(),
properties, sparkContext), streamContext.getSourceProfileSupplier()));
- properties.put("key.deserializer", StringDeserializer.class.getName());
- properties.put("value.deserializer", StringDeserializer.class.getName());
+ props.put(NATIVE_KAFKA_KEY_DESERIALIZER_PROP,
StringDeserializer.class.getName());
+ props.put(NATIVE_KAFKA_VALUE_DESERIALIZER_PROP,
props.getString(Config.KAFKA_JSON_VALUE_DESERIALIZER_CLASS.key(),
+ Config.KAFKA_JSON_VALUE_DESERIALIZER_CLASS.defaultValue()));
Review Comment:
Use `ConfigUtils.getStringWithAltKeys(props,
KAFKA_JSON_VALUE_DESERIALIZER_CLASS, true)`
--
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]