...
Code Block |
---|
GET /v3/system/services
|
The response body will contain a JSON-formatted list of the existing system services:
Code Block |
---|
[
{
"name": "appfabric",
"description": "Service for managing application lifecycle.",
"status": "OK",
"logs": "OK",
"min": 1,
"max": 1,
"requested": 1,
"provisioned": 1
}
...
]
|
HTTP Responses
Status Codes | Description |
---|---|
| The event successfully called the method, and the body contains the results |
...
Code Block |
---|
GET /v3/system/services/<service-id>/status
|
The status of these CDAP system services can be checked:
...
Code Block |
---|
GET /v3/system/upgrade/status
|
Note: This returns useful information only for Distributed CDAP installation upgrades.
...
Code Block |
---|
{
"metadata":true,
}
|
Container Information of a System Service
...
Code Block |
---|
GET /v3/system/services/<service-id>/live-info
|
where
Parameter | Description |
---|---|
| Name (ID) of the system service |
...
Code Block |
---|
GET /v3/system/services/appfabric/live-info
|
The response body will contain a JSON-formatted list of CDAP Master services, with the first container listed being the active CDAP Master in an HA deployment:
Code Block |
---|
{
"containers":[
{
"host":"host1.example.com",
"name":"appfabric",
"type":"system_service"
},
{
"host":"host2.example.com",
"name":"appfabric",
"type":"system_service"
}
]
}
|
Restarting System Service Instances
...
Code Block |
---|
POST /v3/system/services/<service-id>/restart
|
You can restart a particular instance of a system service in CDAP, using its instance id, by issuing an HTTP POST request to the URL:
Code Block |
---|
POST /v3/system/services/<service-id>/instances/<instance-id>/restart
|
Parameter | Description |
---|---|
| Name (ID) of the system service whose instances are to be restarted |
| Specific instance of a service that needs to be restarted; |
...
Code Block |
---|
GET /v3/system/services/<service-id>/latest-restart
|
The response body will contain a JSON-formatted status of the last restart attempt for that service:
Code Block |
---|
{
"instanceIds": [0],
"serviceName": "dataset.executor",
"startTimeInMs": 1437070039984,
"endTimeInMs": 1437070039992,
"status": "SUCCESS"
}
|
Parameter | Description |
---|---|
| Name (ID) of the system service for which details of last restart are to be retrieved |
...
Code Block |
---|
GET /v3/system/services/<service-id>/instances
PUT /v3/system/services/<service-id>/instances
|
with the arguments as a JSON string in the body:
Code Block |
---|
{ "instances" : <quantity> }
|
Parameter | Description |
---|---|
| Name (ID) of the system service |
| Number of instances to be used |
...