<?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 Hide &amp;quot;Connecting to namenode via...&amp;quot; message from stdout when using hdfs fsck in a for loop in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hide-quot-Connecting-to-namenode-via-quot-message-from/m-p/122371#M47201</link>
    <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;I usually use for loops to get info of some folders.&lt;/P&gt;&lt;P&gt;For example: I had to find which folder inside /user/bigdata was consuming high number of blocks due to small files.&lt;/P&gt;&lt;P&gt;So i used this:&lt;/P&gt;&lt;PRE&gt;for i in $(hadoop fs -ls /user/bigdata/ | grep drwx | awk '{print $8}'); do echo "$i $(hdfs fsck $i -blocks -files -locations | grep BP- | wc -l)" ; done&lt;/PRE&gt;&lt;P&gt;Getting a lot of  "Connecting to namenode via http://&amp;lt;hostname&amp;gt;:50070/fsck?ugi=hdfs&amp;amp;blocks=1&amp;amp;files=1&amp;amp;locations=1&amp;amp;path=%2Fuser%2Fbigdata%2F.&amp;lt;directory&amp;gt;" messages.&lt;/P&gt;&lt;P&gt;Does exist any way of hide this message? I currently have to redirect the output to a file and then use cat to read a clear infomation.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 25 Nov 2016 18:33:45 GMT</pubDate>
    <dc:creator>juan_manuel_nie</dc:creator>
    <dc:date>2016-11-25T18:33:45Z</dc:date>
    <item>
      <title>Hide "Connecting to namenode via..." message from stdout when using hdfs fsck in a for loop</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hide-quot-Connecting-to-namenode-via-quot-message-from/m-p/122371#M47201</link>
      <description>&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;I usually use for loops to get info of some folders.&lt;/P&gt;&lt;P&gt;For example: I had to find which folder inside /user/bigdata was consuming high number of blocks due to small files.&lt;/P&gt;&lt;P&gt;So i used this:&lt;/P&gt;&lt;PRE&gt;for i in $(hadoop fs -ls /user/bigdata/ | grep drwx | awk '{print $8}'); do echo "$i $(hdfs fsck $i -blocks -files -locations | grep BP- | wc -l)" ; done&lt;/PRE&gt;&lt;P&gt;Getting a lot of  "Connecting to namenode via http://&amp;lt;hostname&amp;gt;:50070/fsck?ugi=hdfs&amp;amp;blocks=1&amp;amp;files=1&amp;amp;locations=1&amp;amp;path=%2Fuser%2Fbigdata%2F.&amp;lt;directory&amp;gt;" messages.&lt;/P&gt;&lt;P&gt;Does exist any way of hide this message? I currently have to redirect the output to a file and then use cat to read a clear infomation.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2016 18:33:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hide-quot-Connecting-to-namenode-via-quot-message-from/m-p/122371#M47201</guid>
      <dc:creator>juan_manuel_nie</dc:creator>
      <dc:date>2016-11-25T18:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Hide "Connecting to namenode via..." message from stdout when using hdfs fsck in a for loop</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hide-quot-Connecting-to-namenode-via-quot-message-from/m-p/122372#M47202</link>
      <description>&lt;P&gt;
	Well finally I solved this.&lt;/P&gt;&lt;P&gt;
	The "Connecting to namenode via http://&amp;lt;hostname&amp;gt;:50070/fsck?ugi=hdfs█s=1&amp;amp;files=1&amp;amp;locations=1&amp;amp;path=%2Fuser%2Fbigdata%2F.&amp;lt;directory&amp;gt;" is the stderr output of the command so redirecting stderr to /dev/null does the work :).&lt;/P&gt;&lt;PRE&gt;for i in $(hadoop fs -ls /user/bigdata/ | grep drwx | awk '{print $8}'); do echo "$i $(hdfs fsck $i -blocks -files -locations 2&amp;gt; /dev/null | grep BP- | wc -l)" ; done&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Nov 2016 19:42:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hide-quot-Connecting-to-namenode-via-quot-message-from/m-p/122372#M47202</guid>
      <dc:creator>juan_manuel_nie</dc:creator>
      <dc:date>2016-11-25T19:42:04Z</dc:date>
    </item>
  </channel>
</rss>

