4. Running Applications on Slider

The following sections describe how to configure, load, start, and verify Slider applications.

The Slider Application Specification

Configuring a Slider application includes two specification components: the Resource Specification (resources.json) and the Application Configuration (appConfig.json).

The Resource Specification

Slider needs to know what components (and how many components) are in an application package to deploy.

As Slider creates each instance of a component in its own YARN container, it also needs to know what to ask YARN for in terms of memory and CPU for those containers.

All this information goes into the Resources Specification file (“Resource Spec”) named resources.json. The Resource Specification tells Slider how many instances of each component in the application to deploy, and also the parameters for YARN.

Resource Specification Example -- Apache Memcached

{ "schema" : "http://example.org/specification/v2.0.0", "metadata" : {
 }, "global" : {
 }, "components": { "slider-appmaster": {
 }, "MEMCACHED": { "yarn.role.priority": "1", "yarn.component.instances": "1", "yarn.vcores": "1", "yarn.memory": "256"
 }
 }
}

The Application Configuration

The Application Configuration file includes parameters that are specific to the application, rather than to YARN. The Application Configuration is applied to the default configuration provided by the application definition and then handed off to the associated component agent.

Application Configuration Example -- memcached

{ "schema": "http://example.org/specification/v2.0.0", "metadata": {
 }, "global": { "application.def": "jmemcached-1.0.0.zip", "java_home": "/usr/jdk64/jdk1.7.0_45", "site.global.additional_cp": "/usr/hdp/current/hadoop-client/lib/*", "site.global.xmx_val": "256m", "site.global.xms_val": "128m", "site.global.memory_val": "200M", "site.global.listen_port": "${MEMCACHED.ALLOCATED_PORT}{PER_CONTAINER}"
 }, "components": { "slider-appmaster": { "jvm.heapsize": "256M"
 }
 }
} 

loading table of contents...