Querying Cluster Details
Function
This API is used to query details about a specified cluster. This API is incompatible with Sahara.
Constraints
None
Debugging
You can debug this API in API Explorer. Automatic authentication is supported. API Explorer can automatically generate sample SDK code and provide the sample SDK code debugging.
URI
- Format
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
cluster_id
Yes
String
Cluster ID For details about how to obtain the value, see Obtaining the MRS Cluster Information.
Request Parameters
None
Response Parameters
Parameter |
Type |
Description |
---|---|---|
cluster |
Cluster object |
Cluster parameters. For details, see Table 3. |
Parameter |
Type |
Description |
---|---|---|
clusterId |
String |
Cluster ID |
clusterName |
String |
Cluster name |
totalNodeNum |
String |
Total number of nodes deployed in a cluster |
clusterState |
String |
Cluster status. (The status is in English by default. When the X-Language request header is set to zh-cn, this field returns Chinese text.) The options are as follows:
|
stageDesc |
String |
Cluster progress description. (The description is in English by default. When the X-Language request header is set to zh-cn, this field returns Chinese text.) The cluster installation progress includes:
The cluster scale-out progress includes:
The cluster scale-in progress includes:
If the cluster installation, scale-out, or scale-in fails, stageDesc will display the failure cause. |
createAt |
String |
Cluster creation time, which is a 10-bit timestamp |
updateAt |
String |
Cluster update time, which is a 10-bit timestamp |
chargingStartTime |
String |
Start time of billing |
billingType |
String |
Cluster billing mode. The options are as follows:
|
dataCenter |
String |
Cluster work region |
vpc |
String |
VPC name |
vpcId |
String |
VPC ID |
duration |
String |
Cluster subscription duration |
fee |
String |
Cluster creation fee, which is automatically calculated |
hadoopVersion |
String |
Hadoop version |
componentList |
Array |
Component list. For details, see Table 4. |
externalIp |
String |
External IP address |
externalAlternateIp |
String |
Backup external IP address |
internalIp |
String |
Internal IP address |
deploymentId |
String |
Cluster deployment ID |
remark |
String |
Cluster remarks |
orderId |
String |
Cluster creation order ID |
azId |
String |
AZ ID |
azName |
String |
AZ name |
azCode |
String |
AZ name (en). |
availabilityZoneId |
String |
AZ. |
instanceId |
String |
Instance ID |
vnc |
String |
URI for remotely logging in to an ECS |
tenantId |
String |
Project ID |
volumeSize |
Integer |
Disk storage space |
volumeType |
String |
Disk type. |
subnetId |
String |
Subnet ID |
subnetName |
String |
Subnet name |
securityGroupsId |
String |
Security group ID |
slaveSecurityGroupsId |
String |
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. |
bootstrapScripts |
Array of BootstrapScript objects |
Bootstrap action script information. For more parameter description, see Table 6. |
safeMode |
Integer |
Running mode of an MRS cluster
|
clusterVersion |
String |
Cluster version |
nodePublicCertName |
String |
Name of the public key file |
masterNodeIp |
String |
IP address of a Master node |
privateIpFirst |
String |
Preferred private IP address |
errorInfo |
String |
Error message |
tags |
String |
Tag information |
masterNodeNum |
String |
Number of Master nodes deployed in a cluster |
coreNodeNum |
String |
Number of Core nodes deployed in a cluster |
masterNodeSize |
String |
Instance specifications of a Master node |
coreNodeSize |
String |
Instance specifications of a Core node |
masterNodeProductId |
String |
Product ID of a Master node |
masterNodeSpecId |
String |
Specification ID of a Master node |
coreNodeProductId |
String |
Product ID of a Core node |
coreNodeSpecId |
String |
Specification ID of a Core node |
masterDataVolumeType |
String |
Data disk storage type of the Master node. Currently, SATA, SAS, and SSD are supported. |
masterDataVolumeSize |
Integer |
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. Value range: 100 GB to 32,000 GB |
masterDataVolumeCount |
Integer |
Number of data disks of the Master node. The value can be set to 1 only. |
coreDataVolumeType |
String |
Data disk storage type of the Core node. Currently, SATA, SAS, and SSD are supported. |
coreDataVolumeSize |
Integer |
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. You only need to enter a number without the unit GB. Value range: 100 GB to 32,000 GB |
coreDataVolumeCount |
Integer |
Number of data disks of the Core node. Value range: 1 to 10 |
enterpriseProjectId |
String |
Enterprise project ID |
isMrsManagerFinish |
Boolean |
Whether MRS Manager installation is finished during cluster creation.
|
clusterType |
Integer |
Cluster type. The options are as follows:
|
logCollection |
Integer |
Whether to collect logs when cluster installation fails
|
periodType |
Integer |
Whether the subscription type is yearly or monthly
|
scale |
String |
Node change status. If this parameter is left blank, no change operation is performed on a cluster node. (The status is in English by default. When the X-Language request header is set to zh-cn, this field returns Chinese text.) The options are as follows:
|
nodeGroups |
List<NodeGroup> |
List of Master, Core and Task nodes. For more parameter description, see Table 5. |
taskNodeGroups |
List<NodeGroup> |
List of Task nodes. For more parameter description, see Table 5. |
eipId |
String |
Unique ID of the cluster EIP |
eipAddress |
String |
IPv4 address of the cluster EIP |
eipv6Address |
String |
IPv6 address of the cluster EIP. This parameter is not returned when an IPv4 address is used. |
Parameter |
Type |
Description |
---|---|---|
componentId |
String |
Component ID For example, the component_id of Hadoop is MRS 3.0.2_001, MRS 2.1.0_001, MRS 1.9.2_001, MRS 1.8.10_001. |
componentName |
String |
Component name |
componentVersion |
String |
Component version |
componentDesc |
String |
Component description |
Parameter |
Type |
Description |
---|---|---|
GroupName |
String |
Node group name. |
NodeNum |
Integer |
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. |
NodeSize |
String |
Instance specifications of a node. |
NodeSpecId |
String |
Instance specification ID of a node |
NodeProductId |
String |
Instance product ID of a node |
VmProductId |
String |
VM product ID of a node |
VmSpecCode |
String |
VM specifications of a node |
RootVolumeSize |
Integer |
System disk size of a node. This parameter is not configurable and its default value is 40 GB. |
RootVolumeProductId |
String |
System disk product ID of a node |
RootVolumeType |
String |
System disk type of a node |
RootVolumeResourceSpecCode |
String |
System disk product specifications of a node |
RootVolumeResourceType |
String |
System disk product type of a node |
DataVolumeType |
String |
Data disk storage type of a node. Currently, SATA, SAS, and SSD are supported.
|
DataVolumeCount |
Integer |
Number of data disks of a node. |
DataVolumeSize |
Integer |
Data disk storage space of a node. |
DataVolumeProductId |
String |
Data disk product ID of a node |
DataVolumeResourceSpecCode |
String |
Data disk product specifications of a node |
DataVolumeResourceType |
String |
Data disk product type of a node |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Name of a bootstrap action script. It must be unique in a cluster. The value can contain only digits, letters, spaces, hyphens (-), and underscores (_) and cannot start with a space. The value can contain 1 to 64 characters. |
uri |
String |
Path of the shell script. Set this parameter to an OBS bucket path or a local VM path.
|
parameters |
String |
Bootstrap action script parameters |
nodes |
Array String |
Type of a node where the bootstrap action script is executed. The value can be Master, Core, or Task. |
active_master |
Boolean |
Whether the bootstrap action script runs only on active Master nodes. The default value is false, indicating that the bootstrap action script can run on all Master nodes. |
before_component_start |
Boolean |
Time when the bootstrap action script is executed. Currently, the following two options are available: Before component start and After component start The default value is false, indicating that the bootstrap action script is executed after the component is started. |
fail_action |
String |
Whether to continue executing subsequent scripts and creating a cluster after the bootstrap action script fails to be executed.
The default value is errorout, indicating that the action is stopped.
NOTE:
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. |
start_time |
Long |
Execution time of one boot operation script. |
state |
String |
Running state of one bootstrap action script
|
action_stages |
Array of strings |
Select the time when the bootstrap action script is executed.
|
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" : "cn-hk1", "vpc" : "vpc-autotest", "vpcId" : "e2978efd-ca12-4058-9332-1ca0bfbab592", "duration" : "0", "fee" : "0", "hadoopVersion" : "", "masterNodeSize" : "s3.2xlarge.2.linux.bigdata", "coreNodeSize" : "s3.2xlarge.2.linux.bigdata", "componentList" : [ { "componentId" : "MRS 3.2.0-LTS.1_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.2.0-LTS.1_002", "componentName" : "Spark", "componentVersion" : "2.3.2", "componentDesc" : "A fast and general engine for large-scale data processing." }, { "componentId" : "MRS 3.2.0-LTS.1_004", "componentName" : "Hive", "componentVersion" : "3.1.0", "componentDesc" : "A data warehouse infrastructure that provides data summarization and ad hoc querying." }, { "componentId" : "MRS 3.2.0-LTS.1_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", "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.2.0-LTS.1", "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" : "s3.xlarge.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" : "s3.xlarge.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" : "s3.xlarge.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" : "s3.xlarge.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", "periodType" : "0" } }
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot