查询集群列表
功能介绍
查看用户创建的集群列表信息。该接口不兼容Sahara。
URI
- URI格式
    
GET /v1.1/{project_id}/cluster_infos?pageSize={page_size}¤tPage={current_page}&clusterState={cluster_state}&tags={tags}
 - 参数说明 
    
表1 URI参数说明 名称
是否必选
说明
project_id
是
项目编号。获取方法,请参见获取项目ID。
pageSize
否
分页查询每页返回的最大集群数量。
取值范围:[1~2147483646]
currentPage
否
当前查询页码。
clusterState
否
根据集群状态查询集群列表。
- starting:查询启动中的集群列表。
 - running:查询运行中的集群列表。
 - terminated:查询已删除的集群列表。
 - failed:查询失败的集群列表。
 - abnormal:查询异常的集群列表。
 - terminating:查询删除中的集群列表。
 - frozen:查询已冻结的集群列表。
 - scaling-out:查询扩容中的集群列表。
 - scaling-in:查询缩容中的集群列表。
 
tags
否
可以通过集群的标签来搜索指定标签的集群,当指定多个tag进行查询时,标签之间是与的关系。
- tags参数的格式为tags=k1*v1,k2*v2,k3*v3
 - 当标签的value为空时,格式为tags=k1,k2,k3*v3
 
 
请求消息
无
响应消息
| 
        参数名  | 
      
        参数类型  | 
      
        说明  | 
     
|---|---|---|
| 
        clusterTotal  | 
      
        String  | 
      
        集群列表总数。  | 
     
| 
        clusters  | 
      
        Array  | 
      
        集群参数,请参见表3。  | 
     
| 
        参数名  | 
      
        参数类型  | 
      
        说明  | 
     
|---|---|---|
| 
        clusterId  | 
      
        String  | 
      
        集群ID。  | 
     
| 
        clusterName  | 
      
        String  | 
      
        集群名称。  | 
     
| 
        masterNodeNum  | 
      
        String  | 
      
        集群部署的Master节点数量。  | 
     
| 
        coreNodeNum  | 
      
        String  | 
      
        集群部署的Core节点数量。  | 
     
| 
        totalNodeNum  | 
      
        String  | 
      
        集群部署的节点总数。  | 
     
| 
        clusterState  | 
      
        String  | 
      
        
        集群状态,包括:
         
  | 
     
| 
        createAt  | 
      
        String  | 
      
        集群创建时间,十位时间戳。  | 
     
| 
        updateAt  | 
      
        String  | 
      
        集群更新时间,十位时间戳。  | 
     
| 
        dataCenter  | 
      
        String  | 
      
        集群工作区域。  | 
     
| 
        vpc  | 
      
        String  | 
      
        VPC名称。  | 
     
| 
        vpcId  | 
      
        String  | 
      
        VPC ID。  | 
     
| 
        hadoopVersion  | 
      
        String  | 
      
        Hadoop组件版本信息。  | 
     
| 
        masterNodeSize  | 
      
        String  | 
      
        Master节点的实例规格。  | 
     
| 
        coreNodeSize  | 
      
        String  | 
      
        Core节点的实例规格。  | 
     
| 
        componentList  | 
      
        Array  | 
      
        组件列表信息,请参见表4。  | 
     
| 
        externalIp  | 
      
        String  | 
      
        公网IP地址。  | 
     
| 
        externalAlternateIp  | 
      
        String  | 
      
        公网备用IP地址。  | 
     
| 
        internalIp  | 
      
        String  | 
      
        内网IP地址。  | 
     
| 
        deploymentId  | 
      
        String  | 
      
        集群部署ID。  | 
     
| 
        remark  | 
      
        String  | 
      
        集群备注信息。  | 
     
| 
        orderId  | 
      
        String  | 
      
        创建集群的订单号。  | 
     
| 
        azId  | 
      
        String  | 
      
        可用区域ID。  | 
     
| 
        masterNodeProductId  | 
      
        String  | 
      
        Master节点产品ID。  | 
     
| 
        masterNodeSpecId  | 
      
        String  | 
      
        Master节点规格ID。  | 
     
| 
        coreNodeProductId  | 
      
        String  | 
      
        Core节点产品ID。  | 
     
| 
        coreNodeSpecId  | 
      
        String  | 
      
        Core节点规格ID。  | 
     
| 
        azName  | 
      
        String  | 
      
        可用区域名称。  | 
     
| 
        instanceId  | 
      
        String  | 
      
        实例ID。  | 
     
| 
        vnc  | 
      
        String  | 
      
        远程登录弹性云服务器的URI地址。  | 
     
| 
        tenantId  | 
      
        String  | 
      
        项目编号。  | 
     
| 
        volumeSize  | 
      
        Integer  | 
      
        磁盘存储空间。  | 
     
