Sorry there was a copy/paste mistake for the spec, in fact I tried with the following one:
[ { "operation": "shift", "spec": { "cgnat_public_ipv4": "cgnat_public_src_ipv4" } } ] Spec seems to be valid as the processor runs fine. From: Jean-Sebastien Vachon <jsvac...@brizodata.com> Reply to: "users@nifi.apache.org" <users@nifi.apache.org> Date: Thursday, 29 August 2019 at 14:02 To: "users@nifi.apache.org" <users@nifi.apache.org> Subject: Re: JoltTransformRecord Processor Issue Hi, it might not be your problem at all but you seem to have a funny double-quote in your Jolt transformation. ________________________________ From: josef.zahn...@swisscom.com Sent: Thursday, August 29, 2019 7:57 AM To: users@nifi.apache.org Subject: JoltTransformRecord Processor Issue I’m working for the first time with the NiFi Jolt Processors (JoltTransformRecord & JoltTransformJson) to transform my JSON file. I’ve experimented with a pretty simple spec. My input is an avro with just one record, hence I have to convert the flow for the non-record processor first. However with the JoltTransformRecord Processor I’m always getting an error message (mentioned far below) and the processor loops with the input flow as long as the outgoing queue isn’t full. The JoltTransformJSON processor just works fine with exactly the same settings and spec. The files in the success queue of the JoltTransformRecord queue are missing the outer brackets “[]”, … The Jolt Transformation DSL dropdown is for both processors set for “Chain”. [ { "operation": "shift", "spec": { "cgnat_public_ipv4": “cgnat_public_src_ipv4", } } ] [cid:image001.png@01D55E71.B5F2A0B0] Error Message from JoltTransformRecord 2019-08-29 13:38:24,055 ERROR [Timer-Driven Process Thread-2] o.a.n.p.jolt.record.JoltTransformRecord JoltTransformRecord[id=c56e1fb0-3437-143d-c75a-575bfa19cd34] Unable to transform StandardFlowFileRecord[uuid=a86e1e36-b38f-497e-b1b8-42b1fea9c830,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1567078679515-46394, container=default, section=314], offset=956319, length=526],offset=0,name=95465ca6-7997-4ed2-8e75-97bce1a0610e,size=526] due to java.lang.IllegalStateException: StandardFlowFileRecord[uuid=a86e1e36-b38f-497e-b1b8-42b1fea9c830,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1567078679515-46394, container=default, section=314], offset=956319, length=526],offset=0,name=95465ca6-7997-4ed2-8e75-97bce1a0610e,size=526] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed: java.lang.IllegalStateException: StandardFlowFileRecord[uuid=a86e1e36-b38f-497e-b1b8-42b1fea9c830,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1567078679515-46394, container=default, section=314], offset=956319, length=526],offset=0,name=95465ca6-7997-4ed2-8e75-97bce1a0610e,size=526] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed java.lang.IllegalStateException: StandardFlowFileRecord[uuid=a86e1e36-b38f-497e-b1b8-42b1fea9c830,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1567078679515-46394, container=default, section=314], offset=956319, length=526],offset=0,name=95465ca6-7997-4ed2-8e75-97bce1a0610e,size=526] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed at org.apache.nifi.controller.repository.StandardProcessSession.validateRecordState(StandardProcessSession.java:3126) at org.apache.nifi.controller.repository.StandardProcessSession.validateRecordState(StandardProcessSession.java:3121) at org.apache.nifi.controller.repository.StandardProcessSession.transfer(StandardProcessSession.java:1887) at org.apache.nifi.processors.jolt.record.JoltTransformRecord.onTrigger(JoltTransformRecord.java:371) at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1162) at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:209) at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117) at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.runAndReset(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) I can go with the non record processor as it works fine, but I’m curious what I’m doing wrong with the JoltTransformRecord as it would save one processor in total and seems more logic here. Any ideas why I’m getting the error? Cheers Josef
smime.p7s
Description: S/MIME Cryptographic Signature