Updated on 2024-11-29 GMT+08:00

Querying Cluster Details

Function

This API is used to query details about a specified cluster. This API is incompatible with Sahara.

URI

  • Format

    GET /v1.1/{project_id}/cluster_infos/{cluster_id}

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Explanation

    Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

    Constraints

    N/A

    Value range

    The value must consist of 1 to 64 characters. Only letters and digits are allowed.

    Default value

    N/A

    cluster_id

    Yes

    String

    Explanation

    Cluster ID If this parameter is specified, the latest metadata of the cluster that has been patched will be obtained. For details about how to obtain the cluster ID, see Obtaining a Cluster ID.

    Constraints

    N/A

    Value range

    The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-).

    Default value

    N/A

Request Parameters

None

Response Parameters

Table 2 Response body parameter

Parameter

Type

Description

cluster

Cluster object

Explanation

Cluster parameters. For details, see Table 3.

Table 3 Response parameters

Parameter

Type

Description

clusterId

String

Explanation

Cluster ID.

Value range

N/A

clusterName

String

Explanation

Cluster name.

Value range

N/A

totalNodeNum

String

Explanation

Total number of nodes deployed in a cluster.

Value range

N/A

clusterState

String

Explanation

Cluster status.

Value range

  • starting: The cluster is being started.
  • running: The cluster is running.
  • terminated: The cluster has been deleted.
  • failed: The cluster is failed.
  • abnormal: The cluster is abnormal.
  • terminating: The cluster is being deleted.
  • frozen: The cluster is frozen.
  • scaling-out: The cluster is being scaled out.
  • scaling-in: The cluster is being scaled in.

stageDesc

String

Explanation

Cluster process.

Value range

The cluster installation progress includes:
  • Verifying cluster parameters: Cluster parameters are being verified.
  • Applying for cluster resources: Cluster resources are being applied for.
  • Creating VMs: The VMs are being created.
  • Initializing VMs: The VMs are being initialized.
  • Installing MRS Manager: MRS Manager is being installed.
  • Deploying the cluster: The cluster is being deployed.
  • Cluster installation failed: Failed to install the cluster.
The cluster scale-out progress includes:
  • Preparing for scale-out: Cluster scale-out is being prepared.
  • Creating VMs: The VMs are being created.
  • Initializing VMs: The VMs are being initialized.
  • Adding nodes to the cluster: The nodes are being added to the cluster.
  • Scale-out failed: Failed to scale out the cluster.
The cluster scale-in progress includes:
  • Preparing for scale-in: Cluster scale-in is being prepared.
  • Decommissioning instance: The instance is being decommissioned.
  • Deleting VMs: The VMs are being deleted.
  • Deleting nodes from the cluster: The nodes are being deleted from the cluster.
  • Scale-in failed: Failed to scale in the cluster.

If the cluster installation, scale-out, or scale-in fails, stageDesc will display the failure cause.

createAt

String

Explanation

Cluster creation time, which is a 10-bit timestamp.

Value range

N/A

updateAt

String

Explanation

Cluster update time, which is a 10-bit timestamp.

Value range

N/A

dataCenter

String

Explanation

Cluster work region.

Value range

N/A

vpc

String

Explanation

VPC name.

Value range

N/A

vpcId

String

Explanation

VPC ID.

Value range

N/A

hadoopVersion

String

Explanation

Hadoop version.

Value range

N/A

componentList

Array

Explanation

Component list. For details, see Table 4.

externalIp

String

Explanation

External IP address This IP address is opened to the outside of the cluster as access to the active Master process.

Value range

N/A

externalAlternateIp

String

Explanation

Backup external IP address. This IP address is used outside the cluster as access to the standby Master process.

Value range

N/A

internalIp

String

Explanation

Internal IP address This IP address is used within the cluster as access to Master processes.

Value range

N/A

deploymentId

String

Explanation

