全方位揭秘!大数据从0到1的完美落地之YARN的命令

YARN的命令

  • yarn top

    类似于Linux的top命令,查看正在运行的程序资源占用情况。

  • yarn queue -status root.default

    查看指定队列使用情况,下文会讲解任务队列

  • yarn application

    • -list

      # 通过任务的状态,列举YARN的任务。使用 -appStates 指定状态
      # 任务状态: ALL、NEW、NEW_SAVING、SUBMITTED、ACCEPTED、RUNNING、FINISHED、FAILED、KILLED
      # e.g.
      # 查看所有正在运行的任务
      [root@qianfeng01 ~]# yarn application -list -appStates RUNNING
      # 查看所有的失败的任务
      [root@qianfeng01 ~]# yarn application -list -appStates FAILED
      
    • -movetoqueue

      # 将一个任务移动到指定的队列中
      [root@qianfeng01 ~]# yarn application -movetoqueue application_xxxxxx_xxx -queue root.small
      
    • -kill

      # 杀死指定的任务
      [root@qianfeng01 ~]# yarn application -kill application_xxxxxx_xxx
      
  • yarn container

    • -list

      # 查看正在执行的任务的容器信息
      [root@qianfeng01 ~]# yarn container -list application_xxxxxx_xxx
      
    • -status

      # 查看指定容器信息
      [root@qianfeng01 ~]# yarn container -status container_xxxxx
      
  • yarn jar

    # 提交任务到YARN执行
    [root@qianfeng01 ~]# yarn jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.3.1.jar /input /output
    
  • yarn logs

    # 查看YARN的程序运行时的日志信息
    [root@qianfeng01 ~]# yarn logs -applicationId application_1528080031923_0064
    
  • yarn node -all -list

    查看所有节点信息

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值