Created 09-03-2018 06:46 AM
What is "namenode_backup_dir" in Advanced hadoop-env on Ambari?
When is this property used?
Created 09-03-2018 06:52 AM
Based on the "src/main/resources/stacks/HDP/3.0/services/HDFS/configuration/hadoop-env.xml"
<property> <name>namenode_backup_dir</name> <display-name>NameNode Backup directory</display-name> <description>Local directory for storing backup copy of NameNode images during upgrade</description> <value>/tmp/upgrades</value> <on-ambari-upgrade add="false"/> </property>
.
Created 09-03-2018 06:52 AM
Based on the "src/main/resources/stacks/HDP/3.0/services/HDFS/configuration/hadoop-env.xml"
<property> <name>namenode_backup_dir</name> <display-name>NameNode Backup directory</display-name> <description>Local directory for storing backup copy of NameNode images during upgrade</description> <value>/tmp/upgrades</value> <on-ambari-upgrade add="false"/> </property>
.
Created 09-03-2018 07:06 AM
In order to get more details about why this property was added and why is it needed inside the "namenode_upgrade.py" script, you can refer to the following JIRA:
During HDP upgrade, Ambari does not allow redirecting the /tmp/upgrade directory elsewhere: https://issues.apache.org/jira/browse/AMBARI-18642
Code Changes: https://github.com/apache/ambari/commit/4b980f36a7de3f19e9bf8d5b8ae4f593931ec1f0
# grep 'namenode_backup_dir' /var/lib/ambari-server/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode_upgrade.py backup_destination_root_dir = "{0}/{1}".format(params.namenode_backup_dir, params.stack_version_unformatted)<br>
.
Created 09-03-2018 07:16 AM
Thank you very much!