<?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 can we see the output in single file if 3 files are processed in Hadoop? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-we-see-the-output-in-single-file-if-3-files-are/m-p/114111#M42797</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Command Line&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If these three files are in the same directory, run the following from the command line of a server in the cluster. It will merge the files into one file and store it locally&lt;/P&gt;&lt;PRE&gt;hdfs dfs -getmerge &amp;lt;hdfsDir&amp;gt; &amp;lt;localFile&amp;gt;&lt;/PRE&gt;&lt;P&gt;where &amp;lt;hdfsDir&amp;gt; is the directory holding the files on hdfs and &amp;lt;localFile&amp;gt; is the name of the merged file that will be stored locally.&lt;/P&gt;&lt;P&gt;If you are talking about a directory structure that looks like this in HDFS:&lt;/P&gt;&lt;PRE&gt;myFile.txt/_SUCCESS
myFile.txt/part-m-00000
myFile.txt/part-m-00001&lt;/PRE&gt;&lt;P&gt;this is the result of a map-reduce job.  &amp;lt;hdfsDir&amp;gt; in this case would be myFile.txt.  Note that _SUCCESS is a 0 byte file: there are not contents -- it is just a flag to designate the m-r job was a success.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ambari &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you can do this from the File View on Ambari.  Just open the directory holding the files you want to merge to one.  Then check the files you want to merge&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8280-screen-shot-2016-10-05-at-82419-am.png" style="width: 914px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23149i3EB4B0BC71C12E92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8280-screen-shot-2016-10-05-at-82419-am.png" alt="8280-screen-shot-2016-10-05-at-82419-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then click concatenate from the far right dropdown&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8291-screen-shot-2016-10-05-at-81855-am.png" style="width: 909px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23150i0431EDFE16EB634E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8291-screen-shot-2016-10-05-at-81855-am.png" alt="8291-screen-shot-2016-10-05-at-81855-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This will download the merged (concatenated) files from your browser.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note for both approaches:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The above works for multiple files in the same directory even if the files are not the result of a map-reduce job (but is typically used for map-reduce results).&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(If this is what you were looking for, please let me know by accepting the answer.  Else, let me know the gaps in the answer).&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 11:06:45 GMT</pubDate>
    <dc:creator>gkeys</dc:creator>
    <dc:date>2019-08-19T11:06:45Z</dc:date>
    <item>
      <title>How can we see the output in single file if 3 files are processed in Hadoop?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-we-see-the-output-in-single-file-if-3-files-are/m-p/114110#M42796</link>
      <description>&lt;P&gt;I have 3 files in Hadoop but want to see the output in single file.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 18:09:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-we-see-the-output-in-single-file-if-3-files-are/m-p/114110#M42796</guid>
      <dc:creator>rammohanciber</dc:creator>
      <dc:date>2016-10-05T18:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can we see the output in single file if 3 files are processed in Hadoop?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-we-see-the-output-in-single-file-if-3-files-are/m-p/114111#M42797</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Command Line&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If these three files are in the same directory, run the following from the command line of a server in the cluster. It will merge the files into one file and store it locally&lt;/P&gt;&lt;PRE&gt;hdfs dfs -getmerge &amp;lt;hdfsDir&amp;gt; &amp;lt;localFile&amp;gt;&lt;/PRE&gt;&lt;P&gt;where &amp;lt;hdfsDir&amp;gt; is the directory holding the files on hdfs and &amp;lt;localFile&amp;gt; is the name of the merged file that will be stored locally.&lt;/P&gt;&lt;P&gt;If you are talking about a directory structure that looks like this in HDFS:&lt;/P&gt;&lt;PRE&gt;myFile.txt/_SUCCESS
myFile.txt/part-m-00000
myFile.txt/part-m-00001&lt;/PRE&gt;&lt;P&gt;this is the result of a map-reduce job.  &amp;lt;hdfsDir&amp;gt; in this case would be myFile.txt.  Note that _SUCCESS is a 0 byte file: there are not contents -- it is just a flag to designate the m-r job was a success.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ambari &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Alternatively, you can do this from the File View on Ambari.  Just open the directory holding the files you want to merge to one.  Then check the files you want to merge&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8280-screen-shot-2016-10-05-at-82419-am.png" style="width: 914px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23149i3EB4B0BC71C12E92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8280-screen-shot-2016-10-05-at-82419-am.png" alt="8280-screen-shot-2016-10-05-at-82419-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then click concatenate from the far right dropdown&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8291-screen-shot-2016-10-05-at-81855-am.png" style="width: 909px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23150i0431EDFE16EB634E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8291-screen-shot-2016-10-05-at-81855-am.png" alt="8291-screen-shot-2016-10-05-at-81855-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This will download the merged (concatenated) files from your browser.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note for both approaches:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The above works for multiple files in the same directory even if the files are not the result of a map-reduce job (but is typically used for map-reduce results).&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(If this is what you were looking for, please let me know by accepting the answer.  Else, let me know the gaps in the answer).&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:06:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-we-see-the-output-in-single-file-if-3-files-are/m-p/114111#M42797</guid>
      <dc:creator>gkeys</dc:creator>
      <dc:date>2019-08-19T11:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can we see the output in single file if 3 files are processed in Hadoop?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-we-see-the-output-in-single-file-if-3-files-are/m-p/114112#M42798</link>
      <description>&lt;P&gt;Thank you Greg for  your  answer it  is  really helpful .&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 09:00:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-we-see-the-output-in-single-file-if-3-files-are/m-p/114112#M42798</guid>
      <dc:creator>rammohanciber</dc:creator>
      <dc:date>2016-10-06T09:00:16Z</dc:date>
    </item>
  </channel>
</rss>

