<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: [Apahe Nifi] Module UnpackContent in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/317928#M227358</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/87506"&gt;@Leopol&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Welcome to NiFi!&lt;BR /&gt;&lt;BR /&gt;The ListFile [1] processor is only designed to create a 0 byte NiFi FlowFile (no content is fetched). This created NiFi FlowFile simply has a a bunch of Attributes created on the FlowFile that can be used later to actually retrieve the content via the FetchFile [2] processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The combination of these two processors allow NiFi to spread the heavy work across multiple nodes in a cluster when the source of the data may not be cluster friendly (for example a remote disk mounted to all nodes in a NiFi cluster).&amp;nbsp; The ListFile processor would be configured to execute on "Primary Node" only and its success relationship would be routed via a connection to the FetchFile.&amp;nbsp; That connection would be configured to load balance the 0 byte FlowFiles produced by ListFile.&amp;nbsp; Then the FetchSFTP processors executing on all nodes would get the now distributed files and fetch the content.&amp;nbsp; There are other similar list/fetch combinations.&lt;BR /&gt;&lt;BR /&gt;Since you have left the FetchFile processor out of yoru dataflow, you are not passing any content to the UnpackContent processor thus resulting in the exception you are seeing.&amp;nbsp; In that exception you will see details on the FlowFile trying to be unpacked:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;StandardFlowFileRecord[uuid=cfe7807c-d6ad-4127-b779-75b2f57c0ba6,claim=,offset=0,name=data.zip,size=0]&lt;/LI-CODE&gt;&lt;P&gt;You'll notice the "size=0" which menas it is 0 bytes which is expected since you have not fetched the content for this file yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.ListFile/index.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.ListFile/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2]&amp;nbsp;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.FetchFile/index.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.FetchFile/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you found this helped with your query, please take a moment to login and click "Accept" on this solution.&lt;BR /&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jun 2021 14:27:07 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2021-06-08T14:27:07Z</dc:date>
    <item>
      <title>[Apahe Nifi] Module UnpackContent</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/314368#M226000</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying Apache Nifi for testing purpose. I create a flow that need to unzip a file that contains an .xml file. I chain those processors: ListFIle =&amp;gt; IdentifyMimeType =&amp;gt; UnpackContent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All files I have test are failled. And I have a java error on my logs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;2021-04-09 17:56:40,839 ERROR [Timer-Driven Process Thread-7] o.a.n.processors.standard.UnpackContent UnpackContent[id=b746ede2-0178-1000-dd20-22c2c827cbb7] Unable to unpack StandardFlowFileRecord[uuid=cfe7807c-d6ad-4127-b779-75b2f57c0ba6,claim=,offset=0,name=data.zip,size=0] due to org.apache.nifi.processor.exception.ProcessException: IOException thrown from UnpackContent[id=b746ede2-0178-1000-dd20-22c2c827cbb7]: net.lingala.zip4j.exception.ZipException: Could not fill buffer; routing to failure: org.apache.nifi.processor.exception.ProcessException: IOException thrown from UnpackContent[id=b746ede2-0178-1000-dd20-22c2c827cbb7]: &lt;STRONG&gt;net.lingala.zip4j.exception.ZipException: Could not fill buffer&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;org.apache.nifi.processor.exception.ProcessException: IOException thrown from UnpackContent[id=b746ede2-0178-1000-dd20-22c2c827cbb7]: &lt;STRONG&gt;net.lingala.zip4j.exception.ZipException: Could not fill buffer&lt;/STRONG&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2388)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2333)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:409)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:292)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1173)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:214)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at java.base/java.lang.Thread.run(Thread.java:834)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Caused by: net.lingala.zip4j.exception.ZipException: Could not fill buffer&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at net.lingala.zip4j.util.RawIO.readFully(RawIO.java:155)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at net.lingala.zip4j.util.RawIO.readIntLittleEndian(RawIO.java:85)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at net.lingala.zip4j.headers.HeaderReader.readLocalFileHeader(HeaderReader.java:529)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at net.lingala.zip4j.io.inputstream.ZipInputStream.getNextEntry(ZipInputStream.java:85)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at net.lingala.zip4j.io.inputstream.ZipInputStream.getNextEntry(ZipInputStream.java:77)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:415)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2365)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;... 14 common frames omitted&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Maybe I do something wrong... Can you help me?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 16:15:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/314368#M226000</guid>
      <dc:creator>Leopol</dc:creator>
      <dc:date>2021-04-09T16:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: [Apahe Nifi] Module UnpackContent</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/317928#M227358</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/87506"&gt;@Leopol&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Welcome to NiFi!&lt;BR /&gt;&lt;BR /&gt;The ListFile [1] processor is only designed to create a 0 byte NiFi FlowFile (no content is fetched). This created NiFi FlowFile simply has a a bunch of Attributes created on the FlowFile that can be used later to actually retrieve the content via the FetchFile [2] processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The combination of these two processors allow NiFi to spread the heavy work across multiple nodes in a cluster when the source of the data may not be cluster friendly (for example a remote disk mounted to all nodes in a NiFi cluster).&amp;nbsp; The ListFile processor would be configured to execute on "Primary Node" only and its success relationship would be routed via a connection to the FetchFile.&amp;nbsp; That connection would be configured to load balance the 0 byte FlowFiles produced by ListFile.&amp;nbsp; Then the FetchSFTP processors executing on all nodes would get the now distributed files and fetch the content.&amp;nbsp; There are other similar list/fetch combinations.&lt;BR /&gt;&lt;BR /&gt;Since you have left the FetchFile processor out of yoru dataflow, you are not passing any content to the UnpackContent processor thus resulting in the exception you are seeing.&amp;nbsp; In that exception you will see details on the FlowFile trying to be unpacked:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;StandardFlowFileRecord[uuid=cfe7807c-d6ad-4127-b779-75b2f57c0ba6,claim=,offset=0,name=data.zip,size=0]&lt;/LI-CODE&gt;&lt;P&gt;You'll notice the "size=0" which menas it is 0 bytes which is expected since you have not fetched the content for this file yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[1]&amp;nbsp;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.ListFile/index.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.ListFile/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;[2]&amp;nbsp;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.FetchFile/index.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.FetchFile/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you found this helped with your query, please take a moment to login and click "Accept" on this solution.&lt;BR /&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 14:27:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/317928#M227358</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2021-06-08T14:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: [Apahe Nifi] Module UnpackContent</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/318383#M227459</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/87506"&gt;@Leopol&lt;/a&gt;,&amp;nbsp;did&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;'s response&amp;nbsp;&lt;SPAN&gt;resolve your issue? If so, can you please mark it as a solution? It will make it easier for others to find the answer in the future.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 06:00:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/318383#M227459</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2021-06-14T06:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: [Apahe Nifi] Module UnpackContent</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/318577#M227500</link>
      <description>&lt;P&gt;Hi Leopol,&lt;/P&gt;&lt;P&gt;Hope I understand your needs.&lt;/P&gt;&lt;P&gt;You may try using compressContent processor instead of UnpackContent, select uncompress mode and choose the compression format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 06:52:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apahe-Nifi-Module-UnpackContent/m-p/318577#M227500</guid>
      <dc:creator>mescal</dc:creator>
      <dc:date>2021-06-15T06:52:38Z</dc:date>
    </item>
  </channel>
</rss>

