use of org.apache.hudi.utilities.sources.processor.JsonKafkaSourcePostProcessor in project hudi by apache.
the class JsonKafkaSource method postProcess.
private JavaRDD<String> postProcess(JavaRDD<String> jsonStringRDD) {
String postProcessorClassName = this.props.getString(KafkaOffsetGen.Config.JSON_KAFKA_PROCESSOR_CLASS_OPT.key(), null);
// no processor, do nothing
if (StringUtils.isNullOrEmpty(postProcessorClassName)) {
return jsonStringRDD;
}
JsonKafkaSourcePostProcessor processor;
try {
processor = UtilHelpers.createJsonKafkaSourcePostProcessor(postProcessorClassName, this.props);
} catch (IOException e) {
throw new HoodieSourcePostProcessException("Could not init " + postProcessorClassName, e);
}
return processor.process(jsonStringRDD);
}
Aggregations