MapR provides a central location where you can place customized configuration files for all the services running on the MapR cluster. As a result, you do not have to edit the configuration files on each node individually.

Default configuration files for each service are stored locally under /opt/mapr/. You can edit these files to create customized versions of the configuration files. To push these changes to other nodes in the cluster, copy the customized files to the mapr.configuration volume in the MapR-FS. When the pullcentralconfig script runs, it overwrites the local configuration file in /opt/mapr  with the customized files on all nodes that the change applies to.

The mapr.configuration volume is mounted at maprfs://var/mapr/configuration.The mapr.configuration volume mount location is not configurable and is only used for central configuration.

This page contains the following topics:

Using Central Configuration

Complete the following steps to use the Central Configuration (pullcentralconfig script) to push a customized configuration file from the mapr.configuration volume in MapR-FS to nodes in the cluster.

  1. Customize a configuration file on any node in the cluster.
    See Listing the Configuration Files for Each Service to determine which files you can customize. 
  2. Create the directory structure for the configuration file that is relative to $MAPR_HOME based on how many nodes the file applies to: 

    ScopeMapR-FS Location

    Use this file on all nodes that use the configuration file unless a node-specific file exists in the mapr.configuration volume .

    /var/mapr/configuration/default/<directory path to the configuration file>

    Use this file for a specific node.

    /var/mapr/configuration/nodes/<hostname>/<directory path to the configuration file>

  3. Copy the customized file to the mapr.configuration volume in the directory that you created.
    For example, to create a directory to update the webserver configuration file, which is in /opt/mapr/conf, you would create directory path /var/mapr/configuration/default/conf and then copy the updated file to this directory.  
  4. Run the pullcentralconfig script or wait until the script acknowledges the update.
    For more information, see About the pullcentralconfig Script
  5. Restart the services associated with the updated configuration files to ensure that the latest version is used for each service.


In the following example, you have a cluster with eight nodes, and five of them (host1, host2, host3, host4, and host5) are running the TaskTracker service.

You want to create one customized configuration file (mapred-site.xml) that applies to host2 through host5 and assign a different customized configuration file to host1.


Customized Configuration Files












Not applicable. No customized configuration files are used.


Not applicable. No customized configuration files are used.


Not applicable. No customized configuration files are used.

Do not change the name of the new configuration file - it must match the name of the original version.

Step 1. Create a customized configuration file for host2 through host5 and copy it to the mapr.configuration volume:

  1. Make a copy of the existing default version of the mapred-site.xml file (so you can use it as a template), and store it in /tmp. You can perform this step on any node in the cluster that contains the configuration file.

    $ cp /opt/mapr/hadoop/hadoop-0.20.2/conf/mapred-site.xml /tmp/mapred-site.xml
  2. Edit the copy and put in the changes you want for host2 through host5.
  3. Create the directories required to store the file under /var/mapr/configuration/default:

    $ hadoop fs -mkdir -p /var/mapr/configuration/default/hadoop/hadoop-0.20.2/conf
  4. Store the new configuration file in the /var/mapr/configuration/default directory.

    $ hadoop fs -put /tmp/mapred-site.xml /var/mapr/configuration/default/hadoop/hadoop-0.20.2/conf

Step 2. Create a node-specific configuration file for host1 and copy it to the mapr.configuration volume:

  1. Edit the mapred-site.xml configuration file in /tmp (or you could copy the default version into /tmp again and edit that) and create the node-specific configuration file for host1.
  2. Create the directories required to store the file under /var/mapr/configuration/nodes:

    hadoop fs -mkdir -p /var/mapr/configuration/nodes/host1/hadoop/hadoop-0.20.2/conf
  3. Store the new configuration file for host1 in the node-specific directory you just created.

    $ hadoop fs -put /tmp/mapred-site.xml /var/mapr/configuration/nodes/host1/hadoop/hadoop-0.20.2/conf

Step 3. Verify the changes

