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

Life cycle management of ats-hbase

Depending on requirements, the yarn-ats user can perform the following life cycle management operations on the ats-hbase service: start, stop, or destroy the service; and scale up or scale down HBase component instances for the service. The ats-hbase service can also restart automatically in the case of a ResourceManager restart or during a ResourceManager HA failover.

The yarn-ats user can perform the life cycle management operations by using either REST APIs or the command line interface.

Stopping the ats-hbase service

REST API:

Consider the following examples of using the PUT method for stopping the service:

Secure cluster:

Ensure that you run kinit with /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab.

curl -k --negotiate -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase -d '{
  "state": "STOPPED"
}'

Non-secure cluster:

curl -k -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase?user.name=yarn-ats -d '{
  "state": "STOPPED"
}'

Command

Use the yarn app -stop command to stop the service.
yarn app -stop ats-hbase

Starting the ats-hbase service

REST API:

Consider the following examples of using the PUT method for starting the stopped service:

Secure cluster:

Ensure that you run kinit with /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab.

curl -k --negotiate -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase -d '{
  "state": "STARTED"
}'

Non-secure cluster:

curl -k -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase?user.name=yarn-ats -d '{
  "state": "STARTED"
}'

Command

Use the yarn app -start command to start the stopped service.
yarn app -start ats-hbase

Scaling up or scaling down HBase component instances for the ats-hbase service

You can scale up or scale down the instances of components such as the HBase master or region servers for ats-hbase.
Note
Note
The number of the HBase master component instances cannot be increased by more than two at a time.

REST API:

In the following examples, the number of region server instances is scaled to a value of 10:

Secure cluster:

Ensure that you run kinit with /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab.

curl -k --negotiate -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase/components/<component> -d '{
  "number_of_containers": "10"
}'
Non-secure cluster:
curl -k -u: -H "Content-Type: application/json" -X PUT http://<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase/components/<component>?user.name=yarn-ats -d '{
  "number_of_containers": "10"
}'

Command

Use the yarn app -flex command and specify the number of component instances to scale.
yarn app -flex ats-hbase regionserver 10

Destroying the ats-hbase service

REST API:

Consider the following examples of using the PUT method for destroying the service:

Secure cluster:

Ensure that you run kinit with /etc/security/keytabs/yarn-ats.hbase-client.headless.keytab.

curl -k --negotiate -u: -H "Content-Type: application/json" -X DELETE http://
<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase
Non-secure cluster:
curl -k -u: -H "Content-Type: application/json" -X DELETE http://
<ResourceManagerHost>:<ResourceManagerPort>/app/v1/services/ats-hbase?
user.name=yarn-ats

Command

Use the yarn app -destroy command to destroy the service.
yarn app -destroy ats-hbase