Managing Data Operating System
Also available as:
PDF
loading table of contents...

Create a custom service

You can define a service in JSON format and save it as a template.

  1. On the Services page of the YARN Web User Interface, click New Service.
  2. Click the Custom tab.
  3. In the User name for service field, specify the name of the user who launches the service.
  4. 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"
          }
        }
      ]
    }
  5. Click Save.
  6. Specify a name for the new service and click Add.
    The newly created service is added to the list of saved templates.
    Note
    Note
    Click Reset if you do not want to save your changes and specify the service details again.
  7. Select the service and click Deploy to deploy it.