Now that you have two separate customized configuration files for your TaskTracker nodes, the pullcentralconfig script will detect the new files in /var/mapr/configuration the next time it is launched. It overwrites the local version in /opt/mapr with the appropriate customized version for each of the five TaskTracker nodes. 

  1. To launch the pullcentralconfig script, perform one of the following operations:
    • Run pullcentralconfig from the command line to overwrite the old files immediately.

    • Wait five minutes (the interval between successive checks for updated configuration files) for the script to run automatically.
  2. Look at the information messages in pullcentralconfig.log. Whenever the timestamp comparison is false, an INFO message indicates that the older file under /opt/mapr is copied into a backup file (.bkp) and the newer version is copied to replace it. Sample log output is shown here:

    $ cat pullcentralconfig.log
    Header: hostName: centos22, Time Zone: Pacific Standard Time, processName: CentralConfig, processId: 4041
    2014-08-18 15:50:13,861 INFO com.mapr.centralconfig.CentralConfigCopyHelper [main]: Copied /var/mapr/configuration/default/hadoop/hadoop-0.20.2/conf/mapred-site.xml to /opt/mapr//hadoop/hadoop-0.20.2/conf/mapred-site.xml
  3. Restart the service.
    From the command line:

    maprcli node services -nodes <hostname> -<service> restart

    For example, to restart the TaskTracker on nodes host1 through host5, enter:

    maprcli node services -nodes host1,host2,host3,host4,host5 -tasktracker restart

    From the MCS:
    On the Nodes tab, use a filter to display the nodes that are running the service you want to restart (TaskTracker in this case).

    Mark the check boxes next to the nodes where you want to restart the service. For this example, two nodes are selected.

    Click on the Manage services for 2 nodes button at the top to display the Manage Services dialog, then click the dropdown menu next to TaskTracker and select Restart, then click OK.

About the pullcentralconfig Script

The pullcentralconfig script runs on each node in the cluster. The pullcentralconfig script is launched automatically at specified intervals (the default interval is 300 seconds, which is five minutes). For each service listed in /opt/mapr/roles, the pullcentralconfig script searches for corresponding configuration files in the central configuration location, /var/mapr/configuration. If any configuration files are found, it compares the timestamp (mtimes) of the files in the central configuration location to the timestamp of the local version in /opt/mapr. If the central configuration version is newer, pullcentralconfig overwrites the local version with the central configuration file. To ensure that the newer version gets used, you need to restart the associated service.

Checking for Node-specific vs. Cluster-wide Configuration Files

The pullcentralconfig script checks for central configuration files in this order:

  1. Node-specific configuration files under /var/mapr/configuration/nodes/<hostname>.
    If configuration files are found here, pullcentralconfig does not check /var/mapr/configuration/default.
  2. Cluster-wide configuration files under /var/mapr/configuration/default.
    The pullcentralconfig script only searches here if no node-specific configuration files are found.

If no configuration files are found in either location, the script finishes and no changes are made to the files in /opt/mapr.

Changing the Polling Frequency

By default, the pullcentralconfig script polls the central configuration location every five minutes (300 seconds) to check for configuration files. You can change the polling frequency by editing this variable in warden.conf:


To make the change take effect, restart Warden:

root$> service mapr-warden restart

Listing the Configuration Files for Each Service

Each service on a node has one or more configuration files associated with it. The default version of each configuration file can be used as a template that you can modify as needed.

Files in the following directory contain the list of configuration files for each installed service: /opt/mapr/servicesconf/<service>.

Use the following command to display the configuration files or the directory that contains the configuration files for each service: 

# cat /opt/mapr/servicesconf/<service> 

For example, the following command displays the configuration files for NodeManager:

# cat /opt/mapr/servicesconf/nodemanager

All pathnames are relative to $MAPR_HOME.

The following table contains the configuration files and configuration file directories available for Hadoop and Hbase: 


Pathnames of Configuration Files












































Preserving Multiple Versions of Configuration Files

If you want to save multiple versions of customized configuration files, you can take snapshots of mapr.configuration to preserve each version you create. This maybe helpful if you want to try various versions of the configuration files on the cluster.

Before a local configuration file is updated by the pullcentralconfiguration script, a backup of the current version is created. The file extension .bkp indicates the back-up configuration file.

Disabling Automatic Central Configuration

Automatic central configuration is enabled by default. You can configure central configuration to stop automatic runs of the pullcentralconfig script by editing warden.conf and setting the following variable to false:


To make the change take effect, restart Warden:

root$> service mapr-warden restart

When automatic central configuration is disabled,  you can still manually run the pullcentralconfig script to push the latest configuration files to nodes in the cluster.