天天看點

Yarn REST API 使用指南

Yarn作為一款優秀的開源叢集管理工具,可以用它來運作Hadoop,Spark,Flink等大資料處理任務。所有的分布式計算架構,都是主從模式,ResourceManager作為叢集的管理者,是任務送出的入口。一般企業的大資料處理平台會在Yarn的基礎中做進一步的封裝,以web應用的形式提供更進階的大資料處理平台。如果web應用通過shell的方式送出任務将顯得太重,而且不利于任務狀态的監控。幸好Yarn提供了ResourceManager的REST API,可以很友善的向叢集送出、殺死任務或者監控任務的狀态,本文将簡要介紹ResourceManager REST API的使用方法。

向叢集送出任務

先通過POST請求生成application_id再通過這個id來送出任務。

生成application-id

通過POST請求rm-http-address:port/ws/v1/cluster/apps/new-application,不需要參數,ResourceManager将傳回application_id與叢集可用資源配額,如下:

請求url

http://cdh-1:8088/ws/v1/cluster/apps/new-application           

請求參數:無

傳回資料

{
    "application-id": "application_1613349389113_0535",
    "maximum-resource-capability": {
        "memory": 16384,
        "vCores": 8,
        "resourceInformations": {
            "resourceInformation": [
                {
                    "maximumAllocation": 9223372036854775807,
                    "minimumAllocation": 0,
                    "name": "memory-mb",
                    "resourceType": "COUNTABLE",
                    "units": "Mi",
                    "value": 16384
                },
                {
                    "maximumAllocation": 9223372036854775807,
                    "minimumAllocation": 0,
                    "name": "vcores",
                    "resourceType": "COUNTABLE",
                    "units": "",
                    "value": 8
                }
            ]
        }
    }
}           

傳回json字段說明

Item Data Type Description
application-id string The newly created application id
maximum-resource-capability object The maximum resource capabilities available on this cluster

maximum-resource-capability元素說明

memory int 容器可用的最大記憶體
vCores 容器可用的最大核心數

送出任務

送出應用程式API可用于送出應用程式。如果送出申請,則必須首先使用

Cluster New Application API

獲得一個應用程式ID 。應用程式ID必須是請求正文的一部分。響應包含指向應用程式頁面的URL,可用于跟蹤應用程式的狀态和進度。

通過POST請求rm-http-address:port/ws/v1/cluster/apps送出任務

http://cdh-1:8088/ws/v1/cluster/apps           

請求參數

POST http://<rm http address:port>/ws/v1/cluster/apps
  Accept: application/json
  Content-Type: application/json
  {
    "application-id":"application_1404203615263_0001",
    "application-name":"test",
    "am-container-spec":
    {
      "local-resources":
      {
        "entry":
        [
          {
            "key":"AppMaster.jar",
            "value":
            {
              "resource":"hdfs://hdfs-namenode:9000/user/testuser/DistributedShell/demo-app/AppMaster.jar",
              "type":"FILE",
              "visibility":"APPLICATION",
              "size": 43004,
              "timestamp": 1405452071209
            }
          }
        ]
      },
      "commands":
      {
        "command":"{{JAVA_HOME}}/bin/java -Xmx10m org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster --container_memory 10 --container_vcores 1 --num_containers 1 --priority 0 1><LOG_DIR>/AppMaster.stdout 2><LOG_DIR>/AppMaster.stderr"
      },
      "environment":
      {
        "entry":
        [
          {
            "key": "DISTRIBUTEDSHELLSCRIPTTIMESTAMP",
            "value": "1405459400754"
          },
          {
            "key": "CLASSPATH",
            "value": "{{CLASSPATH}}<CPS>./*<CPS>{{HADOOP_CONF_DIR}}<CPS>{{HADOOP_COMMON_HOME}}/share/hadoop/common/*<CPS>{{HADOOP_COMMON_HOME}}/share/hadoop/common/lib/*<CPS>{{HADOOP_HDFS_HOME}}/share/hadoop/hdfs/*<CPS>{{HADOOP_HDFS_HOME}}/share/hadoop/hdfs/lib/*<CPS>{{HADOOP_YARN_HOME}}/share/hadoop/yarn/*<CPS>{{HADOOP_YARN_HOME}}/share/hadoop/yarn/lib/*<CPS>./log4j.properties"
          },
          {
            "key": "DISTRIBUTEDSHELLSCRIPTLEN",
            "value": "6"
          },
          {
            "key": "DISTRIBUTEDSHELLSCRIPTLOCATION",
            "value": "hdfs://hdfs-namenode:9000/user/testuser/demo-app/shellCommands"
          }
        ]
      }
    },
    "unmanaged-AM":false,
    "max-app-attempts":2,
    "resource":
    {
      "memory":1024,
      "vCores":1
    },
    "application-type":"YARN",
    "keep-containers-across-application-attempts":false
  }           

請求參數說明

申請編号
application-name 申請名稱
queue 應将應用程式送出到的隊列的名稱
priority 應用程式的優先級
am-container-spec 應用程式主容器啟動上下文,如下所述
unmanaged-AM boolean 該應用程式是否使用非托管應用程式主機
max-app-attempts 此應用程式的最大嘗試次數
resource 應用程式主機需要的資源,如下所述
application-type 應用程式類型(MapReduce,Pig,Hive等)
keep-containers-across-application-attmpts YARN是否應保留此應用程式使用的容器而不是銷毀它們
application-tags 應用程式标簽清單,請參閱有關如何指定标簽的請求示例

am-container-spec對象的元素

應該使用am-container-spec對象為應用程式主機提供容器啟動上下文。

local-resources 描述需要本地化的資源的對象,如下所述
environment 容器的環境變量,指定為鍵值對
commands 用于啟動容器的指令(應按執行順序)
service-data 特定于應用程式的服務資料;key是輔助服務的名稱,值是您希望傳遞的資料的base-64編碼
credentials 您的應用程式運作所需的憑據,如下所述
application-acls 您的應用程式的ACLs;密鑰可以是“ VIEW_APP”或“ MODIFY_APP”,值是具有權限的使用者清單

local-resource對象的元素

要本地化的資源的位置
type 資源類型;選項是“ ARCHIVE”,“ FILE”和“ PATTERN”
visibility 可見要本地化的資源;選項是“ PUBLIC”,“ PRIVATE”和“ APPLICATION”
size long 要本地化的資源大小
timestamp 要本地化的資源的時間戳

credentials對象的元素

tokens 您希望傳遞給應用程式的令牌,指定為鍵值對。密鑰是令牌的辨別符,值是令牌(應使用相應的Web服務擷取)
secrets 您希望在應用程式中使用的機密,指定為鍵值對。它們的鍵是辨別符,值是密鑰的base-64編碼

resource對象的元素

每個容器所需的記憶體
每個容器所需的虛拟核心

傳回資料: 無

送出後ResourceManager不會傳回資訊。從請求的參數可以看出,如果想通過Yarn來管理某個分布式計算任務,必須有對應的ApplicationMaser實作,如上例中的AppMaster.jar,其執行入口類為org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster。常見的分布式計算任務如Hadoop、Spark與Flink都有,但Flink-yarn項目對Flink 1.9貌似還 沒有實作對應的ApplicationMaster,是以Flink 1.9的任務目前還不能通過Rest API送出(1.7可以)。

查詢任務狀态資訊

查詢所有任務

通過GET請求rm-http-address:port/ws/v1/cluster/apps将擷取到所有任務的資訊清單,如

http://cdh-:8088/ws/v1/cluster/apps           

請求參數(可選)

可以為GET操作指定多個參數。開始時間和結束時間都有一個begin和end參數,以允許您指定範圍。例如,可以請求在2021年3月2日早上09:00:00和早上10:00:00之間啟動的所有應用程式,其中startedTimeBegin = 1614646800000&startedTimeEnd = 1614650400000。如果未指定Begin參數,則預設為0;如果未指定End參數,則預設為無窮大。

* state [deprecated] - state of the application
  * states - applications matching the given application states, specified as a comma-separated list.[NEW, NEW_SAVING, SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED]
  * finalStatus - the final status of the application - reported by the application itself [UNDEFINED, FAILED, KILLED, SUCCEEDED]
  * user - user name
  * queue - queue name
  * limit - total number of app objects to be returned
  * startedTimeBegin - applications with start time beginning with this time, specified in ms since epoch
  * startedTimeEnd - applications with start time ending with this time, specified in ms since epoch
  * finishedTimeBegin - applications with finish time beginning with this time, specified in ms since epoch
  * finishedTimeEnd - applications with finish time ending with this time, specified in ms since epoch
  * applicationTypes - applications matching the given application types, specified as a comma-separated list.
  * applicationTags - applications matching any of the given application tags, specified as a comma-separated list.           
{
    "apps": {
        "app": [
            {
                "id": "application_1613349389113_0393",
                "user": "root",
                "name": "com.zzmj.main.KafkaToParquet",
                "queue": "root.users.root",
                "state": "RUNNING",
                "finalStatus": "UNDEFINED",
                "progress": 10.0,
                "trackingUI": "ApplicationMaster",
                "trackingUrl": "http://cdh-1:8088/proxy/application_1613349389113_0393/",
                "diagnostics": "",
                "clusterId": 1613349389113,
                "applicationType": "SPARK",
                "applicationTags": "",
                "priority": 0,
                "startedTime": 1614648944707,
                "launchTime": 1614648945179,
                "finishedTime": 0,
                "elapsedTime": 515573848,
                "amContainerLogs": "http://cdh-4:8042/node/containerlogs/container_1613349389113_0393_01_000001/root",
                "amHostHttpAddress": "cdh-4:8042",
                "amRPCAddress": "cdh-4:46434",
                "allocatedMB": 5120,
                "allocatedVCores": 4,
                "reservedMB": 0,
                "reservedVCores": 0,
                "runningContainers": 2,
                "memorySeconds": 2514229328,
                "vcoreSeconds": 1914825,
                "queueUsagePercentage": 6.25,
                "clusterUsagePercentage": 6.25,
                "resourceSecondsMap": {
                    "entry": {
                        "key": "memory-mb",
                        "value": "2514229328"
                    },
                    "entry": {
                        "key": "vcores",
                        "value": "1914825"
                    }
                },
                "preemptedResourceMB": 0,
                "preemptedResourceVCores": 0,
                "numNonAMContainerPreempted": 0,
                "numAMContainerPreempted": 0,
                "preemptedMemorySeconds": 0,
                "preemptedVcoreSeconds": 0,
                "preemptedResourceSecondsMap": {},
                "logAggregationStatus": "NOT_START",
                "unmanagedApplication": false,
                "amNodeLabelExpression": "",
                "timeouts": {
                    "timeout": [
                        {
                            "type": "LIFETIME",
                            "expiryTime": "UNLIMITED",
                            "remainingTimeInSeconds": -1
                        }
                    ]
                }
            }
        ]
    }
}           

字段說明

DataType
id 應用的application-id
user 送出任務的使用者名
name 應用程式的名稱
應用程式所屬消息隊列
state 應用程式目前狀态
finalStatus 應用程式最終狀态
progress double 應用程式進度
trackingUI 追蹤UI顯示名稱
trackingUrl 追蹤UI的url
clusterId 叢集id
applicationType 應用程式類型
應用程式優先級
startedTime 應用程式開始時間
launchTime 應用程式加載時間
finishedTime 應用程式完成時間
elapsedTime 應用程式消耗時間(finished-start)
amContainerLogs am容器日志位址
amHostHttpAddress am的主機http位址
amRPCAddress am的RPC位址
allocatedMB 初始化記憶體大小
allocatedVCores 初始化核心數
reservedMB 保留記憶體
reservedVCores 保留核心數
runningContainers 正在運作的容器數
memorySeconds 所有的container每秒消耗的記憶體總和
vcoreSecond 所有的container每秒消耗的核心數總和
queueUsagePercentage 所屬隊列的資源使用百分比
clusterUsagePercentage 所屬叢集的資源使用百分比
logAggregationStatus 日志聚合狀态
unmanagedApplication 未被管理的應用程式

