开发者社区> 问答> 正文

E-MapReduce 如何查询集群列表?



ListClusters 查询集群列表



请求参数

字段类型是否必须默认值描述
StatusListArray<String>选择需要的集群状态进行筛选。使用类似如下的格式的字符串数组:[“CREATING”, “RUNNING”, “IDLE”]
RegionIdString
PageNumberInteger1查询的页码
PageSizeInteger10查询的页面条数


返回参数

字段类型描述
ClusterArray<ClusterInfoSimple>ClusterInfoSimple数组。ClusterInfoSimple结构见下面的对象。
TotalCountInteger总条数
PageNumberInteger当前页码
PageSizeInteger当前查询页面条数


ClusterInfoSimple

字段类型描述
IdString集群Id
NameString集群名称
ChargeTypeString集群的付费类型。 PrePaid:包年包月,PostPaid:按量付费
ExpiredTimeLong集群到期的时间,时间戳格式。类似:1459236255438
TypeString集群类型,HADOOP,HBASE
CreateTimeLong集群创建的时间,时间戳格式。类似:1459236255438
RunningTimeInteger集群运行的时间,单位:秒
StatusString集群的状态,参考集群状态
FailReasonFailReason集群创建失败的信息
CreateTypeStringON-DEMAND:按需创建,指使用执行计划动态创建出来的集群。MANUAL:手动创建的集群


示例



请求示例

  1. [backcolor=transparent]https[backcolor=transparent]:[backcolor=transparent]//emr.aliyuncs.com/?Action=ListClusters
  2. [backcolor=transparent]&[backcolor=transparent]PageSize[backcolor=transparent]=[backcolor=transparent]100
  3. [backcolor=transparent]&[backcolor=transparent]StatusList[backcolor=transparent]=%[backcolor=transparent]5B[backcolor=transparent]%[backcolor=transparent]22CREATING[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent]%[backcolor=transparent]2C[backcolor=transparent]+%[backcolor=transparent]22RUNNING[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent]%[backcolor=transparent]2C[backcolor=transparent]+%[backcolor=transparent]22IDLE[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent]%[backcolor=transparent]2C[backcolor=transparent]+%[backcolor=transparent]22RELEASING[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent]%[backcolor=transparent]2C[backcolor=transparent]+%[backcolor=transparent]22CREATE[backcolor=transparent]_FAILED[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent]%[backcolor=transparent]2C[backcolor=transparent]+%[backcolor=transparent]22RELEASE[backcolor=transparent]_FAILED[backcolor=transparent]%[backcolor=transparent]22[backcolor=transparent]%[backcolor=transparent]5D
  4. [backcolor=transparent]&[backcolor=transparent]PageNumber[backcolor=transparent]=[backcolor=transparent]1
  5. [backcolor=transparent]&[backcolor=transparent]RegionId[backcolor=transparent]=[backcolor=transparent]cn[backcolor=transparent]-[backcolor=transparent]hangzhou
  6. [backcolor=transparent]&公共请求参数


返回格式


