HDFS Administration
Also available as:
PDF
loading table of contents...

Chapter 9. Customizing HDFS

Customize the HDFS Home Directory

By default, the HDFS home directory is set to /user/<user_name>. You can use the dfs.user.home.base.dir property to customize the HDFS home directory.

  1. In the hdfs-site.xml file, set the following property:

    <property>
      <name>dfs.user.home.base.dir</name>
      <value>/user</value>
      <description>Base directory of user home.</description>
    </property>

    Where <value> is the path to the new home directory.

Set the Size of the NameNode Edits Directory

You can use the following hdfs-site.xml properties to control the size of the directory that holds the NameNode edits directory.

  • dfs.namenode.num.checkpoints.retained – The number of image checkpoint files that are retained in storage directories. All edit logs necessary to recover an up-to-date namespace from the oldest retained checkpoint are also retained.

  • dfs.namenode.num.extra.edits.retained – The number of extra transactions that should be retained beyond what is minimally necessary for a NameNode restart. This can be useful for audit purposes, or for an HA setup where a remote Standby Node may have been offline for some time and require a longer backlog of retained edits in order to start again.