查詢單個任務

通過GET請求rm-http-address:port/ws/v1/cluster/apps/{appid},如

http://cdh-1:8088/ws/v1/cluster/apps/application_1613349389113_0001           
{
    "app": {
        "id": "application_1613349389113_0001",
        "user": "root",
        "name": "StorageAgg",
        "queue": "root.users.root",
        "state": "RUNNING",
        "finalStatus": "UNDEFINED",
        "progress": 100.0,
        "trackingUI": "ApplicationMaster",
        "trackingUrl": "http://cdh-1:8088/proxy/application_1613349389113_0001/",
        "diagnostics": "",
        "clusterId": 1613349389113,
        "applicationType": "Apache Flink",
        "applicationTags": "",
        "priority": 0,
        "startedTime": 1613358478865,
        "launchTime": 1613358479810,
        "finishedTime": 0,
        "elapsedTime": 1829294258,
        "amContainerLogs": "http://cdh-4:8042/node/containerlogs/container_1613349389113_0001_01_000001/root",
        "amHostHttpAddress": "cdh-4:8042",
        "amRPCAddress": "cdh-4:8082",
        "allocatedMB": 9216,
        "allocatedVCores": 4,
        "reservedMB": 0,
        "reservedVCores": 0,
        "runningContainers": 2,
        "memorySeconds": 16858454105,
        "vcoreSeconds": 7317057,
        "queueUsagePercentage": 11.25,
        "clusterUsagePercentage": 11.25,
        "resourceSecondsMap": {
            "entry": {
                "key": "memory-mb",
                "value": "16858454105"
            },
            "entry": {
                "key": "vcores",
                "value": "7317057"
            }
        },
        "preemptedResourceMB": 0,
        "preemptedResourceVCores": 0,
        "numNonAMContainerPreempted": 0,
        "numAMContainerPreempted": 0,
        "preemptedMemorySeconds": 0,
        "preemptedVcoreSeconds": 0,
        "preemptedResourceSecondsMap": {},
        "logAggregationStatus": "NOT_START",
        "unmanagedApplication": false,
        "amNodeLabelExpression": "",
        "timeouts": {
            "timeout": [
                {
                    "type": "LIFETIME",
                    "expiryTime": "UNLIMITED",
                    "remainingTimeInSeconds": -1
                }
            ]
        }
    }
}           

修改任務狀态

通過Cluster Application State API來完成,當然需要得到RM web service的授權才能進行這種操作,URI為rm-http-address:port/ws/v1/cluster/apps/{appid}/state,如

通過GET請求該URI

http://cdh-1:8088/ws/v1/cluster/apps/application_1613349389113_0001/state           

将傳回的application_id為application_1613349389113_0001的任務的狀态

{
    "state": "RUNNING"
}           

然會參數列舉說明

The application state - can be one of “NEW”, “NEW_SAVING”, “SUBMITTED”, “ACCEPTED”, “RUNNING”, “FINISHED”, “FAILED”, “KILLED”

或者通過PUT請求來kill一個job

http://cdh-1:8088/ws/v1/cluster/apps/application_1399397633663_0003/state           
{
  "state":"KILLED"
}           

傳回結果為

{
  "state":"RUNNING"
}           

其實的state的狀态為目前程式的狀态【RUNNING, ACCEPTED】

重新通過GET請求該任務的狀态

發現該任務已經被kill了

{
  "state":"KILLED"
}           

檢視與調整任務優先級

主要通過通路rm-http-address:port/ws/v1/cluster/apps/{appid}/priority來完成。統一需要得到RM web services的授權

檢視任務優先級

通過GET請求上面的URI,如

http://cdh-1:8088/ws/v1/cluster/apps/application_1613349389113_0001/priority           

将傳回application_id為application_1613349389113_0001的任務的優先級

{
    "priority": 0
}           

修改任務優先級

如果這項任務非常重要,你想讓它優先執行,可通過PUT請求來修改其優先級

http://cdh-1:8088/ws/v1/cluster/apps/application_1613349389113_0001/priority
 請求參數:
    Accept: application/json
    Content-Type: application/json
    {
        "priority": 8
    }           

叢集API

叢集資訊

主要通過GET請求通路rm-http-address:port/ws/v1/cluster來完成。

http://cdh-1:8088/ws/v1/cluster           

請求參數: 無

{
    "clusterInfo": {
        "id": 1613349389113,
        "startedOn": 1613349389113,
        "state": "STARTED",
        "haState": "ACTIVE",
        "rmStateStoreName": "org.apache.hadoop.yarn.server.resourcemanager.recovery.NullRMStateStore",
        "resourceManagerVersion": "3.0.0-cdh6.3.2",
        "resourceManagerBuildVersion": "3.0.0-cdh6.3.2 from 9aff20de3b5ecccf3c19d57f71b214fb4d37ee89 by jenkins source checksum bdea11f98ce3d056d6c170c883b73569",
        "resourceManagerVersionBuiltOn": "2019-11-08T13:55Z",
        "hadoopVersion": "3.0.0-cdh6.3.2",
        "hadoopBuildVersion": "3.0.0-cdh6.3.2 from 9aff20de3b5ecccf3c19d57f71b214fb4d37ee89 by jenkins source checksum f539c87da37534aad732f2a7ddcc59",
        "hadoopVersionBuiltOn": "2019-11-08T13:49Z",
        "haZooKeeperConnectionState": "Could not find leader elector. Verify both HA and automatic failover are enabled."
    }
}           

傳回資料字段說明

叢集ID
startedOn 叢集啟動的時間(從紀元開始以毫秒為機關)
ResourceManager狀态-有效值為:NOTINITED,INITED,STARTED,STOPPED
haState ResourceManager HA狀态-有效值為:INITIALIZING,ACTIVE,STANDBY,STOPPED
rmStateStoreName 實作ResourceManager狀态存儲的類的完全限定名稱
resourceManagerVersion ResourceManager的版本
resourceManagerBuildVersion ResourceManager建構字元串以及建構版本,使用者和校驗和
resourceManagerVersionBuiltOn 生成ResourceManager的時間戳(自紀元以來以毫秒為機關)
hadoopVersion Hadoop通用版本
hadoopBuildVersion 具有建構版本,使用者和校驗和的Hadoop通用建構字元串
hadoopVersionBuiltOn 建立hadoop common的時間戳(自紀元以來以毫秒為機關)
haZooKeeperConnectionState ZooKeeper高可用性服務的連接配接狀态

叢集名額

通過GET請求rm-http-address:port/ws/v1/cluster/metrics來完成。

通過GET請求上面URI,如

http://cdh-1:8088/ws/v1/cluster/metrics           
{
    "clusterMetrics": {
        "appsSubmitted": 547,
        "appsCompleted": 506,
        "appsPending": 0,
        "appsRunning": 8,
        "appsFailed": 14,
        "appsKilled": 19,
        "reservedMB": 0,
        "availableMB": 36864,
        "allocatedMB": 45056,
        "reservedVirtualCores": 0,
        "availableVirtualCores": 8,
        "allocatedVirtualCores": 32,
        "containersAllocated": 16,
        "containersReserved": 0,
        "containersPending": 0,
        "totalMB": 81920,
        "totalVirtualCores": 40,
        "totalNodes": 5,
        "lostNodes": 0,
        "unhealthyNodes": 0,
        "decommissioningNodes": 0,
        "decommissionedNodes": 0,
        "rebootedNodes": 0,
        "activeNodes": 5,
        "shutdownNodes": 0
    }
}           
appsSubmitted 送出的應用程式數量
appsCompleted 完成的應用程式數量
appsPending 等待的應用程式數量
appsRunning 正在運作的應用程式數量
appsFailed 失敗的應用程式數量
appsKilled 被殺死的應用程式數量
保留的記憶體量(MB)
availableMB 可用的記憶體量(MB)
配置設定的記憶體量(MB)
totalMB 總記憶體量(MB)
reservedVirtualCores 保留的虛拟核心數
availableVirtualCores 可用虛拟核心數
allocatedVirtualCores 配置設定的虛拟核心數
totalVirtualCores 虛拟核心總數
containersAllocated 配置設定的容器數
containersReserved 保留的容器數
containersPending 待處理的容器數
totalNodes 節點總數
activeNodes 活動節點數
lostNodes 丢失的節點數
unhealthyNodes 不良節點數
decommissioningNodes 停用的節點數
decommissionedNodes 退役的節點數
rebootedNodes 重新啟動的節點數
shutdownNodes 關閉的節點數