Cluster deployment ID. The ID is used by cloud services to query details about cluster deployment tasks.

Value range

N/A

remark

String

Explanation

Cluster remarks. By default, this parameter is left blank.

Value range

N/A

orderId

String

Explanation

Cluster creation order ID.

Value range

N/A

azId

String

Explanation

AZ ID

Value range

N/A

azName

String

Explanation

AZ name.

Value range

N/A

azCode

String

Explanation

AZ name (en).

Value range

N/A

availabilityZoneId

String

Explanation

Availability zone.

Value range

N/A

instanceId

String

Explanation

Instance ID.

Value range

N/A

vnc

String

Explanation

URI for remotely logging in to an ECS.

Value range

N/A

tenantId

String

Explanation

Project ID.

Value range

N/A

volumeSize

Integer

Explanation

Disk storage space.

Value range

N/A

volumeType

String

Explanation

Disk type.

Value range

N/A

subnetId

String

Explanation

Subnet ID.

Value range

N/A

subnetName

String

Explanation

Subnet name.

Value range

N/A

securityGroupsId

String

Explanation

Security group ID.

Value range

N/A

slaveSecurityGroupsId

String

Explanation

Security group ID of a non-master node. Currently, one MRS cluster uses only one security group. Therefore, this field has been discarded. This field returns the same value as securityGroupsId does for compatibility consideration.

Value range

N/A

bootstrapScripts

Array of BootstrapScript objects

Explanation

Bootstrap action script information. For more parameter description, see Table 6.

safeMode

Integer

Explanation

Run mode of an MRS cluster.

Value range

  • 0: Normal cluster
  • 1: Security cluster

clusterVersion

String

Explanation

Cluster version.

Value range

N/A

nodePublicCertName

String

Explanation

Name of the key file.

Value range

N/A

masterNodeIp

String

Explanation

IP address of a Master node.

Value range

N/A

privateIpFirst

String

Explanation

Preferred private IP address.

Value range

N/A

errorInfo

String

Explanation

Error message.

Value range

N/A

tags

String

Explanation

Tag information.

Value range

N/A

masterNodeNum

String

Explanation

Number of Master nodes deployed in a cluster.

Value range

N/A

coreNodeNum

String

Explanation

Number of Core nodes deployed in a cluster.

Value range

N/A

masterNodeSize

String

Explanation

Instance specifications of a Master node.

Value range

N/A

coreNodeSize

String

Explanation

Instance specifications of a Core node.

Value range

N/A

masterNodeProductId

String

Explanation

Product ID of a Master node.

Value range

N/A

masterNodeSpecId

String

Explanation

Specification ID of a Master node.

Value range

N/A

coreNodeProductId

String

Explanation

Product ID of a Core node.

Value range

N/A

coreNodeSpecId

String

Explanation

Specification ID of a Core node.

Value range

N/A

masterDataVolumeType

String

Explanation

Data disk storage type of the Master node. Currently, SATA, SAS, and SSD are supported.

Value range

N/A

masterDataVolumeSize

Integer

Explanation

Data disk storage space of the Master node. To increase data storage capacity, you can add disks at the same time when creating a cluster. Unit: GB.

Value range

100-32000

masterDataVolumeCount

Integer

Explanation

Number of data disks of the Master node.

Value range

The value can only be 1.

coreDataVolumeType

String

Explanation

Data disk storage type of the Core node. Currently, SATA, SAS, and SSD are supported.

Value range

N/A

coreDataVolumeSize

Integer

Explanation

Data disk storage space of the Core node. To increase data storage capacity, you can add disks at the same time when creating a cluster. Unit: GB.

Value range

100-32000

coreDataVolumeCount

Integer

Explanation

Number of data disks of the Core node.

Value range

1-10

isMrsManagerFinish

Boolean

Explanation

Whether MRS Manager installation is finished during cluster creation.

Value range

  • true: MRS Manager installation is finished.
  • false: MRS Manager installation is not finished.

