You can call this operation to query the components installed on every host of the cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Example Description
Action String Yes ListClusterHostComponent

The operation that you want to perform. Set the value to ListClusterHostComponent.

ClusterId String Yes C-F32FB31D82954C64

The ID of the cluster.

RegionId String Yes cn-hangzhou

The ID of the region to which the cluster belongs.

ServiceName String No TEZ

The name of the service.

ComponentName String No TezInit

The name of the component to be queried.

ComponentStatus String No STARTED

The status of the component to be queried.

HostInstanceId String No i-xxx

The ID of the ECS instance.

HostName String No emr-worker-1

The name of the host.

HostRole String No CORE

The role of the host.

PageNumber Integer No 1

The number of the page to return.

PageSize Integer No 100

The number of entries to return on each page.

AccessKeyId String No LTAI8ljWyu7y****

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

Response parameters

Parameter Type Example Description
ComponentList

The components installed on the host.

Component

The information of the component.

ComponentDisplayName String Tez Client

The display name of the component.

ComponentName String TezInit

The name of the component.

Cpu Integer 4

The number of vCPUs on the host.

HostId String 111

The ID of the host.

HostInstanceId String i-xxx

The ID of the ECS instance.

HostName String emr-worker-1

The name of the host.

InstanceType String ecs.sn1.xlarge

The type of the ECS instance.

Memory Integer 8

The memory of the ECS instance.

NeedRestart Boolean true

Indicates whether the component needs to be restarted.

PrivateIp String 192.168.1.1

The private IP address of the host.

PublicIp String 48.20.119.10

The public IP address of the host.

Role String CORE

The role of the host.

SerialNumber String x11-05e5-4d36-b773-8ae4106babd4

The serial number of the host.

ServerStatus String active

The service status of the component. For example, the valid values for some components of a high availability cluster are active and standby.

ServiceDisplayName String Tez

The display name of the service.

ServiceName String TEZ

The name of the service.

Status String STARTED

The status of the component.

PageNumber Integer 100

The page number of the returned page.

PageSize Integer 1

The number of entries returned per page.

RequestId String DF202AC2-5D5D-4288-B608-B7B1595B5C7C

The ID of the request.

Total Integer 4

The total number of entries returned.

Examples

Sample requests


http(s)://[Endpoint]/? Action=ListClusterHostComponent
&ClusterId=C-F32FB31D82954C64
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<ListClusterHostComponentResponse>
	  <PageSize>10</PageSize>
	  <RequestId>DF202AC2-5D5D-4288-B608-B7B1595B5C7C</RequestId>
	  <PageNumber>1</PageNumber>
	  <Total>4</Total>
	  <ComponentList>
		    <Component>
			      <Status>STARTED</Status>
			      <ComponentDisplayName>Tez Client</ComponentDisplayName>
			      <PublicIp>47.97.106.27</PublicIp>
			      <HostInstanceId>i-xxx1</HostInstanceId>
			      <HostId>124903</HostId>
			      <ServiceDisplayName>Tez</ServiceDisplayName>
			      <Role>MASTER</Role>
			      <SerialNumber>x11-05e5-4d36-b773-8ae4106babd4</SerialNumber>
			      <PrivateIp>192.168.143.231</PrivateIp>
			      <ServiceName>TEZ</ServiceName>
			      <NeedRestart>false</NeedRestart>
			      <ComponentName>TezInit</ComponentName>
			      <InstanceType>ecs.n4.xlarge</InstanceType>
			      <HostName>emr-header-1</HostName>
		    </Component>
		    <Component>
			      <Status>STARTED</Status>
			      <ComponentDisplayName>Tomcat</ComponentDisplayName>
			      <PublicIp>47.97.106.27</PublicIp>
			      <HostInstanceId>i-xxx2</HostInstanceId>
			      <HostId>124903</HostId>
			      <ServiceDisplayName>Tez</ServiceDisplayName>
			      <Role>MASTER</Role>
			      <SerialNumber>1xx1-05e5-x-b773-xxx</SerialNumber>
			      <PrivateIp>192.168.143.231</PrivateIp>
			      <ServiceName>TEZ</ServiceName>
			      <NeedRestart>false</NeedRestart>
			      <ComponentName>Tomcat</ComponentName>
			      <InstanceType>ecs.n4.xlarge</InstanceType>
			      <HostName>emr-header-1</HostName>
		    </Component>
		    <Component>
			      <Status>STARTED</Status>
			      <ComponentDisplayName>Tez Client</ComponentDisplayName>
			      <PublicIp></PublicIp>
			      <HostInstanceId>i-xxx3</HostInstanceId>
			      <HostId>124902</HostId>
			      <ServiceDisplayName>Tez</ServiceDisplayName>
			      <Role>CORE</Role>
			      <SerialNumber>asd1x1-af39-1c-32b27d83d4c3</SerialNumber>
			      <PrivateIp>192.168.143.232</PrivateIp>
			      <ServiceName>TEZ</ServiceName>
			      <NeedRestart>false</NeedRestart>
			      <ComponentName>TezInit</ComponentName>
			      <InstanceType>ecs.n4.xlarge</InstanceType>
			      <HostName>emr-worker-1</HostName>
		    </Component>
		    <Component>
			      <Status>STARTED</Status>
			      <ComponentDisplayName>Tez Client</ComponentDisplayName>
			      <PublicIp></PublicIp>
			      <HostInstanceId>i-xxx4</HostInstanceId>
			      <HostId>124901</HostId>
			      <ServiceDisplayName>Tez</ServiceDisplayName>
			      <Role>CORE</Role>
			      <SerialNumber>1cc-2762-4d84-a430-xxx</SerialNumber>
			      <PrivateIp>192.168.143.233</PrivateIp>
			      <ServiceName>TEZ</ServiceName>
			      <NeedRestart>false</NeedRestart>
			      <ComponentName>TezInit</ComponentName>
			      <InstanceType>ecs.n4.xlarge</InstanceType>
			      <HostName>emr-worker-2</HostName>
		    </Component>
	  </ComponentList>