叢集排程

排程程式資源包含有關叢集中配置的目前排程程式的資訊。它目前支援Fifo,容量和公平排程程式。根據配置哪個排程程式,您将獲得不同的資訊,是以請務必檢視類型資訊。

請求URI

http://cdh-1:8088/ws/v1cluster/scheduler           
{
    "scheduler": {
        "schedulerInfo": {
            "type": "fairScheduler",
            "rootQueue": {
                "maxApps": 2147483647,
                "minResources": {
                    "memory": 0,
                    "vCores": 0,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 16384,
                                "minimumAllocation": 1024,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 0
                            },
                            {
                                "maximumAllocation": 8,
                                "minimumAllocation": 1,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 0
                            }
                        ]
                    }
                },
                "maxResources": {
                    "memory": 81920,
                    "vCores": 40,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 81920
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 40
                            }
                        ]
                    }
                },
                "usedResources": {
                    "memory": 45056,
                    "vCores": 32,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 45056
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 32
                            }
                        ]
                    }
                },
                "amUsedResources": {
                    "memory": 0,
                    "vCores": 0,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 0
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 0
                            }
                        ]
                    }
                },
                "amMaxResources": {
                    "memory": 0,
                    "vCores": 0,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 0
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 0
                            }
                        ]
                    }
                },
                "demandResources": {
                    "memory": 45056,
                    "vCores": 32,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 45056
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 32
                            }
                        ]
                    }
                },
                "steadyFairResources": {
                    "memory": 81920,
                    "vCores": 40,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 81920
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 40
                            }
                        ]
                    }
                },
                "fairResources": {
                    "memory": 81920,
                    "vCores": 40,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 81920
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 40
                            }
                        ]
                    }
                },
                "clusterResources": {
                    "memory": 81920,
                    "vCores": 40,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 81920
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 40
                            }
                        ]
                    }
                },
                "reservedResources": {
                    "memory": 0,
                    "vCores": 0,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 0
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 0
                            }
                        ]
                    }
                },
                "maxContainerAllocation": {
                    "memory": 16384,
                    "vCores": 8,
                    "resourceInformations": {
                        "resourceInformation": [
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "memory-mb",
                                "resourceType": "COUNTABLE",
                                "units": "Mi",
                                "value": 16384
                            },
                            {
                                "maximumAllocation": 9223372036854775807,
                                "minimumAllocation": 0,
                                "name": "vcores",
                                "resourceType": "COUNTABLE",
                                "units": "",
                                "value": 8
                            }
                        ]
                    }
                },
                "allocatedContainers": 16,
                "reservedContainers": 0,
                "queueName": "root",
                "schedulingPolicy": "DRF",
                "preemptable": true,
                "childQueues": {
                    "queue": [
                        {
                            "type": "fairSchedulerLeafQueueInfo",
                            "maxApps": 2147483647,
                            "minResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 16384,
                                            "minimumAllocation": 1024,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 8,
                                            "minimumAllocation": 1,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "maxResources": {
                                "memory": 81920,
                                "vCores": 40,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 81920
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 40
                                        }
                                    ]
                                }
                            },
                            "usedResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "amUsedResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "amMaxResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "demandResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "steadyFairResources": {
                                "memory": 40960,
                                "vCores": 20,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 40960
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 20
                                        }
                                    ]
                                }
                            },
                            "fairResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "clusterResources": {
                                "memory": 81920,
                                "vCores": 40,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 81920
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 40
                                        }
                                    ]
                                }
                            },
                            "reservedResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "maxContainerAllocation": {
                                "memory": 16384,
                                "vCores": 8,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 16384
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 8
                                        }
                                    ]
                                }
                            },
                            "allocatedContainers": 0,
                            "reservedContainers": 0,
                            "queueName": "root.default",
                            "schedulingPolicy": "DRF",
                            "preemptable": true,
                            "numPendingApps": 0,
                            "numActiveApps": 0
                        },
                        {
                            "maxApps": 2147483647,
                            "minResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 16384,
                                            "minimumAllocation": 1024,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 8,
                                            "minimumAllocation": 1,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "maxResources": {
                                "memory": 81920,
                                "vCores": 40,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 81920
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 40
                                        }
                                    ]
                                }
                            },
                            "usedResources": {
                                "memory": 45056,
                                "vCores": 32,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 45056
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 32
                                        }
                                    ]
                                }
                            },
                            "amUsedResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "amMaxResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "demandResources": {
                                "memory": 45056,
                                "vCores": 32,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 45056
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 32
                                        }
                                    ]
                                }
                            },
                            "steadyFairResources": {
                                "memory": 40960,
                                "vCores": 20,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 40960
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 20
                                        }
                                    ]
                                }
                            },
                            "fairResources": {
                                "memory": 81920,
                                "vCores": 40,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 81920
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 40
                                        }
                                    ]
                                }
                            },
                            "clusterResources": {
                                "memory": 81920,
                                "vCores": 40,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 81920
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 40
                                        }
                                    ]
                                }
                            },
                            "reservedResources": {
                                "memory": 0,
                                "vCores": 0,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 0
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 0
                                        }
                                    ]
                                }
                            },
                            "maxContainerAllocation": {
                                "memory": 16384,
                                "vCores": 8,
                                "resourceInformations": {
                                    "resourceInformation": [
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "memory-mb",
                                            "resourceType": "COUNTABLE",
                                            "units": "Mi",
                                            "value": 16384
                                        },
                                        {
                                            "maximumAllocation": 9223372036854775807,
                                            "minimumAllocation": 0,
                                            "name": "vcores",
                                            "resourceType": "COUNTABLE",
                                            "units": "",
                                            "value": 8
                                        }
                                    ]
                                }
                            },
                            "allocatedContainers": 16,
                            "reservedContainers": 0,
                            "queueName": "root.users",
                            "schedulingPolicy": "DRF",
                            "preemptable": true,
                            "childQueues": {
                                "queue": [
                                    {
                                        "type": "fairSchedulerLeafQueueInfo",
                                        "maxApps": 2147483647,
                                        "minResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 16384,
                                                        "minimumAllocation": 1024,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 8,
                                                        "minimumAllocation": 1,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "maxResources": {
                                            "memory": 65536,
                                            "vCores": 32,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 65536
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 32
                                                    }
                                                ]
                                            }
                                        },
                                        "usedResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "amUsedResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "amMaxResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "demandResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "steadyFairResources": {
                                            "memory": 13654,
                                            "vCores": 7,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 13654
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 7
                                                    }
                                                ]
                                            }
                                        },
                                        "fairResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "clusterResources": {
                                            "memory": 81920,
                                            "vCores": 40,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 81920
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 40
                                                    }
                                                ]
                                            }
                                        },
                                        "reservedResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "maxContainerAllocation": {
                                            "memory": 16384,
                                            "vCores": 8,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 16384
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 8
                                                    }
                                                ]
                                            }
                                        },
                                        "allocatedContainers": 0,
                                        "reservedContainers": 0,
                                        "queueName": "root.users.hdfs",
                                        "schedulingPolicy": "DRF",
                                        "preemptable": true,
                                        "numPendingApps": 0,
                                        "numActiveApps": 0
                                    },
                                    {
                                        "type": "fairSchedulerLeafQueueInfo",
                                        "maxApps": 2147483647,
                                        "minResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 16384,
                                                        "minimumAllocation": 1024,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 8,
                                                        "minimumAllocation": 1,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "maxResources": {
                                            "memory": 81920,
                                            "vCores": 40,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 81920
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 40
                                                    }
                                                ]
                                            }
                                        },
                                        "usedResources": {
                                            "memory": 45056,
                                            "vCores": 32,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 45056
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 32
                                                    }
                                                ]
                                            }
                                        },
                                        "amUsedResources": {
                                            "memory": 9728,
                                            "vCores": 8,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 9728
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 8
                                                    }
                                                ]
                                            }
                                        },
                                        "amMaxResources": {
                                            "memory": 40960,
                                            "vCores": 20,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 40960
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 20
                                                    }
                                                ]
                                            }
                                        },
                                        "demandResources": {
                                            "memory": 45056,
                                            "vCores": 32,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 45056
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 32
                                                    }
                                                ]
                                            }
                                        },
                                        "steadyFairResources": {
                                            "memory": 13654,
                                            "vCores": 7,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 13654
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 7
                                                    }
                                                ]
                                            }
                                        },
                                        "fairResources": {
                                            "memory": 81920,
                                            "vCores": 40,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 81920
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 40
                                                    }
                                                ]
                                            }
                                        },
                                        "clusterResources": {
                                            "memory": 81920,
                                            "vCores": 40,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 81920
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 40
                                                    }
                                                ]
                                            }
                                        },
                                        "reservedResources": {
                                            "memory": 0,
                                            "vCores": 0,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 0
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 0
                                                    }
                                                ]
                                            }
                                        },
                                        "maxContainerAllocation": {
                                            "memory": 16384,
                                            "vCores": 8,
                                            "resourceInformations": {
                                                "resourceInformation": [
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "memory-mb",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "Mi",
                                                        "value": 16384
                                                    },
                                                    {
                                                        "maximumAllocation": 9223372036854775807,
                                                        "minimumAllocation": 0,
                                                        "name": "vcores",
                                                        "resourceType": "COUNTABLE",
                                                        "units": "",
                                                        "value": 8
                                                    }
                                                ]
                                            }
                                        },
                                        "allocatedContainers": 16,
                                        "reservedContainers": 0,
                                        "queueName": "root.users.root",
                                        "schedulingPolicy": "fair",
                                        "preemptable": true,
                                        "numPendingApps": 0,
                                        "numActiveApps": 8
                                    }
                                ]
                            }
                        }
                    ]
                }
            }
        }
    }
}           

叢集應用程式嘗試API

使用應用程式嘗試API,您可以獲得代表應用程式嘗試的資源的集合。在此資源上運作GET操作時,将獲得App Attempt對象的集合。

http://cdh-1:8088/ws/v1/cluster/apps/{appid}/appattempts           
{
    "appAttempts": {
        "appAttempt": [
            {
                "id": 1,
                "startTime": 1615272507648,
                "finishedTime": 0,
                "containerId": "container_1615272298938_0001_01_000001",
                "nodeHttpAddress": "cdh-6:8042",
                "nodeId": "cdh-6:8041",
                "logsLink": "http://cdh-6:8042/node/containerlogs/container_1615272298938_0001_01_000001/root",
                "blacklistedNodes": "",
                "nodesBlacklistedBySystem": "",
                "appAttemptId": "appattempt_1615272298938_0001_000001"
            }
        ]
    }
}           
應用嘗試ID
nodeId 嘗試運作的節點的節點ID
nodeHttpAddress 嘗試運作的節點的節點http位址
logsLink 應用程式嘗試日志的http連結
containerId 應用嘗試容器的ID
startTime 嘗試的開始時間(自紀元以來以毫秒為機關)

繼續閱讀