JSON 格式
  1. [backcolor=transparent]{
  2. [backcolor=transparent]    [backcolor=transparent]"code"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"200"[backcolor=transparent],
  3. [backcolor=transparent]    [backcolor=transparent]"data"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]{
  4. [backcolor=transparent]        [backcolor=transparent]"Clusters"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]{
  5. [backcolor=transparent]            [backcolor=transparent]"ClusterInfo"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent][
  6. [backcolor=transparent]                [backcolor=transparent]{
  7. [backcolor=transparent]                    [backcolor=transparent]"CreateTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]1454035046000[backcolor=transparent],
  8. [backcolor=transparent]                    [backcolor=transparent]"FailReason"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]{
  9. [backcolor=transparent]                        [backcolor=transparent]"ErrorCode"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"OperationDenied"[backcolor=transparent],
  10. [backcolor=transparent]                        [backcolor=transparent]"ErrorMsg"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"The resource is out of usage."[backcolor=transparent],
  11. [backcolor=transparent]                        [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"C0946CDD-25A6-45F5-8F5C-D095F12E8B6B"
  12. [backcolor=transparent]                    [backcolor=transparent]},
  13. [backcolor=transparent]                    [backcolor=transparent]"Id"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"500000845"[backcolor=transparent],
  14. [backcolor=transparent]                    [backcolor=transparent]"Name"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"ffff"[backcolor=transparent],
  15. [backcolor=transparent]                    [backcolor=transparent]"PayType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"PostPaid"[backcolor=transparent],
  16. [backcolor=transparent]                    [backcolor=transparent]"RunningTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]0[backcolor=transparent],
  17. [backcolor=transparent]                    [backcolor=transparent]"Status"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"LAUNCHING_FAIL"[backcolor=transparent],
  18. [backcolor=transparent]                    [backcolor=transparent]"Type"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"hadoop"
  19. [backcolor=transparent]                [backcolor=transparent]},
  20. [backcolor=transparent]                [backcolor=transparent]{
  21. [backcolor=transparent]                    [backcolor=transparent]"CreateTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]1454034802000[backcolor=transparent],
  22. [backcolor=transparent]                    [backcolor=transparent]"FailReason"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]{
  23. [backcolor=transparent]                        [backcolor=transparent]"ErrorCode"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"OperationDenied"[backcolor=transparent],
  24. [backcolor=transparent]                        [backcolor=transparent]"ErrorMsg"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"The resource is out of usage."[backcolor=transparent],
  25. [backcolor=transparent]                        [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"3FCF17ED-9277-40B0-983F-52939B1B8BFF"
  26. [backcolor=transparent]                    [backcolor=transparent]},
  27. [backcolor=transparent]                    [backcolor=transparent]"Id"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"500000844"[backcolor=transparent],
  28. [backcolor=transparent]                    [backcolor=transparent]"Name"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"testforcerelease"[backcolor=transparent],
  29. [backcolor=transparent]                    [backcolor=transparent]"PayType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"PostPaid"[backcolor=transparent],
  30. [backcolor=transparent]                    [backcolor=transparent]"RunningTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]0[backcolor=transparent],
  31. [backcolor=transparent]                    [backcolor=transparent]"Status"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"LAUNCHING_FAIL"[backcolor=transparent],
  32. [backcolor=transparent]                    [backcolor=transparent]"Type"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"hadoop"
  33. [backcolor=transparent]                [backcolor=transparent]},
  34. [backcolor=transparent]                [backcolor=transparent]{
  35. [backcolor=transparent]                    [backcolor=transparent]"CreateTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]1453879601000[backcolor=transparent],
  36. [backcolor=transparent]                    [backcolor=transparent]"FailReason"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]{},
  37. [backcolor=transparent]                    [backcolor=transparent]"Id"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"500000760"[backcolor=transparent],
  38. [backcolor=transparent]                    [backcolor=transparent]"Name"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"新Hadoop"[backcolor=transparent],
  39. [backcolor=transparent]                    [backcolor=transparent]"PayType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"PostPaid"[backcolor=transparent],
  40. [backcolor=transparent]                    [backcolor=transparent]"RunningTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]18938[backcolor=transparent],
  41. [backcolor=transparent]                    [backcolor=transparent]"Status"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"TERMINATED"[backcolor=transparent],
  42. [backcolor=transparent]                    [backcolor=transparent]"Type"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"hadoop"
  43. [backcolor=transparent]                [backcolor=transparent]},
  44. [backcolor=transparent]                [backcolor=transparent]{
  45. [backcolor=transparent]                    [backcolor=transparent]"CreateTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]1453877940000[backcolor=transparent],
  46. [backcolor=transparent]                    [backcolor=transparent]"FailReason"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]{
  47. [backcolor=transparent]                        [backcolor=transparent]"ErrorCode"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"MissingParameter"[backcolor=transparent],
  48. [backcolor=transparent]                        [backcolor=transparent]"ErrorMsg"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"The input parameter "InstanceId" that is mandatory for processing this request is not supplied."[backcolor=transparent],
  49. [backcolor=transparent]                        [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"D1CEBBCD-2FFD-4BBF-A7A0-87FC9378A237"
  50. [backcolor=transparent]                    [backcolor=transparent]},
  51. [backcolor=transparent]                    [backcolor=transparent]"Id"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"500000759"[backcolor=transparent],
  52. [backcolor=transparent]                    [backcolor=transparent]"Name"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"Cluster_OnDemandWithHourSchedual"[backcolor=transparent],
  53. [backcolor=transparent]                    [backcolor=transparent]"PayType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"PostPaid"[backcolor=transparent],
  54. [backcolor=transparent]                    [backcolor=transparent]"RunningTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]0[backcolor=transparent],
  55. [backcolor=transparent]                    [backcolor=transparent]"Status"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"LAUNCHING_FAIL"[backcolor=transparent],
  56. [backcolor=transparent]                    [backcolor=transparent]"Type"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"hadoop"
  57. [backcolor=transparent]                [backcolor=transparent]},
  58. [backcolor=transparent]                [backcolor=transparent]{
  59. [backcolor=transparent]                    [backcolor=transparent]"CreateTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]1453877939000[backcolor=transparent],
  60. [backcolor=transparent]                    [backcolor=transparent]"FailReason"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]{
  61. [backcolor=transparent]                        [backcolor=transparent]"ErrorCode"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"MissingParameter"[backcolor=transparent],
  62. [backcolor=transparent]                        [backcolor=transparent]"ErrorMsg"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"The input parameter "InstanceId" that is mandatory for processing this request is not supplied."[backcolor=transparent],
  63. [backcolor=transparent]                        [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"F06849BF-391A-450D-AC8A-978C7DF798BF"
  64. [backcolor=transparent]                    [backcolor=transparent]},
  65. [backcolor=transparent]                    [backcolor=transparent]"Id"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"500000758"[backcolor=transparent],
  66. [backcolor=transparent]                    [backcolor=transparent]"Name"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"Cluster_OnDemandWithDaySchedual"[backcolor=transparent],
  67. [backcolor=transparent]                    [backcolor=transparent]"PayType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"PostPaid"[backcolor=transparent],
  68. [backcolor=transparent]                    [backcolor=transparent]"RunningTime"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]0[backcolor=transparent],
  69. [backcolor=transparent]                    [backcolor=transparent]"Status"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"LAUNCHING_FAIL"[backcolor=transparent],
  70. [backcolor=transparent]                    [backcolor=transparent]"Type"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"hadoop"
  71. [backcolor=transparent]                [backcolor=transparent]}
  72. [backcolor=transparent]            [backcolor=transparent]]
  73. [backcolor=transparent]        [backcolor=transparent]},
  74. [backcolor=transparent]        [backcolor=transparent]"PageNumber"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]1[backcolor=transparent],
  75. [backcolor=transparent]        [backcolor=transparent]"PageSize"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]100[backcolor=transparent],
  76. [backcolor=transparent]        [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"C7067848-F4DC-42B4-A596-235F82E43E2E"[backcolor=transparent],
  77. [backcolor=transparent]        [backcolor=transparent]"TotalCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]849
  78. [backcolor=transparent]    [backcolor=transparent]},
  79. [backcolor=transparent]    [backcolor=transparent]"requestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"C7067848-F4DC-42B4-A596-235F82E43E2E"[backcolor=transparent],
  80. [backcolor=transparent]    [backcolor=transparent]"successResponse"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]true
  81. [backcolor=transparent]}

展开
收起
nicenelly 2017-10-27 16:31:13 2199 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
阿里云E-MapReduce 立即下载
\"Hadoop的过去现在和未来——从阿里云梯到E-MapReduce \" 立即下载
大数据解决方案构建详解 以阿里云E-MapReduce为例 立即下载