| 
        volumeType  | 
      
        String  | 
      
        磁盘类型。  | 
     
| 
        subnetId  | 
      
        String  | 
      
        子网ID。  | 
     
| 
        clusterType  | 
      
        String  | 
      
        集群类型。  | 
     
| 
        subnetName  | 
      
        String  | 
      
        子网名称。  | 
     
| 
        securityGroupsId  | 
      
        String  | 
      
        安全组ID。  | 
     
| 
        slaveSecurityGroupsId  | 
      
        String  | 
      
        非Master节点的安全组id,当前一个MRS集群只会使用一个安全组,所以该字段已经废弃。  | 
     
| 
        stageDesc  | 
      
        String  | 
      
        集群进度描述。 
        安装集群进度包括:
         
       
 
        扩容集群进度包括:
         
       
 
        缩容集群进度包括:
         
       
 集群安装、扩容、缩容失败,stageDesc会显示失败的原因,详情请参见表8。  | 
     
| 
        mrsManagerFinish  | 
      
        boolean  | 
      
        表示集群创建过程中,MRS Manager是否安装完成。 
  | 
     
| 
        safeMode  | 
      
        Integer  | 
      
        MRS集群运行模式: 
  | 
     
| 
        clusterVersion  | 
      
        String  | 
      
        集群版本。  | 
     
| 
        nodePublicCertName  | 
      
        String  | 
      
        密钥文件名称。  | 
     
| 
        masterNodeIp  | 
      
        String  | 
      
        Master节点IP。  | 
     
| 
        privateIpFirst  | 
      
        String  | 
      
        首选私有IP。  | 
     
| 
        errorInfo  | 
      
        String  | 
      
        错误信息。  | 
     
| 
        logCollection  | 
      
        Integer  | 
      
        集群安装失败时,是否搜集日志。 
  | 
     
| 
        taskNodeGroups  | 
      
        List<NodeGroup>  | 
      
        Task节点列表信息。参数说明请参见表5。  | 
     
| 
        nodeGroups  | 
      
        List<NodeGroup>  | 
      
        Master节点、Core节点和Task节点列表信息。参数说明参见表5。  | 
     
| 
        masterDataVolumeType  | 
      
        String  | 
      
        Master节点数据磁盘存储类别,目前支持SATA、SAS和SSD。  | 
     
| 
        masterDataVolumeSize  | 
      
        Integer  | 
      
        Master节点数据磁盘存储空间。为增大数据存储容量,创建集群时可同时添加磁盘。 取值范围:100GB~32000GB  | 
     
| 
        masterDataVolumeCount  | 
      
        Integer  | 
      
        Master节点数据磁盘个数。 取值只能是1  | 
     
| 
        coreDataVolumeType  | 
      
        String  | 
      
        Core节点数据磁盘存储类别,目前支持SATA、SAS和SSD。  | 
     
| 
        coreDataVolumeSize  | 
      
        Integer  | 
      
        Core节点数据磁盘存储空间。为增大数据存储容量,创建集群时可同时添加磁盘。 取值范围:100GB~32000GB  | 
     
| 
        coreDataVolumeCount  | 
      
        Integer  | 
      
        Core节点数据磁盘个数。 取值范围:1~10  | 
     
| 
        参数名  | 
      
        参数类型  | 
      
        说明  | 
     
|---|---|---|
| 
        componentId  | 
      
        String  | 
      
        组件ID。 例如:Hadoop的component_id为MRS 3.1.2-LTS.3_001、MRS 3.1.0-LTS.1_001、MRS 1.8.9_001。  | 
     
| 
        componentName  | 
      
        String  | 
      
        组件名称。  | 
     
| 
        componentVersion  | 
      
        String  | 
      
        组件版本。  | 
     
| 
        componentDesc  | 
      
        String  | 
      
        组件描述信息。  | 
     
| 
        参数名  | 
      
        参数类型  | 
      
        说明  | 
     
|---|---|---|
| 
        groupName  | 
      
        String  | 
      
        节点组名。  | 
     
| 
        nodeNum  | 
      
        Integer  | 
      
        节点数量,取值范围0~500,Master节点和Core节点数量至少为1,Core与Task节点总数最大为500个。  | 
     
| 
        nodeSize  | 
      
        String  | 
      
        节点的实例规格。  | 
     
| 
        nodeSpecId  | 
      
        String  | 
      
        节点实例规格ID。  | 
     
| 
        nodeProductId  | 
      
        String  | 
      
        节点实例产品ID。  | 
     
| 
        vmProductId  | 
      
        String  | 
      
        节点虚拟机产品ID。  | 
     
| 
        vmSpecCode  | 
      
        String  | 
      
        节点虚拟机产品规格。  | 
     
