• MapReduce Service

mrs
  1. Help Center
  2. MapReduce Service
  3. API Reference
  4. APIs
  5. Cluster Management APIs
  6. Viewing Cluster Details

Viewing Cluster Details

Function

This API is used to query detailed information about a cluster. This API is incompatible with Sahara.

URI

  • Format:

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

  • 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.

    cluster_id

    Yes

    Cluster ID

Request

  • Example:

    None.

  • Parameter description

    None.

Response

  • Example:
    {
        "cluster":{
            "clusterId":"bdb064ff-2855-4624-90d5-e9a6376abd6e",
            "clusterName":"c17022001",
            "masterNodeNum":"2",
            "coreNodeNum":"3",
            "clusterState":"scaling-in",
            "createAt":"1487570757",
            "updateAt":"1487668974",
            "billingType":"Metered",
            "dataCenter":"eu-de",
            "vpc":"20161218",
            "duration":"0",
            "fee":"0",
            "hadoopVersion":"",
            "masterNodeSize":"s1.8xlarge.linux.mrs",
            "coreNodeSize":"c2.2xlarge.linux.mrs",
            "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_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."
                },
                {
                    "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."
                }
            ],
            "externalIp":"100.64.49.9",
            "externalAlternateIp":"100.64.49.13",
            "internalIp":"192.168.1.242",
            "deploymentId":"4ac46ca7-a488-4b91-82c2-e4d7aa9c40c2",
            "remark":"",
            "orderId":"null",
            "azId":"1d7b939b382c4c3bb3481a8ca10da768",
            "masterNodeProductId":"b35cf2d2348a445ca74b32289a160882",
            "masterNodeSpecId":"8ab05e503b4c42abb304e2489560063b",
            "coreNodeProductId":"dc970349d128460e960a0c2b826c427c",
            "coreNodeSpecId":"cdc6035a249a40249312f5ef72a23cd7",
            "azName":"eu-de-01",
            "instanceId":"4ac46ca7-a488-4b91-82c2-e4d7aa9c40c2",
            "vnc":null,
            "tenantId":"3f99e3319a8943ceb15c584f3325d064",
            "volumeSize":100,
            "volumeType":"SATA",
            "subnetId": "6b96eec3-4f8d-4c83-93e2-6ec625001d7c",
            "subnetName":"subnet-f-test",
            "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
              }
                ],
           "mrsManagerFinish": false, 
           "stageDesc": "Installing MRS Manager",
            "safeMode":1,
            "clusterVersion":"MRS 1.7.2",
            "nodePublicCertName":"myp",
            "masterNodeIp":"192.168.1.242",
            "privateIpFirst":"192.168.1.234",
            "errorInfo":null,
            "tags":"k1=v1,k2=v2,k3=v3",
            "chargingStartTime":"0"
            "log_collection": 1,
            "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 2 Response 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
    • running
    • terminated
    • failed
    • abnormal
    • terminating
    • frozen
    • scaling-out
    • scaling-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 charging 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 specification of a Master node

    coreNodeSize

    Yes

    String

    Instance specification of a Core node

    componentList

    Yes

    Array

    Component list

    See Table 3.

    externalIp

    Yes

    String

    External IP address

    externalAlternateIp

    Yes

    String

    Backup external IP address

    internalIp

    Yes

    String

    Internal IP address

    deploymentId

    Yes

    String

    Deployment ID of a cluster

    remark

    Yes

    String

    Remarks of a cluster

    orderId

    Yes

    String

    Order ID for creating clusters

    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 availability zone

    instanceId

    Yes

    String

    Instance ID

    vnc

    Yes

    String

    URI address for remote login of the elastic cloud server

    tenantId

    Yes

    String

    Project ID

    volumeSize

    Yes

    Integer

    Size of a volume

    subnetId

    Yes

    String

    Subnet ID

    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. This field returns the same value as securityGroupsId does for compatibility consideration.

    bootstrap_scripts

    No

    Array

    Bootstrap action script information. For details, see Table 5.

    MRS 1.7.2 or later supports this parameter.

    stageDesc

    No

    String

    Cluster operation progress description

    The cluster installation progress includes:
    • Verifying cluster parameters
    • Applying for cluster resources
    • Creating VM
    • Initializing VM
    • Installing MRS Manager
    • Deploying cluster
    • Cluster installation failed
    The cluster expansion progress includes:
    • Preparing for cluster expansion
    • Creating VM
    • Initializing VM
    • Adding node to the cluster
    • Cluster expansion failed
    The cluster shrink progress includes:
    • Preparing for cluster shrink
    • Decommissioning instance
    • Deleting VM
    • Deleting node from the cluster
    • Cluster shrink failed

    stageDesc displays causes of cluster installation, expansion, and shrink failures. For details, see Table 5.

    mrsManagerFinish

    No

    boolean

    Whether MRS Manager installation is finished during cluster creation

    • true: Installation finished
    • false: Installation unfinished

    safeMode

    Yes

    String

    Running mode of an MRS cluster

    Possible values are:

    • 0: common mode
    • 1: safe 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

    Primary private IP address

    errorInfo

    Yes

    String

    Error information

    chargingStartTime

    Yes

    String

    Time when charging starts

    clusterType

    Yes

    String

    Cluster type

    log_collection

    No

    Integer

    Indicates whether logs are collected when cluster installation fails.

    0: not collected

    1: collected

    task_node_groups

    Yes

    Array

    List of Task nodes

    For the parameter description, see Table 4.

    masterDataVolumeType

    Yes

    String

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

    masterDataVolumeSize

    Yes

    Integer

    Data disk size of the Master node. Disks can be purchased at the same time when a cluster is created to enlarge storage capacity.

    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 size of the Core node. Disks can be purchased at the same time when a cluster is created to enlarge storage capacity.

    Value range: 100 GB to 32000 GB

    coreDataVolumeCount

    Yes

    Integer

    Number of data disks of the Core node

    Value range: 1 to 10

    scale

    No

    String

    The cluster nodes are being added or reduced or node specifications are being changed. If this parameter is empty, the cluster nodes are not changed.

    Possible values:

    • 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 node specifications fail to be upgraded for the last time.
    • scaling-up: The Master node specifications are being upgraded.
    • scaling_up_first: The standby Master node specifications are being upgraded.
    • scaled_up_first: The standby Master node specifications have been upgraded successfully.
    • scaled-up-success: The Master node specifications have been upgraded successfully.
    Table 3 componentList parameter description

    Parameter

    Mandatory or Not

    Type

    Description

    componentId

    Yes

    String

    Component ID

    • Component IDs supported by MRS 1.7.2 include:
      • 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 supported by MRS 1.6.3 include:
      • 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 supported by MRS 1.6.0 include:
      • 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 supported by MRS 1.5.0 include:
      • 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 supported by MRS 1.3.0 include:
      • 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, MRS 1.3.0_001.

    componentName

    Yes

    String

    Component name

    Currently, Hadoop, Spark, HBase, Hive, Hue, Loader, Flume, Kafka and Storm are supported. Loader and Flume are not supported by MRS 1.3.0.

    componentVersion

    Yes

    String

    Component version

    • MRS 1.7.2 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 4 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 specification of a Task node

    The configuration method of this parameter is identical to that of master_node_size.

    nodeSpecId

    Yes

    String

    Instance specification ID of the Task node

    nodeProductId

    Yes

    String

    Instance product ID of the Task node

    vmProductId

    Yes

    String

    VM product ID of the Task node

    vmSpecCode

    Yes

    String

    VM product specifications of the Task node

    rootVolumeSize

    Yes

    Integer

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

    rootVolumeProductId

    Yes

    String

    System disk product ID of the Task node

    rootVolumeType

    Yes

    String

    System disk type of the Task node

    rootVolumeResourceSpecCode

    Yes

    String

    System disk product specifications of the Task node

    rootVolumeResourceType

    Yes

    String

    System disk product type of the 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-speed I/O
    • SSD: Ultrahigh-speed I/O

    dataVolumeCount

    Yes

    Integer

    Number of data disks of the Task node

    dataVolumeSize

    Yes

    String

    Data disk size of the Task node

    dataVolumeProductId

    No

    String

    Data disk product ID of the Task node

    dataVolumeResourceSpecCode

    Yes

    String

    Data disk product specifications of the Task node

    dataVolumeResourceType

    Yes

    String

    Data disk product type of the Task node

    Table 5 bootstrap_scripts parameter description

    Parameter

    Mandatory or Not

    Type

    Description

    name

    Yes

    String

    Name of a bootstrap action script. A name of a bootstrap action script 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 a maximum of 1 to 64 characters.

    uri

    Yes

    String

    Path of the shell 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.

    parameters

    No

    String

    Bootstrap action script parameters

    nodes

    Yes

    Array String

    Type of a node where the bootstrap action script is executed, including Master, Core, and Task

    active_master

    No

    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

    No

    Boolean

    Time when the bootstrap action script is executed. Currently, the script can be executed before and after the component is started.

    The default value is false, indicating that the bootstrap action script is executed after the component is started.

    fail_action

    No

    String

    Whether to continue to execute subsequent scripts and creating a cluster after the bootstrap action script fails to be executed.

    • continue: Continue to execute subsequent scripts.
    • errorout: Stop the action.
    The default value is errorout, indicating that the action is stopped.
    NOTE:

    You are advised to set this parameter to continue in the debugging phase so that the cluster can continue to be installed and started no matter whether the bootstrap action is successful.

    start_time

    No

    String

    Execution time of one bootstrap action script

    state

    No

    String

    Running state of one bootstrap action script

    • PENDING
    • IN_PROGRESS
    • SUCCESS
    • FAILURE

Status Code

Table 6 describes the status code of this API.

Table 6 Status code

Status Code

Description

200

Details about a cluster are queried successfully.

For the description about error status codes, see section Status Codes.