[ https://issues.apache.org/jira/browse/NIFI-12554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17801255#comment-17801255 ]
Daniel Stieglitz edited comment on NIFI-12554 at 12/29/23 8:10 PM: ------------------------------------------------------------------- [~exceptionfactory] I created this ticket based on the conversation with [~Chris S] on PR [7890|https://github.com/apache/nifi/pull/7890]. I so far tried following what you had advised me in PR [8805|https://github.com/apache/nifi/pull/8005] by creating a component interface with the common properties between JoltTransformJSON and JoltTransformRecord. I placed this in a module under nifi-commons called nifi-jolt-shared. What I would like to do next though is to create an AbstractJoltTransform processor similar to what Chris had done with AbstractPutElasticsearch but I am not sure where that should live as JoltTransformJSON is in {code:java} nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors {code} and JoltTransformRecord is in {code:java} nifi-nar-bundles/nifi-jolt-record-bundle/nifi-jolt-record-processors {code} Is this the right approach and if so where can I place the module where this abstract class could live so it would be extended by JoltTransformJSON and JoltTransformRecord? was (Author: JIRAUSER294662): [~exceptionfactory] I created this ticket based on the conversation with [~Chris S] on PR [7890|https://github.com/apache/nifi/pull/7890]. I so far tried following what you had advised me in PR [8805|https://github.com/apache/nifi/pull/8005] by creating a component interface with the common properties between JoltTransformJSON and JoltTransformRecord. I placed this in a module under nifi-commons called nifi-jolt-shared. What I would like to do next though is to create an AbstractJoltTransforom processor similar to what Chris had done with AbstractPutElasticsearch but I am not sure where that should live as JoltTransformJSON is in {code:java} nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors {code} and JoltTransformRecord is in {code:java} nifi-nar-bundles/nifi-jolt-record-bundle/nifi-jolt-record-processors {code} Is this the right approach and if so where can I place the module where this abstract class could live so it would be extended by JoltTransformJSON and JoltTransformRecord? > Refactor JoltTransformJSON and JoltTransformRecord processors in order to > reduce duplicate code > ----------------------------------------------------------------------------------------------- > > Key: NIFI-12554 > URL: https://issues.apache.org/jira/browse/NIFI-12554 > Project: Apache NiFi > Issue Type: Improvement > Reporter: Daniel Stieglitz > Assignee: Daniel Stieglitz > Priority: Major > > There is a lot of duplicate code between the JoltTransformJSON and > JoltTransformRecord processors. As a result each time there is a bug > discovered in the duplicate code there has to be a fix applied in both places > (e.g. NIFI-11959 and NIFI-12165). This ticket aims to pull up the common > code between JoltTransformJSON and JoltTransformRecord similar to what has > been done for PutElastisearchJSON and PutElastisearchRecord processors with > the creation of AbstractPutElasticsearch. -- This message was sent by Atlassian Jira (v8.20.10#820010)