Bigdata Engineering/빅데이터 플랫폼 R&D
[Bigdata] Yarn Resource Manager API Call
DAMAT
2020. 2. 26. 18:05
[빅데이터] 얀 리소스 매니저 API 호출
Command
#cmd
GET "[ResourceManagerHost]/ws/v1/cluster/apps?param1=value1¶m2=value2¶m3=value3..."
# ex) if you want to return "states Running" by limit 20
GET "http://ResourceManager.host.net:8088/ws/v1/cluster/apps?limit=20&states=RUNNING"
Return Example
- You can Return JSON Type
- 예 )
{"apps":{"app":[{"id":"application_1579679167074_XXXX","user":"hive","name":"SELECT\r\n\t*\r\nFROM\r\n(\r\n\tSELECT buy.univer...ac(Stage-2)","queue":"default","state":"KILLED","finalStatus":"KILLED","progress":100.0,"trackingUI":"History","trackingUrl":"http://namenode.host.net:8088/proxy/application_1579679167074_XXXX/","diagnostics":"Application killed by user.","clusterId":158218459XXXX,"applicationType":"MAPREDUCE","applicationTags":"","startedTime":1580883583147,"finishedTime":1580883604084,"elapsedTime":20937,"amContainerLogs":"http://datanode.host.net:8042/node/containerlogs/container_e96_15796791XXXX/hive","amHostHttpAddress":"datanode.host.net:8042","allocatedMB":-1,"allocatedVCores":-1,"runningContainers":-1,"memorySeconds":4133,"vcoreSeconds":4,"preemptedResourceMB":0,"preemptedResourceVCores":0,"numNonAMContainerPreempted":0,"numAMContainerPreempted":0,"logAggregationStatus":"NOT_START"}]}}
Reference :: Parameter List
Item | Data Type | Description |
id | string | The application id |
user | string | The user who started the application |
name | string | The application name |
Application Type | string | The application type |
queue | string | The queue the application was submitted to |
state | string | The application state according to the ResourceManager - valid values are members of the YarnApplicationState enum: NEW, NEW_SAVING, SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED |
finalStatus | string | The final status of the application if finished - reported by the application itself - valid values are: UNDEFINED, SUCCEEDED, FAILED, KILLED |
progress | float | The progress of the application as a percent |
trackingUI | string | Where the tracking url is currently pointing - History (for history server) or ApplicationMaster |
trackingUrl | string | The web URL that can be used to track the application |
diagnostics | string | Detailed diagnostics information |
clusterId | long | The cluster id |
startedTime | long | The time in which application started (in ms since epoch) |
finishedTime | long | The time in which the application finished (in ms since epoch) |
elapsedTime | long | The elapsed time since the application started (in ms) |
amContainerLogs | string | The URL of the application master container logs |
amHostHttpAddress | string | The nodes http address of the application master |
allocatedMB | int | The sum of memory in MB allocated to the application’s running containers |
allocatedVCores | int | The sum of virtual cores allocated to the application’s running containers |
runningContainers | int | The number of containers currently running for the application |
memorySeconds | long | The amount of memory the application has allocated (megabyte-seconds) |
vcoreSeconds | long | The amount of CPU resources the application has allocated (virtual core-seconds) |
limit | int | the # of returns limit |