• MapReduce Service

mrs
  1. Help Center
  2. MapReduce Service
  3. API Reference
  4. APIs
  5. Cluster Management APIs
  6. Querying a Cluster List

Querying a Cluster List

Function

This API is used to view a list of clusters created by a user. This API is incompatible with Sahara.

URI

  • Format

    GET /v1.1/{project_id}/cluster_infos

  • Parameter description
    Table 1 URI parameter description

    Parameter

    Mandatory or Not

    Description

    project_id

    Yes

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

Request

  • Example:

    None

  • Parameter description
    Table 2 Request parameter description

    Parameter

    Mandatory or Not

    Description

    pageSize

    No

    Maximum number of clusters displayed on a page

    The value ranges from 1 to 2147483646.

    currentPage

    No

    Current page number

    clusterState

    No

    You can query a cluster list by cluster status.

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

    tags

    No

    You can search for a cluster by its tag. If you specify multiple tags, the relationship between them is AND.

    • The format of the tags parameter is tags=k1*v1,k2*v2,k3*v3.
    • When the values of some tags are null, the format is tags=k1,k2,k3*v3.

Response

  • Example:
    {
        "clusterTotal": 1,
        "clusters": [
            {
                "clusterId": "bc134369-294c-42b7-a707-b2036ba38524",
                "clusterName": "mrs_D0zW",
                "masterNodeNum": "2",
                "coreNodeNum": "3",
                "clusterState": "terminated",
                "createAt": "1498272043",
                "updateAt": "1498636753",
                "chargingStartTime": "1498273733",
                "log_collection": 1,
                "billingType": "Metered",
                "dataCenter":"eu-de",
                "vpc": null,            "fee": null,
                "hadoopVersion": null,
                "masterNodeSize": null,
                "coreNodeSize": null,
                "componentList": [
                    {
                      "componentId": "MRS 1.7.2_001",
                      "componentName": "Hadoop",
                      "componentVersion": "2.8.3",
                      "componentDesc": "A framework that allows for the distributed processing of large data sets across clusters."
                    },
                    {
                      "componentId": "MRS 1.7.2_003",
                      "componentName": "HBase",
                      "componentVersion": "1.3.1",
                      "componentDesc": "A scalable, distributed database that supports structured data storage for large tables."
                    },
                    {
                      "componentId": "MRS 1.7.2_002",
                      "componentName": "Spark",
                      "componentVersion": "2.2.1",
                      "componentDesc": "A fast and general engine for large-scale data processing."
                    },
                    {
                      "componentId": "MRS 1.7.2_004",
                      "componentName": "Hive",
                      "componentVersion": "1.2.1",
                      "componentDesc": "A data warehouse infrastructure that provides data summarization and ad hoc querying."
                    }
                ],
                "externalIp": null,
                "externalAlternateIp": null,
                "internalIp": null,
                "deploymentId": null,
                "remark": "",
                "orderId": null,
                "azId": null,
                "masterNodeProductId": null,
                "masterNodeSpecId": null,
                "coreNodeProductId": null,
                "coreNodeSpecId": null,
                "azName": "az10.dc1",
                "instanceId": null,
                "vnc": "v2/5a3314075bfa49b9ae360f4ecd333695/servers/e2cda891-232e-4703-995e-3b1406add01d/action",
                "tenantId": null,
                "volumeSize": 0,
                "volumeType": null,
                "subnetId": null,
                "subnetName": null,
                "securityGroupsId": null,
                "slaveSecurityGroupsId": null,
                "mrsManagerFinish": false,
                "stageDesc": "Installing MRS Manager",
                "safeMode": 0,
                "clusterVersion": null,
                "nodePublicCertName": null,
                "masterNodeIp": "unknown",
                "privateIpFirst": null,
                "errorInfo": "",
                "clusterType": 0,
                "taskNodeGroups": [
                   {
                     "groupName": "task_node_default_group",
                     "nodeNum": 1,
                     "nodeSize": "s1.8xlarge.linux.mrs",
                     "nodeSpecId": "cdc6035a249a40249312f5ef72a23cd7",
                     "vmProductId": "",
                     "vmSpecCode": null,
                     "nodeProductId": "dc970349d128460e960a0c2b826c427c",
                     "rootVolumeSize": 40,
                     "rootVolumeProductId": "16c1dcf0897249758b1ec276d06e0572",
                     "rootVolumeType": "SATA",
                     "rootVolumeResourceSpecCode": "",
                     "rootVolumeResourceType": "",
                     "dataVolumeType": "SATA",
                     "dataVolumeCount": 1,
                     "dataVolumeSize": 100,
                     "dataVolumeProductId": "16c1dcf0897249758b1ec276d06e0572",
                     "dataVolumeResourceSpecCode": "",
                     "dataVolumeResourceType": "",
                   }
                ],
             "masterDataVolumeType": "SATA",
             "masterDataVolumeSize": 200,
             "masterDataVolumeCount": 1,
             "coreDataVolumeType": "SATA",
             "coreDataVolumeSize": 100,
             "coreDataVolumeCount": 1,
            }
        ]
    }
  • Parameter description
    Table 3 Response parameter description

    Parameter

    Mandatory or Not

    Type

    Description

    clusterTotal

    Yes

    String

    Total number of clusters in a list

    clusters

    Yes

    Array

    Cluster parameter. For details, see Table 4.

    Table 4 clusters parameter description

    Parameter

    Mandatory or Not

    Type

    Description

    clusterId

    Yes

    String

    Cluster ID

    clusterName

    Yes

    String

    Cluster name

    masterNodeNum

    Yes

    String

    Number of Master nodes deployed in a cluster

    coreNodeNum

    Yes

    String

    Number of Core nodes deployed in a cluster

    clusterState

    Yes

    String

    Cluster status. Valid values include:
    • starting: The cluster is being started.
    • running: The cluster is running.
    • terminated: The cluster has been terminated.
    • failed: The cluster fails.
    • abnormal: The cluster is abnormal.
    • terminating: The cluster is being terminated.
    • frozen: The cluster has been frozen.
    • scaling-out: The cluster is being scaled out.
    • scaling-in: The cluster is being scaled in.

    createAt

    Yes

    String

    Cluster creation time, which is a 10-bit timestamp

    updateAt

    Yes

    String

    Cluster update time, which is a 10-bit timestamp

    billingType

    Yes

    String

    Cluster billing mode

    dataCenter

    Yes

    String

    Cluster work region

    vpc

    Yes

    String

    VPC name

    duration

    Yes

    String

    Cluster subscription duration

    fee

    Yes

    String

    Cluster creation fee, which is automatically calculated

    hadoopVersion

    Yes

    String

    Hadoop version

    masterNodeSize

    Yes

    String

    Instance specifications of a Master node

    coreNodeSize

    Yes

    String

    Instance specifications of a Core node

    componentList

    Yes

    Array

    Component list. For details, see Table 5.

    externalIp

    Yes

    String

    External IP address

    externalAlternateIp

    Yes

    String

    Backup external IP address

    internalIp

    Yes

    String

    Internal IP address

    deploymentId

    Yes

    String

    Cluster deployment ID

    remark

    Yes

    String

    Cluster remarks

    orderId

    Yes

    String

    Cluster creation order ID

    azId

    Yes

    String

    ID of an available zone

    masterNodeProductId

    Yes

    String

    Product ID of a Master node

    masterNodeSpecId

    Yes

    String

    Specification ID of a Master node

    coreNodeProductId

    Yes

    String

    Product ID of a Core node

    coreNodeSpecId

    Yes

    String

    Specification ID of a Core node

    azName

    Yes

    String

    Name of an available zone

    instanceId

    Yes

    String

    Instance ID

    vnc

    Yes

    String

    URI for remote login of an elastic cloud server

    tenantId

    Yes

    String

    Project ID

    volumeSize

    Yes

    Integer

    Disk storage space

    volumeType

    Yes

    String

    Disk type

    subnetId

    Yes

    String

    Subnet ID

    clusterType

    Yes

    String

    Cluster type

    subnetName

    Yes

    String

    Subnet name

    securityGroupsId

    Yes

    String

    Security group ID

    slaveSecurityGroupsId

    Yes

    String

    Security group ID of a non-Master node. Currently, one MRS cluster uses only one security group. Therefore, this field has been discarded.

    stageDesc

    No

    String

    Cluster operation progress description.

    The cluster installation progress includes:
    • Verifying cluster parameters: Cluster parameters are being verified.
    • Applying for cluster resources: Cluster resources are being applied for.
    • Creating VM: The VM is being created.
    • Initializing VM: The VM is being initialized.
    • Installing MRS Manager: MRS Manager is being installed.
    • Deploying cluster: The cluster is being deployed.
    • Cluster installation failed: Failed to install the cluster.
    The cluster expansion progress includes:
    • Preparing for cluster expansion: Cluster capacity expansion is being prepared.
    • Creating VM: The VM is being created.
    • Initializing VM: The VM is being initialized.
    • Adding node to the cluster: The node is being added to the cluster.
    • Cluster expansion failed: Failed to expand the cluster capacity.
    The cluster shrink progress includes:
    • Preparing for cluster shrink: The cluster shrink is being prepared.
    • Decommissioning instance: The instance is being decommissioned.
    • Deleting VM: The VM is being deleted.
    • Deleting node from the cluster: The node is being deleted from the cluster.
    • Cluster shrink failed: Failed to shrink the cluster.

    If the cluster installation, expansion, or shrink fails, stageDesc will display the failure cause. For details, see Table 5.

    mrsManagerFinish

    No

    boolean

    Whether MRS Manager installation is finished during cluster creation

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

    safeMode

    No

    String

    Running mode of an MRS cluster:

    • 0: normal mode
    • 1: security mode

    clusterVersion

    Yes

    String

    Cluster version

    nodePublicCertName

    Yes

    String

    Name of the key file

    masterNodeIp

    Yes

    String

    IP address of a Master node

    privateIpFirst

    Yes

    String

    Preferred private IP address

    errorInfo

    Yes

    String

    Error information

    chargingStartTime

    Yes

    String

    Start time of charging

    log_collection

    No

    Integer

    Whether to collect logs when cluster installation fails

    • 0: Not collect
    • 1: Collect

    task_node_groups

    Yes

    Object

    List of Task nodes. For details about parameter description, see Table 6.

    masterDataVolumeType

    Yes

    String

    Data disk storage type of the Master node, supporting SATA, SAS, and SSD currently

    masterDataVolumeSize

    Yes

    Integer

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

    Value range: 100 GB to 32000 GB

    masterDataVolumeCount

    Yes

    Integer

    Number of data disks of the Master node.

    The value can be set to 1 only.

    coreDataVolumeType

    Yes

    String

    Data disk storage type of the Core node, supporting SATA, SAS, and SSD currently

    coreDataVolumeSize

    Yes

    Integer

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

    Value range: 100 GB to 32000 GB

    coreDataVolumeCount

    Yes

    Integer

    Number of data disks of the Core node.

    Value range: 1 to 10

    Table 5 componentList parameter description

    Parameter

    Mandatory or Not

    Type

    Description

    componentId

    Yes

    String

    Component ID

    • Component IDs of MRS 1.7.2 are as follows:
      • MRS 1.7.2_001: Hadoop
      • MRS 1.7.2_002: Spark
      • MRS 1.7.2_003: HBase
      • MRS 1.7.2_004: Hive
      • MRS 1.7.2_005: Hue
      • MRS 1.7.2_006: Kafka
      • MRS 1.7.2_007: Storm
      • MRS 1.7.2_008: Loader
      • MRS 1.7.2_009: Flume
    • Component IDs of MRS 1.6.3 are as follows:
      • MRS 1.6.3_001: Hadoop
      • MRS 1.6.3_002: Spark
      • MRS 1.6.3_003: HBase
      • MRS 1.6.3_004: Hive
      • MRS 1.6.3_005: Hue
      • MRS 1.6.3_006: Kafka
      • MRS 1.6.3_007: Storm
      • MRS 1.6.3_008: Loader
      • MRS 1.6.3_009: Flume
    • Component IDs of MRS 1.6.0 are as follows:
      • MRS 1.6.0_001: Hadoop
      • MRS 1.6.0_002: Spark
      • MRS 1.6.0_003: HBase
      • MRS 1.6.0_004: Hive
      • MRS 1.6.0_005: Hue
      • MRS 1.6.0_006: Kafka
      • MRS 1.6.0_007: Storm
      • MRS 1.6.0_008: Loader
      • MRS 1.6.0_009: Flume
    • Component IDs of MRS 1.5.0 are as follows:
      • MRS 1.5.0_001: Hadoop
      • MRS 1.5.0_002: Spark
      • MRS 1.5.0_003: HBase
      • MRS 1.5.0_004: Hive
      • MRS 1.5.0_005: Hue
      • MRS 1.5.0_006: Kafka
      • MRS 1.5.0_007: Storm
      • MRS 1.5.0_008: Loader
      • MRS 1.5.0_009: Flume
    • Component IDs of MRS 1.3.0 are as follows:
      • MRS 1.3.0_001: Hadoop
      • MRS 1.3.0_002: Spark
      • MRS 1.3.0_003: HBase
      • MRS 1.3.0_004: Hive
      • MRS 1.3.0_005: Hue
      • MRS 1.3.0_006: Kafka
      • MRS 1.3.0_007: Storm

    For example, the component_id of Hadoop is MRS 1.7.2_001, MRS 1.6.3_001 , MRS 1.6.0_001, MRS 1.5.0_001 or MRS 1.3.0_001.

    componentName

    Yes

    String

    Component name

    MRS 1.5.0 or later supports components Hadoop, Spark, HBase, Hive, Hue, Loader, Flume, Kafka, and Storm.

    MRS 1.3.0 supports components Hadoop, Spark, HBase, Hive, Hue, Kafka, and Storm.

    componentVersion

    Yes

    String

    Component version

    • MRS 1.7.2 or later supports the following component versions:
      Component versions of an analysis cluster:
      • Hadoop: 2.8.3
      • Spark: 2.2.1
      • HBase: 1.3.1
      • Hive: 1.2.1
      • Hue: 3.11.0
      • Loader: 2.0.0
      Component versions of a streaming cluster:
      • Kafka: 0.10.0.0
      • Storm: 1.0.2
      • Flume: 1.6.0
    • MRS 1.6.0 and MRS 1.6.3 support the following component versions:
      Component versions of an analysis cluster:
      • Hadoop: 2.7.2
      • Spark: 2.1.0
      • HBase: 1.3.1
      • Hive: 1.2.1
      • Hue: 3.11.0
      • Loader: 2.0.0
      Component versions of a streaming cluster:
      • Kafka: 0.10.0.0
      • Storm: 1.0.2
      • Flume: 1.6.0
    • MRS 1.5.0 supports the following component versions:
      Component versions of an analysis cluster:
      • Hadoop: 2.7.2
      • Spark: 2.1.0
      • HBase: 1.0.2
      • Hive: 1.2.1
      • Hue: 3.11.0
      • Loader: 2.0.0
      Component versions of a streaming cluster:
      • Kafka: 0.10.0.0
      • Storm: 1.0.2
      • Flume: 1.6.0
    • MRS 1.3.0 supports the following component versions:
      Component versions of an analysis cluster:
      • Hadoop: 2.7.2
      • Spark: 1.5.1
      • HBase: 1.0.2
      • Hive: 1.2.1
      • Hue: 3.11.0
      Component versions of a streaming cluster:
      • Kafka: 0.10.0.0
      • Storm: 1.0.2

    componentDesc

    Yes

    String

    Component description

    Table 6 task_node_groups parameter description

    Parameter

    Mandatory or Not

    Type

    Description

    groupName

    Yes

    String

    Task node group name

    nodeNum

    Yes

    Integer

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

    nodeSize

    Yes

    String

    Instance specifications of a Task node. The configuration method of this parameter is the same as that of master_node_size.

    nodeSpecId

    Yes

    String

    Instance specification ID of a Task node

    nodeProductId

    Yes

    String

    Instance product ID of a Task node

    vmProductId

    Yes

    String

    VM product ID of a Task node

    vmSpecCode

    Yes

    String

    VM specifications of a Task node

    rootVolumeSize

    Yes

    Integer

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

    rootVolumeProductId

    Yes

    String

    System disk product ID of a Task node

    rootVolumeType

    Yes

    String

    System disk type of a Task node

    rootVolumeResourceSpecCode

    Yes

    String

    System disk specifications of a Task node

    rootVolumeResourceType

    Yes

    String

    System disk type of a Task node

    dataVolumeType

    Yes

    String

    Data disk storage type of the Task node, supporting SATA, SAS, and SSD currently

    • SATA: Common I/O
    • SAS: High I/O
    • SSD: Ultra-high I/O

    dataVolumeCount

    Yes

    Integer

    Number of data disks of a Task node

    dataVolumeSize

    Yes

    String

    Data disk storage space of a Task node

    dataVolumeProductId

    No

    String

    Data disk product ID of a Task node

    dataVolumeResourceSpecCode

    Yes

    String

    Data disk specifications of a Task node

    dataVolumeResourceType

    Yes

    String

    Data disk specifications of a Task node

Status Code

Table 7 describes the status code of this API.

Table 7 Status code

Status Code

Description

200

The cluster list information is successfully queried.

For details about error status codes, see Status Code.