大数据技术 Hadoop学习(13):Hadoop命令下
沉沙 2018-10-08 来源 : 阅读 1755 评论 0

摘要:本篇教程探讨了大数据技术 Hadoop学习(13):Hadoop命令下,希望阅读本篇文章以后大家有所收获,帮助大家对大数据技术的理解更加深入。

本篇教程探讨了大数据技术 Hadoop学习(13):Hadoop命令下,希望阅读本篇文章以后大家有所收获,帮助大家对大数据技术的理解更加深入。

<



      上一篇,我们对Hadoop命令中的HDFS Commands进行了简略的列举,下面我们就MapReduce Commands和Yarn Commands进行简略的列举,官网基本都是英文的,所以只能拙略的翻译下,妄大家见谅。

      下面,我们就开始对Hadoop命令下进行讲解。

MapReduce Commands

    一:介绍

      所有的MapReduce命令通过bin/ mapred脚本调用。不指定参数运行mapred脚本会打印所有命令的描述。

      用法: mapred [SHELL_OPTIONS] COMMAND [GENERIC_OPTIONS] [COMMAND_OPTIONS]

      Hadoop有一个选项解析框架用于解析一般的选项和运行类。
    COMMAND_OPTIONS Description
    SHELL_OPTIONS  The common set of shell options. These are documented on the Hadoop Commands Reference page.
    GENERIC_OPTIONS  The common set of options supported by multiple commands. See the Hadoop Commands Reference for more information.
    COMMAND COMMAND_OPTIONS  Various commands with their options are described in the following sections. The commands have been grouped into User Commands and Administration Commands.

User Commands

    一:介绍

      用于Hadoop集群用户命令。
    二:archive

      创建一个Hadoop档案.More information can be found at Hadoop Archives Guide.
    三:classpath

      打印Hadoop jar和所需的libs的class路径。

      用法: mapred classpath
    四:distcp

      递归复制文件或目录. More information can be found at Hadoop DistCp Guide.
    五:job

      MapReduce jobs的命令

      用法: mapred job | [GENERIC_OPTIONS] | [-submit ] | [-status ] | [-counter   ] | [-kill ] | [-events   <#-of-events>] | [-history [all] ] | [-list [all]] | [-kill-task ] | [-fail-task ] | [-set-priority  ]
    六:pipes

      运行一个pipes job.

      用法: mapred pipes [-conf ] [-jobconf , ...] [-input ] [-output ] [-jar ] [-inputformat ] [-map ] [-partitioner ] [-reduce ] [-writer ] [-program ] [-reduces ]
    七:queue

      查看作业队列信息

      用法:  mapred queue [-list] | [-info  [-showJobs]] | [-showacls]
    八:version

      打印版本。

      用法:  mapred version

Administration Commands

    一:介绍

      用于Hadoop集群用户命令。
    二:historyserver

        启动JobHistoryServer.

      用法: mapred historyserver
    三:hsadmin

      运行一个MapReduce hsadmin客户端执行jobhistoryserver administrative命令。

      用法:Usage: mapred hsadmin [-refreshUserToGroupsMappings] | [-refreshSuperUserGroupsConfiguration] | [-refreshAdminAcls] | [-refreshLoadedJobCache] | [-refreshLogRetentionSettings] | [-refreshJobRetentionSettings] | [-getGroups [username]] | [-help [cmd]]

YARN Commands

    一:介绍

      所有的YARN命令通过bin/yarn 脚本调用。不指定参数运行yarn脚本会打印所有命令的描述。

      用法: yarn [--config confdir] COMMAND [--loglevel loglevel] [GENERIC_OPTIONS] [COMMAND_OPTIONS]

      YARN有一个选项解析框架用于解析一般的选项和运行类。

User Commands

    一:介绍

      用于Hadoop集群用户命令。
    二:application

      打印app报表或kill掉app

      用法: yarn application [options]
    三:applicationattempt

      打印applicationattempt(s) 报表

      用法: yarn applicationattempt [options]
    四:classpath

      打印Hadoop jar和需要的库类路径。

      用法: yarn classpath
    五:container

      打印container(s)报表

      用法: yarn container [options]
    六:jar

      执行一个jar文件。

      用法: yarn jar  [mainClass] args...
    七:logs

      转储容器日志

      用法: yarn logs -applicationId  [options]
    八:node

      打印node报表

      用法: yarn node [options]
    九:queue

      打印queue信息

      用法: yarn queue [options]
    十:version

      打印hadoop版本。

      用法: yarn version

Administration Commands用

    一:介绍

      用于Hadoop集群用户命令。
    二:daemonlog

      获取/设置在后台Log的级别

      用法:yarn daemonlog -getlevel  
           yarn daemonlog -setlevel   
    三:nodemanager

      启动NodeManager

      用法: yarn nodemanager
    四:proxyserver

      启动web proxy server

      用法: yarn proxyserver
    五:resourcemanager

      启动ResourceManager

      用法: yarn resourcemanager [-format-state-store]
    六:rmadmin

      运行ResourceManager管理客户端

    用法:yarn rmadmin [-refreshQueues]
                   [-refreshNodes]
                   [-refreshUserToGroupsMapping]
                   [-refreshSuperUserGroupsConfiguration]
                   [-refreshAdminAcls]
                   [-refreshServiceAcl]
                   [-getGroups [username]]
                   [-transitionToActive [--forceactive] [--forcemanual] ]
                   [-transitionToStandby [--forcemanual] ]
                   [-failover [--forcefence] [--forceactive]  ]
                   [-getServiceState ]
                   [-checkHealth ]
                   [-help [cmd]]
    七:scmadmin

      运行Shared Cache Manager管理客户端

      用法: yarn scmadmin [options]
    八:sharedcachemanager

      启动Shared Cache Manager

      用法: yarn sharedcachemanager
    九:timelineserver

      启动TimeLineServer

      用法: yarn timelineserver

    --------------------------------------------------------------------

      到此,本章节的内容讲述完毕。
   

本文由职坐标整理发布,学习更多的大数据技术相关知识,请关注职坐标大技术云计算大技术技术频道!

本文由 @沉沙 发布于职坐标。未经许可,禁止转载。
喜欢 | 0 不喜欢 | 0
看完这篇文章有何感觉?已经有0人表态,0%的人喜欢 快给朋友分享吧~
评论(0)
后参与评论

您输入的评论内容中包含违禁敏感词

我知道了

助您圆梦职场 匹配合适岗位
验证码手机号,获得海同独家IT培训资料
选择就业方向:
人工智能物联网
大数据开发/分析
人工智能Python
Java全栈开发
WEB前端+H5

请输入正确的手机号码

请输入正确的验证码

获取验证码

您今天的短信下发次数太多了,明天再试试吧!

提交

我们会在第一时间安排职业规划师联系您!

您也可以联系我们的职业规划师咨询:

小职老师的微信号:z_zhizuobiao
小职老师的微信号:z_zhizuobiao

版权所有 职坐标-一站式AI+学习就业服务平台 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
 沪公网安备 31011502005948号    

©2015 www.zhizuobiao.com All Rights Reserved