Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I am trying to stream the contents of hdfs into hive using Puthive3streaming processor,but getting the error " Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException".Please help

I am trying to stream the contents of hdfs into hive using Puthive3streaming processor,but getting the error " Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException".Please help

New Contributor

I am trying to stream the contents of hdfs into hive using Puthive3streaming processor,but getting the error " Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException".Please help 

I am using  nifi 1.9.0, hdp 3.1.4

 

The full Nifi error log is as follows

 

o.a.n.processors.hive.PutHive3Streaming PutHive3Streaming[id=4cffb87b-016d-1000-ffff-ffffb2a1da7b] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException: StandardFlowFileRecord[uuid=331fed74-91b6-4bcd-9969-ed759b58527f,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1569321274564-294672, container=default, section=784], offset=0, length=33638488],offset=0,name=case_info.avro,size=33638488] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed: org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException: StandardFlowFileRecord[uuid=331fed74-91b6-4bcd-9969-ed759b58527f,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1569321274564-294672, container=default, section=784], offset=0, length=33638488],offset=0,name=case_info.avro,size=33638488] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed
org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException: StandardFlowFileRecord[uuid=331fed74-91b6-4bcd-9969-ed759b58527f,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1569321274564-294672, container=default, section=784], offset=0, length=33638488],offset=0,name=case_info.avro,size=33638488] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed
at org.apache.nifi.processors.hive.PutHive3Streaming.onTrigger(PutHive3Streaming.java:489)
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(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: StandardFlowFileRecord[uuid=331fed74-91b6-4bcd-9969-ed759b58527f,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1569321274564-294672, container=default, section=784], offset=0, length=33638488],offset=0,name=case_info.avro,size=33638488] 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.hive.PutHive3Streaming.onTrigger(PutHive3Streaming.java:434)
... 12 common frames omitted
2019-09-25 10:00:02,265 ERROR [Timer-Driven Process Thread-10] o.a.n.processors.hive.PutHive3Streaming PutHive3Streaming[id=4cffb87b-016d-1000-ffff-ffffb2a1da7b] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException: StandardFlowFileRecord[uuid=5988775d-6bca-4a14-b257-01eb50ec67e2,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1569321274726-294673, container=default, section=785], offset=0, length=33638488],offset=0,name=case_info,size=33638488] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed: org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException: StandardFlowFileRecord[uuid=5988775d-6bca-4a14-b257-01eb50ec67e2,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1569321274726-294673, container=default, section=785], offset=0, length=33638488],offset=0,name=case_info,size=33638488] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed
org.apache.nifi.processor.exception.ProcessException: java.lang.IllegalStateException: StandardFlowFileRecord[uuid=5988775d-6bca-4a14-b257-01eb50ec67e2,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1569321274726-294673, container=default, section=785], offset=0, length=33638488],offset=0,name=case_info,size=33638488] already in use for an active callback or an InputStream created by ProcessSession.read(FlowFile) has not been closed
at org.apache.nifi.processors.hive.PutHive3Streaming.onTrigger(PutHive3Streaming.java:489)

 

Below are the snapshots of pipeline and configs of puthivestreaming and convert csv to avro processors

 

image.pngimage.pngConfig for convert csv to avro processorimage.pngconfig for puthive3streaming processorimage.pngconfig for infer avro schema processor

 

Don't have an account?
Coming from Hortonworks? Activate your account here