Support Questions

Find answers, ask questions, and share your expertise

What is "namenode_backup_dir" in Advanced hadoop-env on Ambari?

avatar
Contributor

What is "namenode_backup_dir" in Advanced hadoop-env on Ambari?

When is this property used?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Takefumi Oide

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>

.

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@Takefumi Oide

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>

.

avatar
Master Mentor

@Takefumi Oide

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>

.

avatar
Contributor

Thank you very much!