This is the documentation for Cloudera Manager 5.1.x. Documentation for other versions is available at Cloudera Documentation.

Federated Nameservices

Required Role:

Cloudera Manager supports the configuration of multiple Nameservices managing separate HDFS namespaces, all of which share the storage available on the set of DataNodes. These Nameservices are federated, meaning each Nameservice is independent and does not require coordination with other Nameservices. See HDFS Federation for more information.

It is simplest to add a second Nameservice if High Availability is already enabled. The process of enabling High Availability creates a Nameservice as part of the enable High Availability workflow.

  Important: Configuring a new Nameservice will shut down the services that depend upon HDFS. Once the new Nameservice has been started, the services that depend upon HDFS must be restarted, and the client configurations must be redeployed. (This can be done as part of the Add Nameservice workflow, as an option.)

Converting a non-Federated HDFS Service to a Federated HDFS Service

You must have one Nameservice in place before you can add a second (or additional) Nameservices. Follow the instructions below to convert your current NameNode/SecondaryNameNode setup to a Federated Setup with a single Nameservice.

  1. Go to the HDFS service.
  2. Click the Configuration tab.
  3. Search for "nameservice". This will show you the Nameservice properties for your NameNode and SecondaryNameNode.
  4. In the NameNode Nameservice field, type a name for the Nameservice. The name must be unique and can contain only alphanumeric characters.
  5. In the Mountpoints field, change the mount point from "/" to a list of mount points that are in the namespace that this Nameservice will manage. (You can enter this as a comma-separated list — for example, "/hbase, /tmp, /user" or by clicking the plus icon to add each mount point in its own field.) You can determine the list of mount points by running the command hadoop fs -ls / from the CLI on the NameNode host.
  6. In the SecondaryNameNode Nameservice field, type the name of the Nameservice. This must be the same as you provided for the NameNode Nameservice property.
  7. Save your changes.
  8. Click the Instances tab. You should now see the Federation and High Availability section with your Nameservice listed.
  9. You can use the Edit command under the Actions menu to edit the list of mount points for this Nameservice. In the Mountpoints field, change the mount point from "/" to a list of mount points that are in the namespace that this Nameservice will manage.

Adding a Nameservice

The instructions below for adding a Nameservice assume that a Nameservice is already set up. The first Nameservice cam be set up either by converting a simple HDFS service as described above (see Converting a non-Federated HDFS Service to a Federated HDFS Service or by enabling HDFS High Availability.

  1. Go to the HDFS service.
  2. Click the Instances tab. At the top of this page you should see the Federation and High Availability section.
      Note: If this section does not appear, it means you do not have any Nameservices configured. You must have one Nameservice already configured in order to add a Nameservice. You can either enable High Availability, which will create a Nameservice, or you can convert your existing HDFS service to be federated.
  3. Click the Add Nameservice button.
    1. Enter a name for the new Nameservice. The name must be unique and can contain only alphanumeric characters.
    2. Enter at least one mount point for the Nameservice. This defines the portion of HDFS that will be managed under the new Nameservice. (Click the + to the right of the Mount Point field to add a new mount point). You cannot use "/" as a mount point; you must specify HDFS directories by name.
      • The mount points must be unique for this Nameservice; you cannot specify any of the same mount points you have used for other Nameservices.
      • You can specify mount points that do not yet exist, and create the corresponding directories in a later step in this procedure.
      • If you want to use a mount point previously associated with another Nameservice you must first remove that mount point from that service. You can do this using the Edit command from the Actions menu for that Nameservice, and later add the mount point to the new Nameservice.
      • After you have brought up the new Nameservice, you must create the directories that correspond with the mount points you specified in the new namespace.
      • If a mount point corresponds to a directory that formerly was under a different Nameservice, you must also move any contents of that directory, if appropriate as described in step 8.
      • If an HBase service is set to depend on the federated HDFS service, edit the mount points of the existing Nameservice to reference:
        • HBase root directory (default /hbase)
        • MapReduce system directory (default /tmp/mapred/system)
        • MapReduce JobTracker staging root directory (default value /user).
    3. If you want to configure High Availability for the Nameservice, leave the Highly Available checkbox checked.
    4. Click Continue.
  4. Select the hosts on which the new NameNode and Secondary NameNodes will be created. (These must be hosts that are not already running other NameNode or SecondaryNameNode instances, and their /dfs/nn and /dfs/snn directories should be empty if they exist. Click Continue.
  5. Enter or confirm the directory property values (these will differ depending on whether you are enabling High Availability for this Nameservice, or not).
  6. Uncheck the Start Dependent Services checkbox if you need to create directories or move data onto the new Nameservice. Leave this checked if you want the workflow to restart services and redeploy the client configurations as the last steps in the workflow.
  7. Click Continue. If the process finished successfully, click Finish. You should now see your new Nameservice in the Federation and High Availability section in the Instances tab of the HDFS service.
  8. Create the directories you want under the new Nameservice using the CLI:
    1. To create a directory in the new namespace, use the command hadoop fs -mkdir /nameservices/nameservice/directory where nameservice is the new nameservice you just created and directory is the directory that corresponds to a mount point you specified.
    2. To move data from one Nameservice to another, use distcp or manual export/import. dfs -cp and dfs -mv will not work.
    3. Verify that the directories and data are where you expect them to be.
  9. Restart the dependent services.
  Note: The monitoring configurations at the HDFS level apply to all Nameservices. So if you have two Nameservices, it is not possible to disable a check on one but not the other. Likewise, it's not possible to have different thresholds for events for the two Nameservices.

Nameservice and Quorum-based Storage

With Quorum-based Storage, JournalNodes are shared across Nameservices. So, if JournalNodes are present in an HDFS service, all Nameservices will have Quorum-based Storage enabled. To override this:

  • The dfs.namenode.shared.edits.dir configuration of the two NameNodes of a High Availability Nameservice should be configured to include the value of the dfs.namenode.name.dirs setting, or
  • The dfs.namenode.edits.dir configuration of the one NameNode of a non-High Availability Nameservice should be configured to include the value of the dfs.namenode.name.dirs setting.
Page generated September 3, 2015.