</ListClusterHostComponentResponse>

JSON format

{
	"PageNumber":1,
	"PageSize":10,
	"RequestId":"DF202AC2-5D5D-4288-B608-B7B1595B5C7C",
	"Total":4,
	"ComponentList":{
		"Component":[
			{
				"NeedRestart":false,
				"HostInstanceId":"i-xxx1",
				"ComponentDisplayName":"Tez Client",
				"HostId":"124903",
				"ServiceDisplayName":"Tez",
				"PrivateIp":"192.168.143.231",
				"HostName":"emr-header-1",
				"InstanceType":"ecs.n4.xlarge",
				"SerialNumber":"x11-05e5-4d36-b773-8ae4106babd4",
				"Status":"STARTED",
				"ServiceName":"TEZ",
				"PublicIp":"47.97.106.27",
				"Role":"MASTER",
				"ComponentName":"TezInit"
			},
			{
				"NeedRestart":false,
				"HostInstanceId":"i-xxx2",
				"ComponentDisplayName":"Tomcat",
				"HostId":"124903",
				"ServiceDisplayName":"Tez",
				"PrivateIp":"192.168.143.231",
				"HostName":"emr-header-1",
				"InstanceType":"ecs.n4.xlarge",
				"SerialNumber":"1xx1-05e5-x-b773-xxx",
				"Status":"STARTED",
				"ServiceName":"TEZ",
				"PublicIp":"47.97.106.27",
				"Role":"MASTER",
				"ComponentName":"Tomcat"
			},
			{
				"NeedRestart":false,
				"HostInstanceId":"i-xxx3",
				"ComponentDisplayName":"Tez Client",
				"HostId":"124902",
				"ServiceDisplayName":"Tez",
				"PrivateIp":"192.168.143.232",
				"HostName":"emr-worker-1",
				"InstanceType":"ecs.n4.xlarge",
				"SerialNumber":"asd1x1-af39-1c-32b27d83d4c3",
				"Status":"STARTED",
				"ServiceName":"TEZ",
				"PublicIp":"",
				"Role":"CORE",
				"ComponentName":"TezInit"
			},
			{
				"NeedRestart":false,
				"HostInstanceId":"i-xxx4",
				"ComponentDisplayName":"Tez Client",
				"HostId":"124901",
				"ServiceDisplayName":"Tez",
				"PrivateIp":"192.168.143.233",
				"HostName":"emr-worker-2",
				"InstanceType":"ecs.n4.xlarge",
				"SerialNumber":"1cc-2762-4d84-a430-xxx",
				"Status":"STARTED",
				"ServiceName":"TEZ",
				"PublicIp":"",
				"Role":"CORE",
				"ComponentName":"TezInit"
			}
		]
	}
}

Error codes

HTTP status code Error code Error message Description
403 Params.Illegal The specified parameters are wrongly formed. The error message returned because the format of the specified parameters is invalid.
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 resources of other users.
403 Invalid.Cluster.Status Invalid cluster status %s in status list. The error message returned because the status of the specified cluster is invalid.
403 Invalid.Cluster.Type Invalid cluster type %s in cluster type list. The error message returned because the type of the specified cluster is invalid.
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.