kafka-connect-transform-common
kafka-connect-transform-common copied to clipboard
fix: implement processMap function to MAP structured data
Hi @jcustenborder,
Maybe you saw If you are using HeaderToField as transforms and your data struct is Map, the plugin is throwing error like "MAP is unsupported ..." I implemented processMap function and I tried to use it and It works well. Maybe you want to merge it as contribution
@peacecwz Happy to merge this! Would you mind adding some unit tests?
@jcustenborder Actually no but I can add some unit tests for the function. I'll update the PR quickly
@jcustenborder I added test for processMap Is that okay for that?
@jcustenborder btw If this PR will be merged can you also make a release it? Because I'm using my private artifact. I couldn't run Jenkins pipeline. It uploaded the artifact manually to S3 and deploy it as well but I would like to deploy with confluent-kafka CLI as officially
@jcustenborder Hey can you check the PR?
@peacecwz
Could you fix same issue on the ChangeCase SMT..?
(If not.. I will try to implement processMap method on the ChangeCase, by referring to your commit.)
Caused by: java.lang.UnsupportedOperationException: MAP is not a supported type.
at com.github.jcustenborder.kafka.connect.transform.common.BaseTransformation.processMap(BaseTransformation.java:39)
at com.github.jcustenborder.kafka.connect.transform.common.BaseTransformation.process(BaseTransformation.java:120)
at com.github.jcustenborder.kafka.connect.transform.common.ChangeCase$Value.apply(ChangeCase.java:128)
at org.apache.kafka.connect.runtime.TransformationChain.lambda$apply$0(TransformationChain.java:50)
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndRetry(RetryWithToleranceOperator.java:180)
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:214)
... 15 more
@peacecwz see https://github.com/peacecwz/kafka-connect-transform-common/pull/1