Creating a custom YARN service
You can define a service in JSON format and save it as a template.
- On the Services page of the YARN Web User Interface, click New Service.
- Click the Custom tab.
- In the User name for service field, specify the name of the user who launches the service.
-
In the Service Definition field, specify the service
definition in JSON format.
The following example shows the
sleeper
service template definition.{ "name": "sleeper-service", "version": "1.0.0", "components" : [ { "name": "sleeper", "number_of_containers": 2, "launch_command": "sleep 900000", "resource": { "cpus": 1, "memory": "256" } } ] }
- Click Save.
-
Specify a name for the new service and click Add.
The newly created service is added to the list of saved templates.
- Select the service and click Deploy to deploy it.