<?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: If I delete a file in hdfs having replication factor as 3, whether all three copies will be deleted ? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177796#M82915</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/11048/falbani.html" nodeid="11048"&gt;@Felix Albani&lt;/A&gt;&lt;P&gt;If i delete my files in trash, is there any possibility to have reference anywhere ?&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 21:18:14 GMT</pubDate>
    <dc:creator>sganeshkumar</dc:creator>
    <dc:date>2018-08-30T21:18:14Z</dc:date>
    <item>
      <title>If I delete a file in hdfs having replication factor as 3, whether all three copies will be deleted ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177794#M82913</link>
      <description />
      <pubDate>Thu, 30 Aug 2018 14:25:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177794#M82913</guid>
      <dc:creator>sganeshkumar</dc:creator>
      <dc:date>2018-08-30T14:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: If I delete a file in hdfs having replication factor as 3, whether all three copies will be deleted ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177795#M82914</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/89308/sganeshkumar.html" nodeid="89308"&gt;@Sudharsan
 Ganeshkumar
&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Actually any file stored in hdfs is split in blocks (chunks of data) and each block is replicated 3 times by default. When you delete a file you remove the metadata pointing to the blocks that is stored in Namenode. Blocks are deleted when there is no reference to them in the Namenode metadata. This is important to mention since you could have snapshots, or files in Trash folders still referencing the blocks, if this happens those blocks wont be deleted until the snapshot of files under Trash folders are also removed. &lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 21:03:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177795#M82914</guid>
      <dc:creator>falbani</dc:creator>
      <dc:date>2018-08-30T21:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: If I delete a file in hdfs having replication factor as 3, whether all three copies will be deleted ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177796#M82915</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11048/falbani.html" nodeid="11048"&gt;@Felix Albani&lt;/A&gt;&lt;P&gt;If i delete my files in trash, is there any possibility to have reference anywhere ?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 21:18:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177796#M82915</guid>
      <dc:creator>sganeshkumar</dc:creator>
      <dc:date>2018-08-30T21:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: If I delete a file in hdfs having replication factor as 3, whether all three copies will be deleted ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177797#M82916</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/89308/sganeshkumar.html" nodeid="89308"&gt;@Sudharsan
 Ganeshkumar&lt;/A&gt; perhaps a snapshot or a copy of a file pointing to the same blocks. Please remember to login and accept the answer if you think it has addressed your question. &lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 21:40:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177797#M82916</guid>
      <dc:creator>falbani</dc:creator>
      <dc:date>2018-08-30T21:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: If I delete a file in hdfs having replication factor as 3, whether all three copies will be deleted ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177798#M82917</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/89308/sganeshkumar.html"&gt;&lt;/A&gt;No.&lt;/P&gt;&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/89308/sganeshkumar.html"&gt;Sudharsan Ganeshkumar&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you delete your files from &lt;STRONG&gt;Trash&lt;/STRONG&gt; and there is no snapshot available for the same file, Your file will have no references in namenode metadata and file will be removed completely.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 00:32:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177798#M82917</guid>
      <dc:creator>gul_shad</dc:creator>
      <dc:date>2018-08-31T00:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: If I delete a file in hdfs having replication factor as 3, whether all three copies will be deleted ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177799#M82918</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/12387/gulshadansari.html" nodeid="12387"&gt;@gulshad.ansari&lt;/A&gt;&lt;P&gt; Where can we find the snapshot, exacty which location.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 12:44:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177799#M82918</guid>
      <dc:creator>sganeshkumar</dc:creator>
      <dc:date>2018-08-31T12:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: If I delete a file in hdfs having replication factor as 3, whether all three copies will be deleted ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177800#M82919</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/89308/sganeshkumar.html" nodeid="89308"&gt;@Sudharsan
 Ganeshkumar
&lt;/A&gt;&lt;A href="https://community.hortonworks.com/users/89308/sganeshkumar.html"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Snapshots are stored in the same path under .snapshot directory.&lt;/P&gt;&lt;P&gt;for example, If you take snapshot of /user/root, it would be stored in /user/root/.snapshot directory. An example is given below.&lt;/P&gt;&lt;PRE&gt;[hdfs@sandbox ~]$ hdfs dfsadmin -allowSnapshot /user/root/testsnap
snapsAllowing snaphot on /user/root/testsnaps succeeded
[root@sandbox ~]# hdfs dfs -createSnapshot /user/root/testsnaps snap1
Created snapshot /user/root/testsnaps/.snapshot/snap1
[gulshad@sandbox ~]$ hdfs dfs -createSnapshot /user/gulshad
Created snapshot /user/gulshad/.snapshot/s20180831-145829.441 &lt;/PRE&gt;&lt;P&gt;To get all Snapshotable directories, run below command.&lt;/P&gt;&lt;PRE&gt;[root@sandbox ~]# sudo -su hdfs hdfs lsSnapshottableDir
drwxr-xr-x 0 root    hdfs 0 2018-07-26 05:29 3 65536 /user/root/testsnaps
drwxr-xr-x 0 hdfs    hdfs 0 2018-08-01 14:58 1 65536 /proj/testsnap
drwxr-xr-x 0 gulshad hdfs 0 2018-08-01 14:58 1 65536 /user/gulshad&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Aug 2018 22:08:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/If-I-delete-a-file-in-hdfs-having-replication-factor-as-3/m-p/177800#M82919</guid>
      <dc:creator>gul_shad</dc:creator>
      <dc:date>2018-08-31T22:08:25Z</dc:date>
    </item>
  </channel>
</rss>