clusterType

Integer

Explanation

Cluster type.

Value range

  • 0: analysis cluster
  • 1: streaming cluster
  • 2: hybrid cluster
  • 3: custom cluster
  • 4: Offline cluster

logCollection

Integer

Explanation

Whether to collect logs when cluster installation fails

Value range

  • 0: Do not collect.
  • 1: Collect.

scale

String

Explanation

Node change status. If this parameter is left blank, no change operation is performed on a cluster node.

Value range

  • scaling-out: The cluster is being scaled out.
  • scaling-in: The cluster is being scaled in.
  • scaling-error: The cluster is in the running state and fails to be scaled in or out or the specifications fail to be scaled up for the last time.
  • scaling-up: The Master node specifications are being scaled up.
  • scaling_up_first: The standby Master node specifications are being scaled up.
  • scaled_up_first: The standby Master node specifications have been scaled up successfully.
  • scaled-up-success: The master node specifications have been scaled up.

nodeGroups

List<NodeGroup>

Explanation

List of Master, Core and Task nodes. For details about this parameter, see Table 5.

taskNodeGroups

List<NodeGroup>

Explanation

List of Task nodes. For more parameter description, see Table 5.

eipId

String

Explanation

Unique ID of the cluster EIP

Value range

N/A

eipAddress

String

Explanation

IPv4 address of the cluster EIP.

Value range

N/A

eipv6Address

String

Explanation

IPv6 address of the cluster EIP. This parameter is not returned when an IPv4 address is used.

Value range

N/A

Table 4 componentAmb

Parameter

Type

Description

componentId

String

Explanation

Component ID

Value range

For example, the component_id of Hadoop is MRS 3.3.1-LTS_001.

componentName

String

Explanation

Component name.

Value range

N/A

componentVersion

String

Explanation

Component version.

Value range

N/A

componentDesc

String

Explanation

Component description.

Value range

N/A

Table 5 NodeGroupV10

Parameter

Type

Description

GroupName

String

Explanation

Node group name.

Value range

N/A

NodeNum

Integer

Explanation

Number of nodes. The value ranges from 0 to 500. The minimum number of Master and Core nodes is 1 and the total number of Core and Task nodes cannot exceed 500.

Value range

0-500

NodeSize

String

Explanation

Instance specifications of a node.

Value range

N/A

NodeSpecId

String

Explanation

Instance specification ID of a node.

Value range

N/A

NodeProductId

String

Explanation

Instance product ID of a node.

Value range

N/A

VmProductId

String

Explanation

VM specifications of a node.

Value range

N/A

VmSpecCode

String

Explanation

VM specifications of a node.

Value range

N/A

RootVolumeSize

Integer

Explanation

System disk size of a node. This parameter is not configurable and its default value is 40 GB.

Value range

N/A

RootVolumeProductId

String

Explanation

System disk product ID of a node.

Value range

N/A

RootVolumeType

String

Explanation

System disk type of a node.

Value range

N/A

RootVolumeResourceSpecCode

String

Explanation

System disk product specifications of a node.

Value range

N/A

RootVolumeResourceType

String

Explanation

System disk product type of a node.

Value range

N/A

DataVolumeType

String

Explanation

Data disk storage type of a node. Currently, SATA, SAS, and SSD are supported.

Value range

  • SATA: common I/O
  • SAS: high I/O
  • SSD: ultra-high I/O

DataVolumeCount

Integer

Explanation

Number of data disks of a node.

Value range

N/A

DataVolumeSize

Integer

Explanation

Data disk storage space of a node.

Value range

N/A

DataVolumeProductId

String

Explanation

Data disk product ID of a node.

Value range

N/A

DataVolumeResourceSpecCode

String

Explanation

Data disk specifications of a node.

Value range

N/A

DataVolumeResourceType

String

Explanation

Data disk type of a node.

Value range

N/A

