Saturday, March 2, 2019

Day to Day Esentails - Adding and Removing Nodes

--Marking Datanode Dead

2 * dfs.namenode.heartbeat.recheck-interval + 10 * dfs.heartbeat.interval

dfs.heartbeat.interval - defaults to 3 seconds

dfs.namenode.heartbeat.recheck-interval - defaults to 300,000 milliseconds = 300 seconds

2 * 300 seconds + 10 * 3 seconds = 630 seconds (10 minutes and 30 seconds)

--To commission or decommission datanodes

sudo vi /etc/hadoop/conf/hdfs-site.xml

<property>

  <name>dfs.hosts</name>

  <value>/etc/hadoop/conf/include</value>

</property>


<property>

  <name>dfs.hosts.exclude</name>

  <value>/etc/hadoop/conf/exclude</value>

</property>


sudo vi /etc/hadoop/conf/include

sudo vi /etc/hadoop/conf/exclude

--After include/exclude changes, refresh nodes for changes to take effect

hdfs dfsadmin -refreshNodes



http://ec2-10-10-10-10.compute-1.amazonaws.com:50070/dfshealth.html

--To commission or decommission nodemanagers

sudo vi /etc/hadoop/conf/yarn-site.xml

<property>

  <name>yarn.resourcemanager.nodes.include-path</name>

  <value>/etc/hadoop/conf/include</value>

</property>


<property>

  <name>yarn.resourcemanager.nodes.exclude-path</name>

  <value>/etc/hadoop/conf/exclude</value>

</property>



--After include/exclude changes, refresh nodes for changes to take effect



yarn rmadmin -refreshNodes

--Support graceful decommission of nodemanager


https://issues.apache.org/jira/browse/YARN-914