Deploying and managing services on YARN
Using the YARN Services API, you can run simple and complex template-based apps on containers.
Without having the need to write new code or modify your apps, you can create and manage the life cycle of these YARN services.
{
"name": "sleeper-service",
"version": "1.0.0",
"components" : [
{
"name": "sleeper",
"number_of_containers": 2,
"launch_command": "sleep 900000",
"resource": {
"cpus": 1,
"memory": "256"
}
}
]
}
Each service file contains, at a minimum, a name, version, and list of components. Each component of a service has a name, a number of containers to be launched (also referred to as component instances), a launch command, and an amount of resources to be requested for each container.
Components optionally also include an artifact specification. The artifact can be the default type (with no artifact specified, like the sleeper-service example above) or can have other artifact types such as TARBALL, or SERVICE.