JournalNodes

High-availabilty 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:

Reconfigure the JournalNode Edits Directory.

Go to the HDFS service in Cloudera Manager.

Click JournalNode under Status Summary.

Click the JournalNode link for the instance you are changing.

Click the Configuration tab.

Set dfs.journalnode.edits.dir to the path of the new jn directory.

Click Save Changes.

Move the location of the JournalNode (jn) directory at the command line:

Connect to host of the JournalNode.

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

Rename the old jn directory to avoid confusion:

mv /<old_path_to_jn_dir>/jn /<old_path_to_jn_dir>/jn_to_delete

Redeploy the HDFS client configuration:

Go to the HDFS service.

Select Actions > Deploy Client Configuration.

Perform a Rolling Restart for HDFS by selecting Actions > Rolling Restart. Use the default settings.

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:

Stop all services on the cluster in Cloudera Manager:

Go to the Cluster.

Select Actions > Stop.

Find the list of JournalNode hosts:

Go to the HDFS service.

Click JournalNode under Status Summary.

Move the location of each JournalNode (jn) directory at the command line:

Connect to each host with a JournalNode.

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

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

Reconfigure the JournalNode Default Group:

Go to the HDFS service.

Click the Configuration tab.

Click JournalNode under Scope.

Set dfs.journalnode.edits.dir to the path of the new jn directory for all JournalNodes in the group.

If this documentation includes code, including but not limited to, code examples, Cloudera makes this available to you under the terms of the Apache License, Version 2.0, including any required
notices. A copy of the Apache License Version 2.0 can be found here.