Hadoop, 大数据

hadoop-21 Yarn常用命令

常用命令

  • 查看任务
    • yarn application -list
  • 根据Application状态过滤
    • yarn application -list -appStates
    • ALL
    • NEW
    • NEW_SAVING
    • SUBMITTED
    • ACCEPTED
    • RUNNING
    • FINISGED
    • FAILED
    • KILLED
  • kill掉Application
    • yarn application -kill

Yarn logs 查看日志

  • 查看application日志
    • yarn logs -applicationId
  • 查询Container日志
    • yarn logs -applicationId -containerId

Yarn applicationattempt 查看尝试运行的任务

  • 列出所有Application尝试的列表
    • yarn applicationattempt -list
    • 会列出容器id
  • 打印ApplicationAttempt状态
    • yarn applicationattempt -status appattempt_id

Yarn容器查看

只有在运行的时候才能查看

  • 查看容器列表
    • yarn container -list ApplicationName/attemp_id
  • 打印container状态
    • yarn container -status

Yarn node 查看节点状态

  • 列出所有节点
    • yarn node -list -all

Yarn rmadmin 更新配置

变更队列相关配置时使用

  • 加载队列配置
    • yarn rmadmin -refreshQueues

yarn队列查看

  • 打印队列信息
    • yarn queue -status

Yarn生产环境核心配置参数