<?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: Replication factor not changed in HDFS from hdfs-site.xml in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217102#M63930</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/20282/dsaurab1.html" nodeid="20282"&gt;@Saurab Dahal&lt;/A&gt; The replication factor is already set to 3 for the file you are trying to append data to. Even if the config value is changed, it gets into effect for new files. Please check the replication factor for a file created after the config value change.&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2017 00:59:35 GMT</pubDate>
    <dc:creator>ssanthosh</dc:creator>
    <dc:date>2017-06-30T00:59:35Z</dc:date>
    <item>
      <title>Replication factor not changed in HDFS from hdfs-site.xml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217100#M63928</link>
      <description>&lt;P&gt;I was facing &lt;CODE&gt;failed to replace bad datanode&lt;/CODE&gt; error while appending new data to file and the work around was to set &lt;CODE&gt;dfs.replication&lt;/CODE&gt;
 to less than 3 , so I set it to 1 just to test it. But I still got the 
same error. I looked at the hadoop web interface and surprisingly the 
replication factor was still 3 . but when I did &lt;CODE&gt;hdfs dfs -setrep 1 &amp;lt;file_name&amp;gt;&lt;/CODE&gt; the replication is set to 1 and I could append to file. Why is this happening? Can I not set default replication factor ?
I tried formating namenode still no change.&lt;/P&gt;

&lt;P&gt;Here's my &lt;CODE&gt;hdfs-site.xml&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;configuration&amp;gt;
&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;dfs.replication&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;1&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;

&amp;lt;property&amp;gt;
  &amp;lt;name&amp;gt;dfs.permissions&amp;lt;/name&amp;gt;
  &amp;lt;value&amp;gt;false&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;

  &amp;lt;property&amp;gt; 
    &amp;lt;name&amp;gt;dfs.support.append&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;true&amp;lt;/value&amp;gt; 
&amp;lt;/property&amp;gt;
&amp;lt;/configuration&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I tried to follow steps from &lt;A href="https://stackoverflow.com/questions/43764747/hdfs-replication-property-not-reflecting-as-defined-in-hfs-site-xml"&gt;this question&lt;/A&gt;, still my replication factor is 3.
I am running hadoop in single node cluster. &lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 21:01:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217100#M63928</guid>
      <dc:creator>d_saurab1</dc:creator>
      <dc:date>2017-06-29T21:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Replication factor not changed in HDFS from hdfs-site.xml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217101#M63929</link>
      <description>&lt;P&gt;That will only set it for newly created directories. Using the HDFS client, set the replication factor for the directory to the new value.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 00:53:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217101#M63929</guid>
      <dc:creator>dstreev</dc:creator>
      <dc:date>2017-06-30T00:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Replication factor not changed in HDFS from hdfs-site.xml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217102#M63930</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/20282/dsaurab1.html" nodeid="20282"&gt;@Saurab Dahal&lt;/A&gt; The replication factor is already set to 3 for the file you are trying to append data to. Even if the config value is changed, it gets into effect for new files. Please check the replication factor for a file created after the config value change.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 00:59:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217102#M63930</guid>
      <dc:creator>ssanthosh</dc:creator>
      <dc:date>2017-06-30T00:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Replication factor not changed in HDFS from hdfs-site.xml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217103#M63931</link>
      <description>&lt;P&gt;Hi Saurab, Are u able to see the changed value in the logs , while restarting the namenode. you can check in the namenode startup logs like.&lt;/P&gt;&lt;PRE&gt;grep -ri dfs.replication *&lt;/PRE&gt;</description>
      <pubDate>Fri, 30 Jun 2017 02:54:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217103#M63931</guid>
      <dc:creator>kalaiselvan_moo</dc:creator>
      <dc:date>2017-06-30T02:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Replication factor not changed in HDFS from hdfs-site.xml</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217104#M63932</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/20282/dsaurab1.html" nodeid="20282"&gt;@Saurab Dahal&lt;/A&gt; -  As in the other answers the change in hdfs-site.xml will only affect the newly created files with the new replication factor. &lt;/P&gt;&lt;P&gt;If you want to change replication factor for already existing files. You can run the hdfs cli commands like below:&lt;/P&gt;&lt;PRE&gt;hdfs dfs -setrep -w 1 /myfile
hdfs dfs -setrep -w 1 /mydir
&lt;/PRE&gt;&lt;P&gt;Hope this helps ! &lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 05:50:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Replication-factor-not-changed-in-HDFS-from-hdfs-site-xml/m-p/217104#M63932</guid>
      <dc:creator>namaheshwari</dc:creator>
      <dc:date>2017-06-30T05:50:12Z</dc:date>
    </item>
  </channel>
</rss>

