Manage the YARN service life cycle through the REST API
You can perform various operations to manage the life cycle of a YARN service through the REST API.
Create a service
Use the following endpoint to create a service:
POST /app/v1/services
The execution of this command confirms the success of the service creation request. You cannot be sure if the service will reach a running state. Resource availability and other factors will determine if the service will be deployed in the cluster. You have to call the GET API to get the details of the service and determine its state.
Update a service or upgrade the binary version of a service
You can update the runtime properties of a service. You can update the lifetime, and start or stop a service. You can also upgrade the service containers to a newer version of their artifacts.
Use the following endpoint to update the service:
PUT /app/v1/services/{service_name}
Destroy a service
Use the following endpoint to destroy a service and release all its resources.
DELETE /app/v1/services/{service_name}
Get the details of a service
Use the following endpoint to view the details (including containers) of a running service.
GET /app/v1/services/{service_name}
Set the number of instances of a component
Use the following endpoint to set a component's desired number of instances:
PUT /app/v1/services/{service_name}/components/{component_name}