Administration Commands
Commands useful for administrators of a hadoop cluster.
balancer
Runs a cluster balancing utility. An administrator can simply press Ctrl-C to stop the rebalancing process. See Rebalancer for more details.
Usage: hadoop balancer [-threshold <threshold>]
| COMMAND_OPTION | Description |
|---|---|
| -threshold threshold | Percentage of disk capacity. This overwrites the default threshold. |
daemonlog
Get/Set the log level for each daemon.
Usage: hadoop daemonlog -getlevel <host:port> <name> Usage: hadoop daemonlog -setlevel <host:port> <name> <level>
| COMMAND_OPTION | Description |
|---|---|
| -getlevel host:port name | Prints the log level of the daemon running at host:port. This command internally connects to http://host:port/logLevel?log=name |
| -setlevel host:port name level | Sets the log level of the daemon running at host:port. This command internally connects to http://host:port/logLevel?log=name |
datanode
Runs a HDFS datanode.
Usage: hadoop datanode [-rollback]
| COMMAND_OPTION | Description |
|---|---|
| -rollback | Rollsback the datanode to the previous version. This should be used after stopping the datanode and distributing the old hadoop version. |
dfsadmin
Runs a HDFS dfsadmin client.
Usage: hadoop dfsadmin [GENERIC_OPTIONS] [-report] [-safemode enter | leave | get | wait] [-refreshNodes] [-finalizeUpgrade] [-upgradeProgress status | details | force] [-metasave filename] [-setQuota <quota> <dirname>...<dirname>] [-clrQuota <dirname>...<dirname>] [-restoreFailedStorage true|false|check] [-help [cmd]]
| COMMAND_OPTION | Description |
|---|---|
| -report | Reports basic filesystem information and statistics. |
| -safemode enter / leave / get / wait | Safe mode maintenance command. Safe mode is a Namenode state in which it 1. does not accept changes to the name space (read-only) 2. does not replicate or delete blocks. Safe mode is entered automatically at Namenode startup, and leaves safe mode automatically when the configured minimum percentage of blocks satisfies the minimum replication condition. Safe mode can also be entered manually, but then it can only be turned off manually as well. |
| -refreshNodes | Re-read the hosts and exclude files to update the set of Datanodes that are allowed to connect to the Namenode and those that should be decommissioned or recommissioned. |
| -finalizeUpgrade | Finalize upgrade of HDFS. Datanodes delete their previous version working directories, followed by Namenode doing the same. This completes the upgrade process. |
| -upgradeProgress status / details / force | Request current distributed upgrade status, a detailed status or force the upgrade to proceed. |
| -metasave filename | Save Namenode's primary data structures to filename in the directory specified by hadoop.log.dir property. filename is overwritten if it exists. filename will contain one line for each of the following 1. Datanodes heart beating with Namenode 2. Blocks waiting to be replicated 3. Blocks currrently being replicated 4. Blocks waiting to be deleted |
| -setQuota quota dirname...dirname | Set the quota quota for each directory dirname. The directory quota is a long integer that puts a hard limit on the number of names in the directory tree. Best effort for the directory, with faults reported if 1. N is not a positive integer, or 2. user is not an administrator, or 3. the directory does not exist or is a file, or 4. the directory would immediately exceed the new quota. |
| -clrQuota dirname...dirname | Clear the quota for each directory dirname. Best effort for the directory. with fault reported if 1. the directory does not exist or is a file, or 2. user is not an administrator. It does not fault if the directory has no quota. |
| -restoreFailedStorage true / false / check | This option will turn on/off automatic attempt to restore failed storage replicas. If a failed storage becomes available again the system will attempt to restore edits and/or fsimage during checkpoint. 'check' option will return current setting. |
| -help [cmd] | Displays help for the given command or all commands if none is specified. |
mradmin
Runs MR admin client
Usage: hadoop mradmin [ GENERIC_OPTIONS ] [-refreshQueueAcls]
| COMMAND_OPTION | Description |
|---|---|
| -refreshQueueAcls | Refresh the queue acls used by hadoop, to check access during submissions and administration of the job by the user. The properties present in mapred-queue-acls.xml is reloaded by the queue manager. |
jobtracker
Runs the MapReduce job Tracker node.
Usage: hadoop jobtracker [-dumpConfiguration]
| COMMAND_OPTION | Description |
|---|---|
| -dumpConfiguration | Dumps the configuration used by the JobTracker alongwith queue configuration in JSON format into Standard output used by the jobtracker and exits. |
namenode
Runs the namenode. More info about the upgrade, rollback and finalize is at Upgrade Rollback.
Usage: hadoop namenode [-format] | [-upgrade] | [-rollback] | [-finalize] | [-importCheckpoint]
| COMMAND_OPTION | Description |
|---|---|
| -format | Formats the namenode. It starts the namenode, formats it and then shut it down. |
| -upgrade | Namenode should be started with upgrade option after the distribution of new hadoop version. |
| -rollback | Rollsback the namenode to the previous version. This should be used after stopping the cluster and distributing the old hadoop version. |
| -finalize | Finalize will remove the previous state of the files system. Recent upgrade will become permanent. Rollback option will not be available anymore. After finalization it shuts the namenode down. |
| -importCheckpoint | Loads image from a checkpoint directory and save it into the current one. Checkpoint dir is read from property fs.checkpoint.dir |
secondarynamenode
Runs the HDFS secondary namenode. See Secondary Namenode for more info.
Usage: hadoop secondarynamenode [-checkpoint [force]] | [-geteditsize]
| COMMAND_OPTION | Description |
|---|---|
| -checkpoint [-force] | Checkpoints the Secondary namenode if EditLog size >= fs.checkpoint.size. If -force is used, checkpoint irrespective of EditLog size. |
| -geteditsize | Prints the EditLog size. |
tasktracker
Runs a MapReduce task Tracker node.
Usage: hadoop tasktracker
Administration Commands的更多相关文章
- [HDFS Manual] CH3 HDFS Commands Guide
HDFS Commands Guide HDFS Commands Guide 3.1概述 3.2 用户命令 3.2.1 classpath 3.2.2 dfs 3.2.3 envvars 3.2.4 ...
- ubuntu 搞坏了sudoers文件之修复方案
pkexec visudo askubuntu原回答摘抄如下 On a modern Ubuntu system (and many other GNU/Linux distributions), f ...
- 从零自学Hadoop(11):Hadoop命令上
阅读目录 序 概述 Hadoop Common Commands User Commands Administration Commands File System Shell 引用 系列索引 本文版 ...
- 从零自学Hadoop(12):Hadoop命令中
阅读目录 序 HDFS Commands User Commands Administration Commands Debug Commands 引用 系列索引 本文版权归mephisto和博客园共 ...
- 从零自学Hadoop(13):Hadoop命令下
阅读目录 序 MapReduce Commands User Commands Administration Commands YARN Commands User Commands Administ ...
- liunx作业一
一.linux发行版 linux发行版是以linux为内核,包含了系统软件和应用软件.简化系统安装的工具.软件安装升级的集成管理器. 典型的linux发行版包括:linux内核,一些GNU程序库和工具 ...
- 别出心裁的Linux命令学习法
别出心裁的Linux命令学习法 操作系统操作系统为你完成所有"硬件相关.应用无关"的工作,以给你方便.效率.安全.操作系统的功能我总结为两点:管家婆和服务生: 管家婆:通过进程.虚 ...
- DAY1 linux 50条命令
1. tar压缩,解压缩 tar -cvf *** (压缩) tar -xvf *** (解压缩) [root@bogon ~]# tar cvf test.tar test/ test/ test ...
- 在linux下获取帮助
1.使用man手册页 man是一种显示Unix/Linux在线手册的命令.可以用来查看命令.函数或文件的帮助手册,另外它还可以显示一些gzip压缩格式的文件. 读者在遇到不懂的命令时,可以用man查看 ...
随机推荐
- IO 流—>>>补充
流操作规律: 示例:1. 源: 键盘录入 目的: 控制台 2.源:文件 目的:控制台 3.源: 键盘录入 目的: 文件 基本规律: 面对流对象很多,不知道用哪一个的时候: 通过两个明确来完成 1.明确 ...
- 常用对象API、附加:集合补充
基本数据类型对象包装类: 为了方便操作基本数据类型值,将其封装成了对象,在对象中定义了属性和行为丰富了该数据的操作. 用于描述该对象的类就称为基本数据类型对象包装类. byte——Byte short ...
- EBS OAF开发中实现參数式弹出窗体
EBS OAF开发中实现參数式弹出窗体 (版权声明,本人原创或者翻译的文章如需转载,如转载用于个人学习,请注明出处:否则请与本人联系,违者必究) 概览 參数式弹出窗体和嵌入式弹出窗体不一样,它拥有独立 ...
- mybatis04 根据用户名称模糊查询用户信息
根据用户名称模糊查询用户信息可能返回多条记录. 1.1.1User.xml 编码 如果用%进行模糊查询,#{}表示一个占位符会被翻译为一个?号(SELECT * FROM USER WHERE id= ...
- iOS开发-javaScript交互
前言 当前混合开发模式迎来了前所未有的发展,跨平台开发.热更新等优点决定了这种模式的重要地位.虽然前端界面在交互.动效等多方面距离原生应用还有差距,但毫无疑问混合开发只会被越来越多的公司接受.在iOS ...
- C#泛型的性能优势
我写东西一向追求短小精悍,就不放代码去验证的,只说结论,并会与Java泛型做对比.有不对之处还望指出. 泛型作为一个在C#2.0中就引入的特性,也是C#的重要特性之一,我经常看到有人讨论泛型带来的便捷 ...
- Oracle学习----集群因子(Clustering Factor)
1.集群因子的算法: 通过dbms_rowid.rowid_block_number(rowid)找到记录对应的block 号.索引中记录了rowid,因此oracle 就可以根据索引中的rowid来 ...
- Android UI 开发
今天主要学习了Android UI开发的几个知识 6大布局 样式和主题→自定义样式.主题 JUnit单元测试 Toast弹窗功能简介 6大布局 RelativeLayout LinearLayout ...
- 【原】window上安装elasticserach
[window上安装elasticserach] 系统环境:2008R2 x64测试安装用的服务器IP:192.168.12.52elasticsearch版本:2.3.4JDK版本:jdk 1.8. ...
- [功能帮助类] C# BaseRandom随机数,随机字符,可限制范围-帮助类 (转载)
点击下载 BaseRandom.rar 主要功能如下 .产生随机字符 .产生随机数 .在一定范围内产生随机数 看下面代码吧 /// <summary> /// 编 码 人:苏飞 /// 联 ...