You can call this operation to query the details of a service installed on a cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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 to be queried.

RegionId String Yes cn-hangzhou

The ID of the region to which your cluster belongs.

ServiceName String Yes HDFS

The name of the service to be queried, for example, HDFS and YARN.

AccessKeyId String No LTAI8ljWyu7y****

The AccessKey ID provided to you by Alibaba Cloud. This parameter identifies the user.

Response parameters

Parameter Type Example Description
RequestId String EBB4D49C-4064-4818-B3AE-4C6BE5FC8264

The ID of the request.

ServiceInfo

The information of the service in the cluster.

ClusterServiceSummaryList

The information about components of the service.

ClusterServiceSummary

The information about a component of the service.

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 ["NodeManager","ResourceManager"]

The names of components to be restarted.

Service

The name of a component to be restarted.

NeedRestartHostIdList ["HostId1"]

The IDs of the hosts in the cluster where the components to be restarted are located.

Service

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

The list of actions that the service supports.

ServiceAction

An action that the service supports.

ActionName String CUSTOM_COMMAND

The name of the action.

Command String refreshQueues

You can specify the Command parameter only when the ActionName parameter is set to CUSTOM_COMMAND. Different services support different commands. YARN supports the refreshQueues, enableCGroups, and disableCGroups commands.

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 format

{
	"requestId":"7A23195A-BC03-4D82-BED5-90ED0D36F002",
	"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":"",
			"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":""
					}
				]
			},
			"NeedRestartNum":0,
			"ServiceVersion":"2.7.2-1.3.1",
			"NeedRestartComponentNameList":{
				"Service":[]
			},
			"ServiceStatus":"INSTALLING"
		}
	}
}

Error codes

HTTP status code Error code Error message Operation
400 InvalidServiceName The cluster doesn't have this service. The error message returned because the specified service does not exist in the cluster.
403 Params.Illegal The specified parameters are wrongly formed. The error message returned because the format of the specified parameter is invalid.
404 ClusterId.NotFound ClusterId [%s] does not exist. The error message returned because the specified ClusterId parameter does not exist. Make sure that the ID of the cluster is valid.
403 User.OtherUserResource.NotAllow It is not allowed to operate other user's resource. The error message returned because you are not authorized to manage the resources of other users.
500 InternalError The request processing has failed due to some unknown error. The error message returned because the request processing has failed due to an internal error. Submit a ticket.

For a list of error codes, visit the API Error Center.