MapR 5.0 Documentation : warden.<servicename>.conf

The warden.conf configuration file is associated with standard services provided by MapR. Warden supports service monitoring for these additional services:

  • gateway
  • drill
  • hue
  • httpfs
  • hbase 
  • hbase thrift server (Supported with mapr-hbase-0.94.17 and later)
  • hbase rest gateway (Supported with mapr-hbase-0.98.9 and later)
  • historyserver
  • hive metastore
  • hiveserver2
  • nodemanager
  • oozie
  • resourcemanager
  • spark master

Each of these supported services requires a configuration file, warden.<servicename>.conf, which is included with the package for that service. When you install one of these service packages, its corresponding configuration file is stored in /opt/mapr/conf/conf.d. The configuration files and their packages are shown below:

Service NameConfiguration FileComments
gatewaywarden.gateway.confInstalled with the mapr-gateway package
drillwarden.drill-bits.confInstalled with the mapr-drill package
huewarden.hue.confInstalled with the mapr-hue package
httpfswarden.httpfs.confInstalled with the mapr-httpfs package
hbase thrift serverwarden.hbasethrift.confInstalled with the mapr-hbasethrift package
hbase rest gatewaywarden.hbaserest.confInstalled with the mapr-hbase-rest package
historyserverwarden.historyserver.conf Installed with the mapr-historyserver package
hive metastorewarden.hivemeta.confInstalled with the mapr-hivemetadata package
hiveserver2warden.hs2.confInstalled with the mapr-hiveserver2 package
nodemanagerwarden.nodemanager.conf Installed with the mapr-nodemanager package
ooziewarden.oozie.confInstalled with the mapr-oozie package
resourcemanagerwarden.resourcemanager.conf Installed with the mapr-resourcemanager package
spark masterwarden.spark-master.confInstalled with the spark-master package.

The following properties can be in a warden.<servicename>.conf file:

Property NameDescription
servicesService name and number of nodes this service should run on, along with service dependencies. Format is serviceName:N[depServiceName].Values for N = 1 or all.
service.displaynameService display name to appear in UI
service.command.startService start command
service.command.stopService stop command
service.command.typeIndicates whether the script runs in background (and exits) or inline (script does not exit). Type is BACKGROUND or INLINE.
service.command.monitorMonitors string (if the service monitor command does not provide sufficient monitoring)
service.command.monitorcommandSpecifies a command that checks whether the service is running
service.portPort where the service is running (for example, hue webserver runs on port 8888)

To include a link to a user interface associated with this service in the MCS, enter a Uniform Resource Identifier (URI) in this property and also specify the port in the service.ui.port property.
For example, enter /service1 for this property and then enter 8080 in the service.ui.port property to provide the following UI link for this service in the MCS: http://<hostname>:8080/service1

service.ui.portIf you want to include a link to the user interface associated with this service in the MCS, enter the port in this property and also specify the URI in the service.uri property.  
service.logs.locationLocation of the service log files
service.depends.localIndicates whether service depends on a service instance locally, or on the master. Values = 1 (local) or 0 (master).


Specifies the abbreviated alarm name for this service. This is the alarm name that appears in the MCS. Once the service has been started by Warden, you cannot edit this value.
service.alarm.labelSpecifies the alarm name for this service. This is the alarm name that appears in the maprcli when you do not request a terse output. Once the service has been started by Warden, you cannot edit this value.
service.heapsize.percentSpecifies heapsize percent.
service.heapsize.maxMaximum heapsize in MB.
service.heapsize.minMinimum heapsize in MB.
service.envSpecifies environment variables to be use by the service. By default, it may include "MAPR_MAPREDUCE_MODE=default". You can include a comma-separated list of environment variables within quotes. For example, service.env="MAPR_MAPREDUCE_MODE=default,ABC=1,XYZ=2"
For more information about the MAPR_MAPREDUCE_MODE, see Managing the MapReduce Mode for Ecosystem Components.

Memory Management for Services

The following memory parameters are used to reserve memory for the service:

  • The service.<servicename>.heapsize.percent parameter controls the percentage of system memory allocated to the named service.

  • The service.<servicename>.heapsize.max parameter defines the maximum heapsize used when invoking the service.

  • The service.<servicename>.heapsize.min parameter defines the minimum heapsize used when invoking the service.

For example, the service.command.gateway.heapsize.percentservice.command.gateway.heapsize.max, and service.command.gateway.heapsize.min parameters in the warden.gateway.conf file controls the amount of memory that Warden allocates to the gateway service before allocating memory to other services. 

The actual heap size used when invoking a service is a combination of the three parameters according to the formula max(heapsize.min, min(heapsize.max, total-memory * heapsize.percent / 100)).

warden.hs2.conf Example

The hiveserver2 configuration file, warden.hs2.conf, looks like this:

service.command.start=/opt/mapr/hive/hive-0.13/bin/hive --start --service hiveserver2
service.command.stop=/opt/mapr/hive/hive-0.13/bin/hive --stop --service hiveserver2
service.command.monitorcommand=/opt/mapr/hive/hive-0.13/bin/hive --status --service hiveserver2

When hiveserver2 is installed, the warden.hs2.conf file is placed in the directory /opt/mapr/conf/conf.d. If Warden is running, it will detect the file and start the service. If Warden is not running, the file is picked up when Warden starts. Warden monitors the service and displays the status on the MapR Control System UI.