Apache Slider App Instance Configuration

App Instance Configuration is the configuration override provided by the application owner when creating an application instance using Slider. This configuration values override the default configuration available in the App Package.

Instance configuration is a JSON formatted doc in the following form:

  "schema": "http://example.org/specification/v2.0.0",
  "metadata": {
  "global": {            

An appConfig.json contains the application configuration. The sample below shows configuration for HBase.

    "schema": "http://example.org/specification/v2.0.0",
    "metadata": {
    "global": {
        "application.def": ".slider/package/HBASE/slider-hbase-app-package-${pkg.version}.zip",
        "create.default.zookeeper.node": "true",
        "java_home": "/usr/jdk64/jdk1.7.0_67",
        "system_configs": "core-site",

        "site.global.app_user": "yarn",
        "site.global.app_root": "${AGENT_WORK_ROOT}/app/install/hbase-${pkg.version}",

        "site.global.ganglia_server_host": "${NN_HOST}",
        "site.global.ganglia_server_port": "8667",
        "site.global.ganglia_server_id": "Application1",

        "site.global.hbase_instance_name": "instancename",
        "site.global.hbase_root_password": "secret",
        "site.global.user_group": "hadoop",
        "site.global.monitor_protocol": "http",
        "site.global.hbase_thrift_port": "${HBASE_THRIFT.ALLOCATED_PORT}",
        "site.global.hbase_thrift2_port": "${HBASE_THRIFT2.ALLOCATED_PORT}",
        "site.global.hbase_rest_port": "${HBASE_REST.ALLOCATED_PORT}",

        "site.hbase-env.hbase_master_heapsize": "1024m",
        "site.hbase-env.hbase_regionserver_heapsize": "1024m",

        "site.hbase-site.hbase.rootdir": "${DEFAULT_DATA_DIR}",
        "site.hbase-site.hbase.superuser": "${USER_NAME}",
        "site.hbase-site.hbase.tmp.dir": "${AGENT_WORK_ROOT}/work/app/tmp",
        "site.hbase-site.hbase.local.dir": "${hbase.tmp.dir}/local",
        "site.hbase-site.hbase.zookeeper.quorum": "${ZK_HOST}",
        "site.hbase-site.zookeeper.znode.parent": "${DEFAULT_ZK_PATH}",
        "site.hbase-site.hbase.regionserver.info.port": "0",
        "site.hbase-site.hbase.master.info.port": "${HBASE_MASTER.ALLOCATED_PORT}",
        "site.hbase-site.hbase.regionserver.port": "0",
        "site.hbase-site.hbase.master.port": "0"
    "components": {
        "slider-appmaster": {
            "jvm.heapsize": "1024M"

appConf.json allows you to pass in arbitrary set of configuration that Slider will forward to the application component instances.

Variable naming convention

In order to understand how the naming convention works, lets look at how the config is passed on to component commands. Slider agent recevies a structured bag of commands as input for all commands, INSTALL, CONFIGURE, START, etc. The command includes a section "configuration" which has config properties arranged into named property bags.

  • Variables of the form site.xx.yy translates to variables by the name yy within the group xx and are typically converted to site config files by the name xx containing variable yy. For example, "site.hbase-site.hbase.regionserver.port":"" will be sent to the Slider-Agent as "hbase-site" : { "hbase.regionserver.port": ""} and app definition scripts can access all variables under hbase-site as a single property bag.
  • Similarly, site.core-site.fs.defaultFS allows you to pass in the default fs. This specific variable is automatically made available by Slider but its shown here as an example.
  • Variables of the form site.global.zz are sent in the same manner as other site variables except these variables are not expected to get translated to a site xml file. Usually, variables needed for template or other filter conditions (such as security_enabled = true/false) can be sent in as "global variable".

slider variables

  • Any config not of the form site.xx.yy are consumed by Slider itself. Some of the manadatory configuration are:
  • application.def: location of the application definition package (e.g., "/slider/hbase_v096.zip")
  • system_configs: list of config types sent to the containers (e.g. "core-site,hdfs-site,hbase-site")
  • java_home: java home path (e.g. "/usr/jdk64/jdk1.7.0_45")


  • create.default.zookeeper.node: whether the application needs default ZK node

dynamically allocated ports

Apps can ask port to be dynamically assigned by Slider or they can leave it as "0". If there is a need for advertising any listening endpoint then the ports can be marked such.

For example, HBase master info port needs to be advertised so that jmx endpoint can be accessed. This is indicated by using a special value, of the form, ${COMPONENT_NAME.ALLOCATED_PORT}. E.g. "site.hbase-site.hbase.master.info.port": "${HBASE_MASTER.ALLOCATED_PORT}"

Application Definition describes how to advertise arbitrary set of properties that are dynamically finalized when application is activated.

configuraing an app for ganglia metrics

There is no set guideline for doing so. How an application emits metrics and how the metrics are emitted to the right place is completely defined by the application. In the following example, we hso how HBase app is configured to emit metrics to a ganglia server.

Ganglia server lifecycle is not controlled by the app instance. So the app instance only needs to know where to emit the metrics. This is achieved through global variables

  • "site.global.ganglia_enabled":"true"
  • "site.global.ganglia_server_host": "gangliaserver.my.org"
  • "site.global.ganglia_server_port": "8663"
  • "site.global.ganglia_server_id": "HBaseApplicationCluster3"

All three variable values are user provided. It is also expected that a gmond server is available on host gangliaserver.my.org listening for metrics at port 8663 and is named "HBaseApplicationCluster3". Its the reponsibility of the ganglia server admin to ensure that the server is unique and is only receving metrics from the application instance.

Available environment variable

Property Description
AGENT_LOG_ROOT The root folder for the log
AGENT_WORK_ROOT The root working folder
NN_URI Name node URI given to Slider
NN_HOST Name node host
"COMPONENT_NAME".ALLOCATED_PORT Ask Slider to allocate a port
{"COMPONENT_NAME".ALLOCATED_PORT}{PER_CONTAINER} Ask Slider to allocate a port but keep it private to each container instance
DEFAULT_ZK_PATH Default ZK path created by Slider if create.default.zookeeper.node is true