You can call DescribeClusterService operation to query the details of a service in a cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeClusterService |
The operation that you want to perform. Set the value to DescribeClusterService. |
ClusterId | String | Yes | C-F32FB31D8295**** |
The ID of the cluster. You can call ListClusters You can call this operation to view the ID of a cluster. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the instance. You can call DescribeRegions To view the latest list of Alibaba Cloud regions. |
ServiceName | String | Yes | HDFS |
The name of the service to be queried. Example: HDFS or YARN. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | EBB4D49C-4064-4818-B3AE-4C6BE5FC8264 |
The ID of the request. |
ServiceInfo | Struct |
The information of the service in the cluster. |
|
ClusterServiceSummaryList | Array of ClusterServiceSummary |
The information about components of the service. |
|
ClusterServiceSummary | |||
AlertInfo | String | "" |
The warning message for the component. |
Category | String | MASTER |
The type of the component. Valid values: Client, MASTER, and SLAVE. |
DesiredStoppedValue | Integer | 1 |
The number of hosts on which the installed component is expected to stop running. |
DisplayName | String | NodeManager |
The display name of the component. |
Key | String | NodeManager |
The component key. It specifies the name of the component. |
Status | String | OK |
The status of the component. |
Type | String | COMPONENT |
The type of the component. |
Value | String | 20/20 Started |
The status of the component on the hosts where it is installed. |
NeedRestartComponentNameList | List | ["NodeManager","ResourceManager"] |
The name of a component to be restarted. |
NeedRestartHostIdList | List | ["HostId1"] |
The ID of a host in the cluster where the components to be restarted are located. |
NeedRestartInfo | String | "" |
The information of the components to be restarted for the current service. |
NeedRestartNum | Integer | 0 |
The number of components to be restarted for the current service. |
ServiceActionList | Array of ServiceAction |
The list of actions that the service supports. |
|
ServiceAction | |||
ActionName | String | CUSTOM_COMMAND |
The name of the action. |
Command | String | refreshQueues |
ActionName is CUSTOM_COMMAND When, there will be corresponding Command DMS console as an administrator. Different services support different Command , currently supported by YARN refreshQueues , enableCGroups and disableCGroups DMS console as an administrator. |
ComponentName | String | NodeManager |
The name of the component on which the action is performed. |
DisplayName | String | RESTART NodeManager |
The display name of the action. |
ServiceName | String | YARN |
The name of the service. |
ServiceName | String | YARN |
The name of the service. |
ServiceStatus | String | INSTALLED |
The status of the service. |
ServiceVersion | String | 2.7.2 |
The version of the service. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeClusterService
&ClusterId=C-F32FB31D8295****
&RegionId=cn-hangzhou
&ServiceName=HDFS
&<common request parameters>
Sample success responses
XML
format
<DescribeClusterServiceResponse>
<data>
<RequestId>7A23195A-BC03-4D82-BED5-90ED0D36F002</RequestId>
<ServiceInfo>
<NeedRestartHostIdList></NeedRestartHostIdList>
<ServiceActionList>
<ServiceAction>
<ActionName>CONFIGURE</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>CONFIGURE All Components</DisplayName>
<ComponentName>ALL COMPONENTS</ComponentName>
</ServiceAction>
<ServiceAction>
<ActionName>START</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>START All Components</DisplayName>
<ComponentName>ALL COMPONENTS</ComponentName>
</ServiceAction>
<ServiceAction>
<ActionName>STOP</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>STOP All Components</DisplayName>
<ComponentName>ALL COMPONENTS</ComponentName>
</ServiceAction>
<ServiceAction>
<ActionName>RESTART</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>RESTART All Components</DisplayName>
<ComponentName>ALL COMPONENTS</ComponentName>
</ServiceAction>
<ServiceAction>
<ActionName>RESTART</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>RESTART NodeManager</DisplayName>
<ComponentName>NodeManager</ComponentName>
</ServiceAction>
<ServiceAction>
<ActionName>RESTART</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>RESTART WebAppProxyServer</DisplayName>
<ComponentName>WebAppProxyServer</ComponentName>
</ServiceAction>
<ServiceAction>
<ActionName>RESTART</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>RESTART JobHistory</DisplayName>
<ComponentName>JobHistory</ComponentName>
</ServiceAction>
<ServiceAction>
<ActionName>RESTART</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>RESTART ResourceManager</DisplayName>
<ComponentName>ResourceManager</ComponentName>
</ServiceAction>
<ServiceAction>
<ActionName>RESTART</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>RESTART App Timeline Server</DisplayName>
<ComponentName>TimeLineServer</ComponentName>
</ServiceAction>
<ServiceAction>
<Command>refreshQueues</Command>
<ActionName>CUSTOM_COMMAND</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>Refresh Queues</DisplayName>
<ComponentName>ResourceManager</ComponentName>
</ServiceAction>
<ServiceAction>
<Command>enableCGroups</Command>
<ActionName>CUSTOM_COMMAND</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>Enable CGroups</DisplayName>
<ComponentName>NodeManager</ComponentName>
</ServiceAction>
<ServiceAction>
<Command>disableCGroups</Command>
<ActionName>CUSTOM_COMMAND</ActionName>
<ServiceName>YARN</ServiceName>
<DisplayName>Disable CGroups</DisplayName>
<ComponentName>NodeManager</ComponentName>
</ServiceAction>
</ServiceActionList>
<ServiceName>YARN</ServiceName>
<NeedRestartInfo></NeedRestartInfo>
<NeedRestartNum>0</NeedRestartNum>
<ClusterServiceSummaryList>
<ClusterServiceSummary>
<Status>OK</Status>
<Value>20/20 Started</Value>
<Key>NodeManager</Key>
<Type>COMPONENT</Type>
<DisplayName>NodeManager</DisplayName>
<AlertInfo></AlertInfo>
</ClusterServiceSummary>
<ClusterServiceSummary>
<Status>OK</Status>
<Value>1/1 Started</Value>
<Key>JobHistory</Key>
<Type>COMPONENT</Type>
<DisplayName>JobHistory</DisplayName>
<AlertInfo></AlertInfo>
</ClusterServiceSummary>
<ClusterServiceSummary>
<Status>OK</Status>
<Value>22/22 Installed</Value>
<Key>YarnInit</Key>
<Type>COMPONENT</Type>
<DisplayName>Yarn Client</DisplayName>
<AlertInfo></AlertInfo>
</ClusterServiceSummary>
<ClusterServiceSummary>
<Status>OK</Status>
<Value>1/1 Started</Value>
<Key>TimeLineServer</Key>
<Type>COMPONENT</Type>
<DisplayName>App Timeline Server</DisplayName>
<AlertInfo></AlertInfo>
</ClusterServiceSummary>
<ClusterServiceSummary>
<Status>OK</Status>
<Value>1/1 Started</Value>
<Key>WebAppProxyServer</Key>
<Type>COMPONENT</Type>
<DisplayName>WebAppProxyServer</DisplayName>
<AlertInfo></AlertInfo>
</ClusterServiceSummary>
<ClusterServiceSummary>
<Status>OK</Status>
<Value>2/2 Started</Value>
<Key>ResourceManager</Key>
<Type>COMPONENT</Type>
<DisplayName>ResourceManager</DisplayName>
<AlertInfo></AlertInfo>
</ClusterServiceSummary>
</ClusterServiceSummaryList>
<ServiceVersion>2.7.2-1.3.1</ServiceVersion>
<NeedRestartComponentNameList></NeedRestartComponentNameList>
<ServiceStatus>INSTALLING</ServiceStatus>
</ServiceInfo>
</data>
<requestId>7A23195A-BC03-4D82-BED5-90ED0D36F002</requestId>
</DescribeClusterServiceResponse>
JSON
Syntax
{
"data": {
"RequestId": "7A23195A-BC03-4D82-BED5-90ED0D36F002",
"ServiceInfo": {
"NeedRestartHostIdList": {
"Service": []
},
"ServiceActionList": {
"ServiceAction": [
{
"ActionName": "CONFIGURE",
"ServiceName": "YARN",
"DisplayName": "CONFIGURE All Components",
"ComponentName": "ALL COMPONENTS"
},
{
"ActionName": "START",
"ServiceName": "YARN",
"DisplayName": "START All Components",
"ComponentName": "ALL COMPONENTS"
},
{
"ActionName": "STOP",
"ServiceName": "YARN",
"DisplayName": "STOP All Components",
"ComponentName": "ALL COMPONENTS"
},
{
"ActionName": "RESTART",
"ServiceName": "YARN",
"DisplayName": "RESTART All Components",
"ComponentName": "ALL COMPONENTS"
},
{
"ActionName": "RESTART",
"ServiceName": "YARN",
"DisplayName": "RESTART NodeManager",
"ComponentName": "NodeManager"
},
{
"ActionName": "RESTART",
"ServiceName": "YARN",
"DisplayName": "RESTART WebAppProxyServer",
"ComponentName": "WebAppProxyServer"
},
{
"ActionName": "RESTART",
"ServiceName": "YARN",
"DisplayName": "RESTART JobHistory",
"ComponentName": "JobHistory"
},
{
"ActionName": "RESTART",
"ServiceName": "YARN",
"DisplayName": "RESTART ResourceManager",
"ComponentName": "ResourceManager"
},
{
"ActionName": "RESTART",
"ServiceName": "YARN",
"DisplayName": "RESTART App Timeline Server",
"ComponentName": "TimeLineServer"
},
{
"Command": "refreshQueues",
"ActionName": "CUSTOM_COMMAND",
"ServiceName": "YARN",
"DisplayName": "Refresh Queues",
"ComponentName": "ResourceManager"
},
{
"Command": "enableCGroups",
"ActionName": "CUSTOM_COMMAND",
"ServiceName": "YARN",
"DisplayName": "Enable CGroups",
"ComponentName": "NodeManager"
},
{
"Command": "disableCGroups",
"ActionName": "CUSTOM_COMMAND",
"ServiceName": "YARN",
"DisplayName": "Disable CGroups",
"ComponentName": "NodeManager"
}
]
},
"ServiceName": "YARN",
"NeedRestartInfo": "",
"NeedRestartNum": 0,
"ClusterServiceSummaryList": {
"ClusterServiceSummary": [
{
"Status": "OK",
"Value": "20/20 Started",
"Key": "NodeManager",
"Type": "COMPONENT",
"DisplayName": "NodeManager",
"AlertInfo": ""
},
{
"Status": "OK",
"Value": "1/1 Started",
"Key": "JobHistory",
"Type": "COMPONENT",
"DisplayName": "JobHistory",
"AlertInfo": ""
},
{
"Status": "OK",
"Value": "22/22 Installed",
"Key": "YarnInit",
"Type": "COMPONENT",
"DisplayName": "Yarn Client",
"AlertInfo": ""
},
{
"Status": "OK",
"Value": "1/1 Started",
"Key": "TimeLineServer",
"Type": "COMPONENT",
"DisplayName": "App Timeline Server",
"AlertInfo": ""
},
{
"Status": "OK",
"Value": "1/1 Started",
"Key": "WebAppProxyServer",
"Type": "COMPONENT",
"DisplayName": "WebAppProxyServer",
"AlertInfo": ""
},
{
"Status": "OK",
"Value": "2/2 Started",
"Key": "ResourceManager",
"Type": "COMPONENT",
"DisplayName": "ResourceManager",
"AlertInfo": ""
}
]
},
"ServiceVersion": "2.7.2-1.3.1",
"NeedRestartComponentNameList": {
"Service": []
},
"ServiceStatus": "INSTALLING"
}
},
"requestId": "7A23195A-BC03-4D82-BED5-90ED0D36F002"
}