Yarn资源调度器之常用命令
Yarn资源调度器之常用命令
准备
Yarn资源管理器对外提供的端口:8088
Hdfs对外提供的端口:9870
启动WordCount案例:
hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-3.1.3.jar wordcount /input /output
Yarn application查看任务
列出所有Application:
yarn application -list
根据Application状态过滤:yarn application -list -appStates (所有状态:ALL、NEW、NEW_SAVING、SUBMITTED、ACCEPTED、RUNNING、FINISHED、FAILED、KILLED)
yarn application -list -appStates FINISHED
Kill掉Application
yarn application -kill application_1612577921195_0001
Yarn logs 查看日志
查看Application日志:
yarn logs -applicationId
查看Container日志:
yarn logs -applicationId
-containerId
Yarn applicationattempt查看尝试运行的任务
列出所有Application尝试的列表
yarn applicationattempt -list
打印ApplicationAttempt状态
yarn applicationattempt -status
yarn container查看容器
列出所有Container
yarn container -list
打印Container状态
yarn container -status
只有在任务跑的途中才能看到container的状态
yarn node 查看节点状态
列出所有节点
yarn node -list -all
yarn rmadmin 更新配置
加载队列配置
yarn rmadmin -refreshQueues
yarn queue 查看队列
打印队列信息
yarn queue -status

浙公网安备 33010602011771号