<?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: DATANODE + Failed to replace a bad datanode on the existing pipeline in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/DATANODE-Failed-to-replace-a-bad-datanode-on-the-existing/m-p/184143#M146290</link>
    <description>&lt;P&gt;&lt;A href="@Michael Bronson"&gt;&lt;EM&gt;@Michael Bronson&lt;/EM&gt;&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.hortonworks.com/users/26229/uribarih.html"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/users/26229/uribarih.html"&gt;&lt;/A&gt;&lt;I&gt;Below is the datanode policy  and the option NEVER  is as stated not desirable  to eliminate that error look at the other options &lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/B&gt;&lt;STRONG&gt;Recovery from Pipeline &lt;/STRONG&gt;&lt;B&gt;&lt;EM&gt;upon Failure&lt;/EM&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;There are four configurable policies regarding whether to add additional DataNodes to replace the bad ones when setting up a pipeline for recovery with the remaining DataNodes:&lt;/EM&gt;&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;&lt;EM&gt;DISABLE: Disables DataNode replacement and throws an error (at the server); this acts like NEVER at the client.&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;NEVER: Never replace a DataNode when a pipeline fails (generally not a desirable action).&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;DEFAULT:  Replace based on the following conditions:
&lt;/EM&gt;&lt;OL&gt;
&lt;LI&gt;&lt;EM&gt;Let r be the configured replication number.&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Let n be the number of existing replica datanodes.&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Add a new DataNode only if r &amp;gt;= 3 and EITHER
&lt;/EM&gt;&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;  floor(r/2) &amp;gt;= n; OR&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;  r &amp;gt; n and the block is hflushed/appended.&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;ALWAYS: Always add a new DataNode when an existing DataNode failed. This fails if a DataNode can’t be replaced.&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;EM&gt;To disable using any of these policies, you can set the following configuration property to false (the default is true):&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;dfs.client.block.write.replace-datanode-on-failure.enable
&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;When enabled, the default policy is DEFAULT. The following config property changes the policy:&lt;/EM&gt;&lt;/P&gt;
&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;dfs.client.block.write.replace-datanode-on-failure.policy
&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;When using DEFAULT or ALWAYS, if only one DataNode succeeds in the pipeline, the recovery will never succeed and client will not be able to perform the write. This problem is addressed with this configuration property:&lt;/EM&gt;&lt;/P&gt;
&lt;PRE&gt;dfs.client.block.write.replace-datanode-on-failure.best-effort
&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;which defaults to false. With the default setting, the client will keep trying until the specified policy is satisfied. When this property is set to true, even if the specified policy can’t be satisfied (for example, there is only one DataNode that succeeds in the pipeline, which is less than the policy requirement), the client will still be allowed to continue to write.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;HTH&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jul 2018 12:46:48 GMT</pubDate>
    <dc:creator>Shelton</dc:creator>
    <dc:date>2018-07-13T12:46:48Z</dc:date>
  </channel>
</rss>

