<?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 clear HDFS directories on specific host in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207229#M71500</link>
    <description>&lt;P&gt;@Michael Bronson&lt;/P&gt;&lt;P&gt;hdfs rm -r will delete the path you have provided recursively. The specified location will be deleted from hdfs cluster. So, that means it is deleted from entire hdfs cluster.&lt;/P&gt;&lt;P&gt;If trash option is enabled, it will move the deleted files to trash directory.&lt;/P&gt;&lt;P&gt;For more info, you can see the rm command usage&lt;/P&gt;&lt;P&gt;&lt;A href="https://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/FileSystemShell.html#rm" target="_blank"&gt;https://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/FileSystemShell.html#rm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The above link is for Hadoop 2.7.3 version.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Nov 2017 03:56:20 GMT</pubDate>
    <dc:creator>bviswanadham</dc:creator>
    <dc:date>2017-11-22T03:56:20Z</dc:date>
    <item>
      <title>how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207223#M71497</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt;
&lt;P&gt;we have ambari cluster &lt;/P&gt;&lt;P&gt;the follwing commands will clear entire cluster.. &lt;/P&gt;&lt;P&gt;while I want to clear the HDFS directories only on specific host and not - on entire cluster !!&lt;/P&gt;&lt;PRE&gt;$ hadoop namenode -format

$ hdfs namenode -format
&lt;/PRE&gt;&lt;P&gt;so what are the commands to clear the HDFS only on specific host?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 21 Nov 2017 04:19:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207223#M71497</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-21T04:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207224#M71503</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/26229/uribarih.html"&gt;Michael Bronson&lt;/A&gt; To delete the HDFS directories in cluster use the command mentioned below:&lt;A href="https://community.hortonworks.com/users/26229/uribarih.html"&gt;&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;hdfs dfs -rmr /DirectoryPath&lt;/PRE&gt;&lt;P&gt;This will delete all directory and files under this path &lt;STRONG&gt;/DirectoryPath&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 06:26:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207224#M71503</guid>
      <dc:creator>sandeepksaini</dc:creator>
      <dc:date>2017-11-21T06:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207225#M71504</link>
      <description>&lt;P&gt;so what is the diff if I just delete the folder by rm -rf ?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 06:50:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207225#M71504</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-21T06:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207226#M71498</link>
      <description>&lt;P&gt;@Michael Bronson&lt;/P&gt;&lt;P&gt;I assumed when you mentioned rm -rf, you mean to delete datanode data directories.&lt;/P&gt;&lt;P&gt;When you use normal delete to delete the datanode directories, the block data for files will be deleted, and the replication factor for those blocks will be reduced by 1. And they remain as under replicated blocks if replication factor has been set to greater than 1. &lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 09:17:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207226#M71498</guid>
      <dc:creator>bviswanadham</dc:creator>
      <dc:date>2017-11-21T09:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207227#M71499</link>
      <description>&lt;P&gt;just to be clear because this is very important - do you sure that - hdfs dfs -rmr /DirectoryPath will affected only on the host and not on the entire cluster?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 13:31:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207227#M71499</guid>
      <dc:creator>mike_bronson7</dc:creator>
      <dc:date>2017-11-21T13:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207228#M71505</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/26229/uribarih.html" nodeid="26229"&gt;@Michael Bronson&lt;/A&gt;&lt;P&gt;m -rf -&amp;gt; This is a Linux/Unix based command which will only delete your Unix/Lrinux based directory created in Unix/Linux file system. &lt;/P&gt;&lt;P&gt;Whereas&lt;/P&gt;&lt;P&gt;hdfs dfs -rmr /DirectoryPath -&amp;gt; Is for deletion of files/dirs in HDFS filesystem. &lt;/P&gt;&lt;P&gt;Incase I miss interpreted your question then and you mean to ask me what is difference between &lt;STRONG&gt;"hdfs dfs -rmr"&lt;/STRONG&gt; and &lt;STRONG&gt;"hdfs dfs -rm -rf"&lt;/STRONG&gt; then the later one doesn't exist as there is no "-f" parameter to rm command in HDFS filesystem. &lt;/P&gt;&lt;P&gt;We only have "-r" as an option for rm command in HDFS to delete the dir and files. &lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 00:58:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207228#M71505</guid>
      <dc:creator>sandeepksaini</dc:creator>
      <dc:date>2017-11-22T00:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207229#M71500</link>
      <description>&lt;P&gt;@Michael Bronson&lt;/P&gt;&lt;P&gt;hdfs rm -r will delete the path you have provided recursively. The specified location will be deleted from hdfs cluster. So, that means it is deleted from entire hdfs cluster.&lt;/P&gt;&lt;P&gt;If trash option is enabled, it will move the deleted files to trash directory.&lt;/P&gt;&lt;P&gt;For more info, you can see the rm command usage&lt;/P&gt;&lt;P&gt;&lt;A href="https://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/FileSystemShell.html#rm" target="_blank"&gt;https://hadoop.apache.org/docs/r2.7.3/hadoop-project-dist/hadoop-common/FileSystemShell.html#rm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The above link is for Hadoop 2.7.3 version.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 03:56:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207229#M71500</guid>
      <dc:creator>bviswanadham</dc:creator>
      <dc:date>2017-11-22T03:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207230#M71501</link>
      <description>&lt;P&gt;If you use hdfs dfs -rm -r it will delete the files from hdfs cluster. It affects HDFS cluster, not a particular host.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 04:17:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207230#M71501</guid>
      <dc:creator>bviswanadham</dc:creator>
      <dc:date>2017-11-22T04:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to clear HDFS directories on specific host</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207231#M71502</link>
      <description>&lt;P&gt;You can't clear HDFS on a host because HDFS is an filesystem abstraction over the entire cluster. &lt;/P&gt;&lt;P&gt;You &lt;EM&gt;can&lt;/EM&gt; clear the &lt;EM&gt;datanode directories&lt;/EM&gt; of a particular host (or format the disks), but the HDFS balancer will fill them back in depending on the other data ingestion processes of the cluster and ensuring 3 replicas on the files. &lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 05:48:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-clear-HDFS-directories-on-specific-host/m-p/207231#M71502</guid>
      <dc:creator>JordanMoore</dc:creator>
      <dc:date>2017-11-22T05:48:39Z</dc:date>
    </item>
  </channel>
</rss>