Table 6 BootstrapScripts

Parameter

Type

Description

name

String

Explanation

Name of a bootstrap action script.

Constraints

N/A

Value range

The names of bootstrap action scripts in the same cluster must be unique. The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-), and cannot start with a space.

Default value

N/A

uri

String

Explanation

Path of a bootstrap action script. Set this parameter to an OBS bucket path or a local VM path.

  • OBS bucket path: Enter a script path manually. For example, enter the path of the public sample script provided by MRS. Example: s3a://bootstrap/presto/presto-install.sh. If dualroles is installed, the parameter of the presto-install.sh script is dualroles. If worker is installed, the parameter of the presto-install.sh script is worker. Based on the Presto usage habit, you are advised to install dualroles on the active Master nodes and worker on the Core nodes.
  • Local VM path: Enter a script path. The script path must start with a slash (/) and end with .sh.

Constraints

N/A

Value range

N/A

Default value

N/A

parameters

String

Explanation

Bootstrap action script parameters.

Constraints

N/A

Value range

N/A

Default value

N/A

nodes

Array String

Explanation

Type of a node where the bootstrap action script is executed. The value can be Master, Core, or Task.

Constraints

The node type must be represented in lowercase letters.

active_master

Boolean

Explanation

Whether the bootstrap action script runs only on active Master nodes.

Constraints

N/A

Value range

  • true: The bootstrap action script runs only on active Master nodes.
  • false: The bootstrap action script can run on all Master nodes.

Default value

false

before_component_start

Boolean

Explanation

Time when the bootstrap action script is executed. Currently, the following two options are available: Before component start and After component start

Constraints

N/A

Value range

  • true: The bootstrap action script is executed before the component starts.
  • false: The bootstrap action script is executed after the component starts.

Default value

false

fail_action

String

Explanation

Whether to continue executing subsequent scripts and creating a cluster after the bootstrap action script fails to be executed. You are advised to set this parameter to continue in the commissioning phase so that the cluster can continue to be installed and started no matter whether the bootstrap action is successful.

Constraints

N/A

Value range

  • continue: Continue to execute subsequent scripts.
  • errorout: Stop the action.

Default value

errorout

action_stages

Array of strings

Explanation

Select the time when the bootstrap action script is executed.

  • BEFORE_COMPONENT_FIRST_START: before initial component starts
  • AFTER_COMPONENT_FIRST_START: after initial component starts
  • BEFORE_SCALE_IN: before scale-in
  • AFTER_SCALE_IN: after scale-in
  • BEFORE_SCALE_OUT: before scale-out
  • AFTER_SCALE_OUT: after scale-out

Constraints

N/A

Example Request

GET /v1.1/{project_id}/cluster_infos/{cluster_id}

Example response

Status code: 200

Cluster details are queried successfully.

