This is documentation for MapR Version 5.0. You can also refer to MapR documentation for the latest release.

Skip to end of metadata
Go to start of metadata

The hadoop-metrics.properties files direct MapR where to output MRv1 job metrics and service metrics reports. You can output the reports to file (FileContext), to Ganglia 3.1 (MapRGangliaContext31), or disable the output. 

There are two hadoop-metrics.properties files:

  • /opt/mapr/hadoop/hadoop-0.2.0/conf/hadoop-metrics.properties specifies output for MRv1 job metrics
  • /opt/mapr/conf/hadoop-metrics.properties specifies output for MapR-specific services

The following table describes the parameters for each service in the hadoop-metrics.properties files.

Parameter

Description

<service>.class

The class that implements the interface responsible for sending the service metrics to the appropriate handler. When implementing a class that sends metrics to Ganglia, set this property to the class name.

<service>.period

The interval between 2 service metrics data exports to the appropriate interface. This is independent of how often are the metrics updated in the framework.

<service>.fileName

The path to the file where service metrics are exported when the cldb.class property is set to FileContext.

<service>.servers

The location of the gmon or gmeta that is aggregating metrics for this instance of the service, when the cldb.class property is set to GangliaContext.

Icon
By default, the CLDB and FileServer metrics are sent via unicast to the Ganglia gmon server running on localhost. To send the metrics directly to a Gmeta server, change the cldb.servers property to the hostname of the Gmeta server. To send the metrics to a multicast channel, change the cldb.servers property to the IP address of the multicast channel.

<service>.spoof

Specifies whether the metrics being sent out from the server should be spoofed as coming from another server. All our fileserver metrics are also on cldb, but to make it appear to end users as if these properties were emitted by fileserver host, we spoof the metrics to Ganglia using this property. Currently only used for the FileServer service.

Configure Metrics

  1. Edit the appropriate hadoop-metrics.properties file. 
    1. For the MapR-FS and the CLDB edit /opt/mapr/conf/hadoop-metrics.properties on all CLDB nodes.
    2. For MRv1 Metrics, edit /opt/mapr/hadoop/hadoop-0.2.0/conf/hadoop-metrics.properties on all metrics nodes.

  2. In the sections specific to the service:
    • Un-comment the lines pertaining to the context to which you wish the service to send metrics.
    • Comment out the lines pertaining to other contexts.

  3. Restart the service.

Disable Metrics

Comment out the following parameters in the /opt/mapr/hadoop/hadoop-0.2.0/conf/hadoop-metrics.properties file to disable job metrics.

  • maprmepredvariant.class=com.mapr.job.mngmnt.hadoop.metrics.MaprRPCContext
  • maprmepredvariant.period=10
  • maprmapred.class=com.mapr.job.mngmnt.hadoop.metrics.MaprRPCContextFinal
  • maprmapred.period=10
Icon
For information on how to enable or disable MapR-FS and CLDB metrics, see service metrics.

Examples

The hadoop-metrics.properties files are organized into sections for each service that provides metrics. Each section is divided into subsections for the three contexts.

MRv1 Job Metrics Example

The following file disables MRv1 job metrics in the /opt/mapr/hadoop/hadoop-0.2.0/conf/hadoop-metrics.properties file:

MapR-FS and CLDB Metrics Example

The following example enables the MapRGangliaContext31 context for the MapR-FS and the CLDB in the /opt/mapr/conf/hadoop-metrics.properties file:

  • No labels