| 
        rootVolumeSize  | 
      
        Integer  | 
      
        节点系统盘大小,不可配置,默认为40GB。  | 
     
| 
        rootVolumeProductId  | 
      
        String  | 
      
        节点系统盘的产品ID。  | 
     
| 
        rootVolumeType  | 
      
        String  | 
      
        节点系统盘的类型。  | 
     
| 
        rootVolumeResourceSpecCode  | 
      
        String  | 
      
        节点系统盘产品规格。  | 
     
| 
        rootVolumeResourceType  | 
      
        String  | 
      
        节点系统盘产品类型。  | 
     
| 
        dataVolumeType  | 
      
        String  | 
      
        节点数据磁盘存储类别,目前支持SATA、SAS和SSD。 
  | 
     
| 
        dataVolumeCount  | 
      
        Integer  | 
      
        节点数据磁盘存储数目。  | 
     
| 
        dataVolumeSize  | 
      
        Integer  | 
      
        节点数据磁盘存储大小。  | 
     
| 
        dataVolumeProductId  | 
      
        String  | 
      
        节点数据磁盘的产品ID。  | 
     
| 
        dataVolumeResourceSpecCode  | 
      
        String  | 
      
        节点数据磁盘的产品规格。  | 
     
| 
        dataVolumeResourceType  | 
      
        String  | 
      
        节点数据磁盘的产品类型。  | 
     
示例
- 请求示例
 - 响应示例
    
{ "clusterTotal": 1, "clusters": [ { "clusterId": "bc134369-294c-42b7-a707-b2036ba38524", "clusterName": "mrs_D0zW", "masterNodeNum": "2", "coreNodeNum": "3", "clusterState": "terminated", "createAt": "1498272043", "updateAt": "1498636753", "chargingStartTime": "1498273733", "logCollection": 1, "billingType": "Metered", "dataCenter": "eu-west-0", "vpc": null, "duration": "0", "fee": null, "hadoopVersion": null, "masterNodeSize": null, "coreNodeSize": null, "componentList": [{ "id": null, "componentId": "MRS 3.1.0-LTS.1_001", "componentName": "Hadoop", "componentVersion": "3.1.1", "external_datasources": null, "componentDesc": "针对大数据集的分布式数据处理框架。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_002", "componentName": "HBase", "componentVersion": "2.2.3", "external_datasources": null, "componentDesc": "HBase是一个高可靠性、高性能、面向列、可伸缩的分布式存储系统。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_003", "componentName": "Hive", "componentVersion": "3.1.0", "external_datasources": null, "componentDesc": "方便查询、管理存储在分布式存储系统上的大数据集的数据仓库软件。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_004", "componentName": "Spark2x", "componentVersion": "2.4.5", "external_datasources": null, "componentDesc": "Spark2x是一个对大规模数据处理的快速和通用引擎,基于开源Spark2.x版本开发。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_005", "componentName": "Tez", "componentVersion": "0.9.2", "external_datasources": null, "componentDesc": "一个支持有向无环图的分布式计算框架。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_006", "componentName": "Flink", "componentVersion": "1.12.0", "external_datasources": null, "componentDesc": "Flink是一个开源的批流合一的消息处理系统。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_008", "componentName": "Kafka", "componentVersion": "2.11-2.4.0", "external_datasources": null, "componentDesc": "Kafka是一个分布式消息发布订阅系统。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_009", "componentName": "Flume", "componentVersion": "1.9.0", "external_datasources": null, "componentDesc": "Flume是一个分布式、高可用、高可靠的海量日志采集、聚合和传输系统。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_014", "componentName": "Hue", "componentVersion": "4.7.0", "external_datasources": null, "componentDesc": "Apache Hadoop的UI界面。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_015", "componentName": "Oozie", "componentVersion": "5.1.0", "external_datasources": null, "componentDesc": "Hadoop作业调度系统。", "componentDescEn": null }, { "id": null, "componentId": "MRS 3.1.0-LTS.1_022", "componentName": "Ranger", "componentVersion": "2.0.0", "external_datasources": null, "componentDesc": "RANGER是一个基于Hadoop平台,旨在为复杂数据提供监控、操作、管理等权限管控接口的集中式框架。", "componentDescEn": null }], "externalIp": null, "externalAlternateIp": null, "internalIp": null, "deploymentId": null, "remark": "", "orderId": null, "azId": null, "masterNodeProductId": null, "masterNodeSpecId": null, "coreNodeProductId": null, "coreNodeSpecId": null, "azName": "eu-west-0a", "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, "nodeGroups": [ { "groupName": "master_node_default_group", "nodeNum": 1, "nodeSize": "s1.xlarge.linux.mrs", "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": "s1.xlarge.linux.mrs", "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": "s1.xlarge.linux.mrs", "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": "s1.xlarge.linux.mrs", "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, } ] }