<?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: How to create only one file by MergeContent processor on the cluster in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177140#M72876</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/866/amillion8.html" nodeid="866" target="_blank"&gt;@Alex M&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You need to change &lt;STRONG&gt;Minimum Group Size&lt;/STRONG&gt; as per your requirement like &lt;STRONG&gt;(1 B,1 KB,1 MB,1 GB..)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you can see below configs i changed &lt;STRONG&gt;Minimum Group Size as 10 MB&lt;/STRONG&gt; //The minimum size of for the bundle.&lt;/P&gt;&lt;P&gt;let's consider &lt;STRONG&gt;your each flow files size is 1 MB&lt;/STRONG&gt; each so the processor &lt;STRONG&gt;will wait until the group size reaches to 10 MB&lt;/STRONG&gt; and then bundles &lt;STRONG&gt;all the flowfiles as 1&lt;/STRONG&gt;(i.e 10 flowfiles merged as 1 flowfile after merge content processor).&lt;/P&gt;&lt;P&gt;if the flowfiles &lt;STRONG&gt;won't meet the minimum group size requirement&lt;/STRONG&gt; then the &lt;STRONG&gt;flowfiles are going to wait before merge content processor until it reaches the minimum group size.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="46438-mergecontent.png" style="width: 1963px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19601iB2E1EB2C89BDDF2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="46438-mergecontent.png" alt="46438-mergecontent.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How to force merge flowfiles?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;By specifying &lt;STRONG&gt;Max Bin Age property&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;No matter how many Flowfiles have been assigned to a given bin, that bin will be merged once the bin has existed for this amount of time.&lt;/P&gt;&lt;P&gt;let's consider if i set &lt;STRONG&gt;Max Bin Age&lt;/STRONG&gt; property to 10 min and i had only 5 flowfiles having 5 MB over all queue size before merge content processor and our minimum group size property is 10 MB.&lt;/P&gt;&lt;P&gt;The queue &lt;STRONG&gt;will never meet the minimum group size requirement &lt;/STRONG&gt;that means &lt;STRONG&gt;flowfiles will be queued&lt;/STRONG&gt; for ever there to over come this situation we have added &lt;STRONG&gt;10 min as max bin age&lt;/STRONG&gt; so once the &lt;STRONG&gt;flowfile been in the queue for 10 min&lt;/STRONG&gt; then the processor going to merge the&lt;STRONG&gt; flowfiles although they haven't meet the minimum group size requirement also.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;About &lt;STRONG&gt;all the other properties in Merge Content processor&lt;/STRONG&gt; please refer to the links that i mentioned above answer.&lt;/P&gt;&lt;P&gt;Let me know if you are having any questions..!!&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 09:46:31 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2019-08-18T09:46:31Z</dc:date>
    <item>
      <title>How to create only one file by MergeContent processor on the cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177136#M72872</link>
      <description>&lt;P&gt;I need to extract data from a relational database and load it into S3 bucket. I have a 5 node cluster, and use "GenerateTableFetch" (Primary node) --&amp;gt; "ExecuteSQL" (All nodes) combination to read the data in parallel. I also need to merge extracted data into a single file before loading it into S3, but my "MergeContent" processor produces multiple files in S3. Is there a way to get this done? The full flow looks like this:&lt;/P&gt;&lt;P&gt;"GenerateTableFetch" --&amp;gt; "ExecuteSQL" --&amp;gt; "MergeConent" --&amp;gt; "ConvertAvroToJSON" --&amp;gt; "UpdateAttribute" --&amp;gt; "CompressContent" --&amp;gt; "PutS3Object"&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 01:57:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177136#M72872</guid>
      <dc:creator>amillion8</dc:creator>
      <dc:date>2017-12-27T01:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create only one file by MergeContent processor on the cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177137#M72873</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/866/amillion8.html" nodeid="866"&gt;@Alex M&lt;/A&gt;&lt;P&gt;Can you please share more details of your configurations of MergeContent Processor.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Refer to below community links How to configure Merge Content processor.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/148294/nifi-problems-with-emply-queue.html?childToView=148310#comment-148310" target="_blank"&gt;https://community.hortonworks.com/questions/148294/nifi-problems-with-emply-queue.html?childToView=148310#comment-148310&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/149047/nifi-how-to-handle-with-mergecontent-processor.html?childToView=148309#answer-148309" target="_blank"&gt;https://community.hortonworks.com/questions/149047/nifi-how-to-handle-with-mergecontent-processor.html?childToView=148309#answer-148309&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 09:01:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177137#M72873</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2017-12-27T09:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to create only one file by MergeContent processor on the cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177138#M72874</link>
      <description>&lt;P&gt;Attached is the template.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 09:38:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177138#M72874</guid>
      <dc:creator>amillion8</dc:creator>
      <dc:date>2017-12-27T09:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to create only one file by MergeContent processor on the cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177139#M72875</link>
      <description>&lt;P&gt;1.   Change the amount and delay of the merge.&lt;/P&gt;&lt;P&gt;2.  You can add an Enforce Order processor (only one primary node)&lt;/P&gt;&lt;P&gt;3.  Make all connections FirstInFirstOutPrioritizer&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 09:47:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177139#M72875</guid>
      <dc:creator>TimothySpann</dc:creator>
      <dc:date>2017-12-27T09:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create only one file by MergeContent processor on the cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177140#M72876</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/866/amillion8.html" nodeid="866" target="_blank"&gt;@Alex M&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You need to change &lt;STRONG&gt;Minimum Group Size&lt;/STRONG&gt; as per your requirement like &lt;STRONG&gt;(1 B,1 KB,1 MB,1 GB..)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you can see below configs i changed &lt;STRONG&gt;Minimum Group Size as 10 MB&lt;/STRONG&gt; //The minimum size of for the bundle.&lt;/P&gt;&lt;P&gt;let's consider &lt;STRONG&gt;your each flow files size is 1 MB&lt;/STRONG&gt; each so the processor &lt;STRONG&gt;will wait until the group size reaches to 10 MB&lt;/STRONG&gt; and then bundles &lt;STRONG&gt;all the flowfiles as 1&lt;/STRONG&gt;(i.e 10 flowfiles merged as 1 flowfile after merge content processor).&lt;/P&gt;&lt;P&gt;if the flowfiles &lt;STRONG&gt;won't meet the minimum group size requirement&lt;/STRONG&gt; then the &lt;STRONG&gt;flowfiles are going to wait before merge content processor until it reaches the minimum group size.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="46438-mergecontent.png" style="width: 1963px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19601iB2E1EB2C89BDDF2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="46438-mergecontent.png" alt="46438-mergecontent.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How to force merge flowfiles?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;By specifying &lt;STRONG&gt;Max Bin Age property&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;No matter how many Flowfiles have been assigned to a given bin, that bin will be merged once the bin has existed for this amount of time.&lt;/P&gt;&lt;P&gt;let's consider if i set &lt;STRONG&gt;Max Bin Age&lt;/STRONG&gt; property to 10 min and i had only 5 flowfiles having 5 MB over all queue size before merge content processor and our minimum group size property is 10 MB.&lt;/P&gt;&lt;P&gt;The queue &lt;STRONG&gt;will never meet the minimum group size requirement &lt;/STRONG&gt;that means &lt;STRONG&gt;flowfiles will be queued&lt;/STRONG&gt; for ever there to over come this situation we have added &lt;STRONG&gt;10 min as max bin age&lt;/STRONG&gt; so once the &lt;STRONG&gt;flowfile been in the queue for 10 min&lt;/STRONG&gt; then the processor going to merge the&lt;STRONG&gt; flowfiles although they haven't meet the minimum group size requirement also.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;About &lt;STRONG&gt;all the other properties in Merge Content processor&lt;/STRONG&gt; please refer to the links that i mentioned above answer.&lt;/P&gt;&lt;P&gt;Let me know if you are having any questions..!!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 09:46:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177140#M72876</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T09:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create only one file by MergeContent processor on the cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177141#M72877</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you - after some tweaking and tuning of the parameters you mentioned I was able to achieve desired results.&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 22:38:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/177141#M72877</guid>
      <dc:creator>amillion8</dc:creator>
      <dc:date>2017-12-27T22:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create only one file by MergeContent processor on the cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/398498#M72878</link>
      <description>&lt;P&gt;I was having similar issue, where I had around 7000+ flow files and I needed to merge them into one. Provided that, I didn't know what will be the exact number of flow files, I couldn't specify that number in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Minimum Number of Entries&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;attribute of mergeContent processor to make it only 1 flow file after merge.&lt;/P&gt;&lt;P&gt;After trying a lot of things, including trying to count the flow files or induce a delay before sending them off to merge, I finally found the solution on the mergeContent documentation below :&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.6.0/org.apache.nifi.processors.standard.MergeContent/index.html#:%7E:text=The%20%27Defragment%27%20algorithm%20combines%20fragments%20that%20are%20associated%20by%20attributes%20back%20into%20a%20single%20cohesive%20FlowFile.%20The%20%27Bin%2DPacking%20Algorithm%27%20generates%20a%20FlowFile%20populated%20by%20arbitrarily%20chosen%20FlowFiles" target="_blank" rel="nofollow noopener noreferrer"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.6.0/org.apache.nifi.processors.standard.MergeContent/index.html#:~:text=The%20%27Defragment%27%20algorithm%20combines%20fragments%20that%20are%20associated%20by%20attributes%20back%20into%20a%20single%20cohesive%20FlowFile.%20The%20%27Bin%2DPacking%20Algorithm%27%20generates%20a%20FlowFile%20populated%20by%20arbitrarily%20chosen%20FlowFiles&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And there you go ! setting '&lt;STRONG&gt;Merge Strategy&lt;/STRONG&gt;' property to '&lt;STRONG&gt;Defragment&lt;/STRONG&gt;' and '&lt;STRONG&gt;Attribute Strategy&lt;/STRONG&gt;' property to '&lt;STRONG&gt;Keep Only Common Attributes&lt;/STRONG&gt;' fixes the problem for me.&lt;/P&gt;&lt;P&gt;In all my flow files, they have common attributes and are now merged into a single flow file.&lt;/P&gt;&lt;P&gt;The original question is from 2017, but I hope it helps out somebody else looking for an answer.&lt;/P&gt;&lt;P&gt;You can check the original answer here&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/56356164/nifi-merging-all-of-necessary-flowfile-in-one-shot-with-mergecontent-processor/79257994#79257994" target="_blank" rel="noopener"&gt;https://stackoverflow.com/questions/56356164/nifi-merging-all-of-necessary-flowfile-in-one-shot-with-mergecontent-processor/79257994#79257994&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 13:34:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-create-only-one-file-by-MergeContent-processor-on-the/m-p/398498#M72878</guid>
      <dc:creator>SS_Jin</dc:creator>
      <dc:date>2024-12-06T13:34:31Z</dc:date>
    </item>
  </channel>
</rss>

