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

    查看所有节点信息

【千锋教育】大数据开发全套教程,史上最全面的大数据学习视频

猜你喜欢

转载自blog.csdn.net/longz_org_cn/article/details/131779336
今日推荐