You can call ListClusterHostComponent operation to query the components that are installed on each host of a 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 API operations, call API operations, and dynamically generate SDK sample 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. 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 No TEZ

The service name.

HostInstanceId String No i-xxx

The host instance ID, which is typically the ecsId.

HostName String No emr-worker-1

The names of the hosts on which the component is installed.

ComponentName String No TezInit

The name of the component to be queried.

ComponentStatus String No STARTED

The status of the component to be queried.

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.

Response parameters

Parameter Type Example Description
ComponentList Array of Component

The components installed on the host.

Component
CommissionStatus String None

A reserved parameter.

ComponentDisplayName String Tez Client

The display name of the component.

ComponentName String TezInit

The names of add-ons.

Cpu Integer 4

The number of vCPUs on the host.

HostId String 111

The ID of the host.

HostInstanceId String i-xxx

The host instance ID, which is typically ecsID DMS console as an administrator.

HostName String emr-worker-1

The names of the hosts on which the component is installed.

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

Of the host SerialNumber The message.

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 on each 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-F32FB31D8295****
&RegionId=cn-hangzhou
&<common request parameters>

Sample success responses

XML format

<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/>
        <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/>
        <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>

JSON Syntax


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