JournalNodes

High-availability clusters use JournalNodes to synchronize active and standby NameNodes. The active NameNode writes to each JournalNode with changes, or "edits," to HDFS namespace metadata. During failover, the standby NameNode applies all edits from the JournalNodes before promoting itself to the active state.

Moving the JournalNode Edits Directory

Moving the JournalNode Edits Directory for an Role Instance Using Cloudera Manager

To change the location of the edits directory for one JournalNode instance:

  1. Reconfigure the JournalNode Edits Directory.
    1. Go to the HDFS service in Cloudera Manager.
    2. Click JournalNode under Status Summary.
    3. Click the JournalNode link for the instance you are changing.
    4. Click the Configuration tab.
    5. Set dfs.journalnode.edits.dir to the path of the new jn directory.
    6. Click Save Changes.
  2. Move the location of the JournalNode (jn) directory at the command line:
    1. Connect to host of the JournalNode.
    2. Copy the JournalNode (jn) directory to its new location with the -a option to preserve permissions:
      cp -a /<old_path_to_jn_dir>/jn /<new_path_to_jn_dir>/jn
    3. Rename the old jn directory to avoid confusion:
      mv /<old_path_to_jn_dir>/jn /<old_path_to_jn_dir>/jn_to_delete
  3. Redeploy the HDFS client configuration:
    1. Go to the HDFS service.
    2. Select Actions > Deploy Client Configuration.
  4. Perform a Rolling Restart for HDFS by selecting Actions > Rolling Restart. Use the default settings.
  5. From the command line, delete the old jn_to_delete directory.

Moving the JournalNode Edits Directory for a Role Group Using Cloudera Manager

To change the location of the edits directory for each JournalNode in the JournalNode Default Group:
  1. Stop all services on the cluster in Cloudera Manager:
    1. Go to the Cluster.
    2. Select Actions > Stop.
  2. Find the list of JournalNode hosts:
    1. Go to the HDFS service.
    2. Click JournalNode under Status Summary.
  3. Move the location of each JournalNode (jn) directory at the command line:
    1. Connect to each host with a JournalNode.
    2. Per host, copy the JournalNode (jn) directory to its new location with the -a option to preserve permissions:
      cp -a /<old_path_to_jn_dir>/jn /<new_path_to_jn_dir>/jn
    3. Per host, rename the old jn directory to avoid confusion:
      mv /<old_path_to_jn_dir>/jn /<old_path_to_jn_dir>/jn_to_delete
  4. Reconfigure the JournalNode Default Group:
    1. Go to the HDFS service.
    2. Click the Configuration tab.
    3. Click JournalNode under Scope.
    4. Set dfs.journalnode.edits.dir to the path of the new jn directory for all JournalNodes in the group.
    5. Click Save Changes.
  5. Redeploy the client configuration for the cluster:
    1. Go to the Cluster.
    2. Select Actions > Deploy Client Configuration.
  6. Start all services on the cluster by selecting Actions > Start.
  7. Delete the old jn_to_delete directories from the command line.

Moving JournalNodes Across Hosts