{
  "cluster" : {
    "clusterId" : "bdb064ff-2855-4624-90d5-e9a6376abd6e",
    "clusterName" : "c17022001",
    "masterNodeNum" : "2",
    "coreNodeNum" : "3",
    "clusterState" : "scaling-in",
    "stageDesc" : "Installing MRS Manager",
    "createAt" : "1487570757",
    "updateAt" : "1487668974",
    "billingType" : "Metered",
    "dataCenter" : "",
    "vpc" : "vpc-autotest",
    "vpcId" : "e2978efd-ca12-4058-9332-1ca0bfbab592",
    "duration" : "0",
    "fee" : "0",
    "hadoopVersion" : "",
    "masterNodeSize" : "c3.2xlarge.2.linux.bigdata",
    "coreNodeSize" : "c3.2xlarge.2.linux.bigdata",
    "componentList" : [ {
      "componentId" : "MRS 3.3.1-LTS_001",
      "componentName" : "Hadoop",
      "componentVersion" : "3.1.1",
      "componentDesc" : "A framework that allows for the distributed processing of large data sets across clusters."
    }, {
      "componentId" : "MRS 3.3.1-LTS_002",
      "componentName" : "Spark",
      "componentVersion" : "2.3.2",
      "componentDesc" : "A fast and general engine for large-scale data processing."
    }, {
      "componentId" : "MRS 3.3.1-LTS_004",
      "componentName" : "Hive",
      "componentVersion" : "3.1.0",
      "componentDesc" : "A data warehouse infrastructure that provides data summarization and ad hoc querying."
    }, {
      "componentId" : "MRS 3.3.1-LTS_003",
      "componentName" : "HBase",
      "componentVersion" : "2.1.1",
      "componentDesc" : "A scalable, distributed database that supports structured data storage for large tables."
    } ],
    "externalIp" : "100.XXX.XXX.XXX",
    "externalAlternateIp" : "100.XXX.XXX.XXX",
    "internalIp" : "192.XXX.XXX.XXX",
    "eipId" : "b16dd5eb-5e5b-486a-906a-2e8f6e814a7a",
    "eipAddress" : "100.XXX.XXX.XXX",
    "eipv6Address" : "2403:XXXX:XXXX::XXXX:XXXX",
    "deploymentId" : "4ac46ca7-a488-4b91-82c2-e4d7aa9c40c2",
    "remark" : "",
    "orderId" : "null",
    "azId" : "null",
    "masterNodeProductId" : "b35cf2d2348a445ca74b32289a160882",
    "masterNodeSpecId" : "8ab05e503b4c42abb304e2489560063b",
    "coreNodeProductId" : "dc970349d128460e960a0c2b826c427c",
    "coreNodeSpecId" : "cdc6035a249a40249312f5ef72a23cd7",
    "azName" : "az1.cn-fcs-1a",
    "instanceId" : "4ac46ca7-a488-4b91-82c2-e4d7aa9c40c2",
    "vnc" : null,
    "tenantId" : "3f99e3319a8943ceb15c584f3325d064",
    "volumeSize" : "600",
    "volumeType" : "SATA",
    "subnetId" : "6b96eec3-4f8d-4c83-93e2-6ec625001d7c",
    "subnetName" : "subnet-ftest",
    "securityGroupsId" : "930e34e2-195d-401f-af07-0b64ea6603f8",
    "slaveSecurityGroupsId" : "2ef3343e-3477-4a0d-80fe-4d874e4f81b8",
    "bootstrapScripts" : [ {
      "name" : "test1-success",
      "uri" : "s3a://bootscript/script/simple/basic_success.sh",
      "parameters" : "",
      "nodes" : [ "master", "core" ],
      "active_master" : true,
      "fail_action" : "errorout",
      "before_component_start" : true,
      "state" : "SUCCESS",
      "start_time" : 1527681083,
      "action_stages" : [ "AFTER_SCALE_IN", "AFTER_SCALE_OUT" ]
    } ],
    "isMrsManagerFinish" : false,
    "safeMode" : "1",
    "clusterVersion" : "MRS 3.3.1-LTS",
    "nodePublicCertName" : "myp",
    "masterNodeIp" : "192.XXX.XXX.XXX",
    "privateIpFirst" : "192.XXX.XXX.XXX",
    "errorInfo" : null,
    "tags" : "k1=v1,k2=v2,k3=v3",
    "clusterType" : "",
    "logCollection" : "1",
    "nodeGroups" : [ {
      "GroupName" : "master_node_default_group",
      "NodeNum" : "1",
      "NodeSize" : "c3.2xlarge.2.linux.bigdata",
      "NodeSpecId" : "cdc6035a249a40249312f5ef72a23cd7",
      "VmProductId" : "",
      "VmSpecCode" : null,
      "NodeProductId" : "dc970349d128460e960a0c2b826c427c",
      "RootVolumeSize" : "480",
      "RootVolumeProductId" : "16c1dcf0897249758b1ec276d06e0572",
      "RootVolumeType" : "SATA",
      "RootVolumeResourceSpecCode" : "",
      "RootVolumeResourceType" : "",
      "DataVolumeType" : "SATA",
      "DataVolumeCount" : "1",
      "DataVolumeSize" : "600",
      "DataVolumeProductId" : "16c1dcf0897249758b1ec276d06e0572",
      "DataVolumeResourceSpecCode" : "",
      "DataVolumeResourceType" : ""
    }, {
      "GroupName" : "core_node_analysis_group",
      "NodeNum" : "1",
      "NodeSize" : "c3.2xlarge.2.linux.bigdata",
      "NodeSpecId" : "cdc6035a249a40249312f5ef72a23cd7",
      "VmProductId" : "",
      "VmSpecCode" : null,
      "NodeProductId" : "dc970349d128460e960a0c2b826c427c",
      "RootVolumeSize" : "480",
      "RootVolumeProductId" : "16c1dcf0897249758b1ec276d06e0572",
      "RootVolumeType" : "SATA",
      "RootVolumeResourceSpecCode" : "",
      "RootVolumeResourceType" : "",
      "DataVolumeType" : "SATA",
      "DataVolumeCount" : "1",
      "DataVolumeSize" : "600",
      "DataVolumeProductId" : "16c1dcf0897249758b1ec276d06e0572",
      "DataVolumeResourceSpecCode" : "",
      "DataVolumeResourceType" : ""
    }, {
      "GroupName" : "task_node_analysis_group",
      "NodeNum" : "1",
      "NodeSize" : "c3.2xlarge.2.linux.bigdata",
      "NodeSpecId" : "cdc6035a249a40249312f5ef72a23cd7",
      "VmProductId" : "",
      "VmSpecCode" : null,
      "NodeProductId" : "dc970349d128460e960a0c2b826c427c",
      "RootVolumeSize" : "480",
      "RootVolumeProductId" : "16c1dcf0897249758b1ec276d06e0572",
      "RootVolumeType" : "SATA",
      "RootVolumeResourceSpecCode" : "",
      "RootVolumeResourceType" : "",
      "DataVolumeType" : "SATA",
      "DataVolumeCount" : "1",
      "DataVolumeSize" : "600",
      "DataVolumeProductId" : "16c1dcf0897249758b1ec276d06e0572",
      "DataVolumeResourceSpecCode" : "",
      "DataVolumeResourceType" : ""
    } ],
    "taskNodeGroups" : [ {
      "GroupName" : "task_node_default_group",
      "NodeNum" : "1",
      "NodeSize" : "c3.2xlarge.2.linux.bigdata",
      "NodeSpecId" : "cdc6035a249a40249312f5ef72a23cd7",
      "VmProductId" : "",
      "VmSpecCode" : null,
      "NodeProductId" : "dc970349d128460e960a0c2b826c427c",
      "RootVolumeSize" : "480",
      "RootVolumeProductId" : "16c1dcf0897249758b1ec276d06e0572",
      "RootVolumeType" : "SATA",
      "RootVolumeResourceSpecCode" : "",
      "RootVolumeResourceType" : "",
      "DataVolumeType" : "SATA",
      "DataVolumeCount" : "1",
      "DataVolumeSize" : "600",
      "DataVolumeProductId" : "16c1dcf0897249758b1ec276d06e0572",
      "DataVolumeResourceSpecCode" : "",
      "DataVolumeResourceType" : ""
    } ],
    "masterDataVolumeType" : "SATA",
    "masterDataVolumeSize" : "600",
    "masterDataVolumeCount" : "1",
    "coreDataVolumeType" : "SATA",
    "coreDataVolumeSize" : "600",
    "coreDataVolumeCount" : "1",
  }
}

Status Codes

Table 7 describes the status code.

Table 7 Status code

Status Code

Description

200

Cluster details have been queried.

See Status Codes.

Error Codes

See Error Codes.