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的更多相关文章

  1. [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 ...

  2. ubuntu 搞坏了sudoers文件之修复方案

    pkexec visudo askubuntu原回答摘抄如下 On a modern Ubuntu system (and many other GNU/Linux distributions), f ...

  3. 从零自学Hadoop(11):Hadoop命令上

    阅读目录 序 概述 Hadoop Common Commands User Commands Administration Commands File System Shell 引用 系列索引 本文版 ...

  4. 从零自学Hadoop(12):Hadoop命令中

    阅读目录 序 HDFS Commands User Commands Administration Commands Debug Commands 引用 系列索引 本文版权归mephisto和博客园共 ...

  5. 从零自学Hadoop(13):Hadoop命令下

    阅读目录 序 MapReduce Commands User Commands Administration Commands YARN Commands User Commands Administ ...

  6. liunx作业一

    一.linux发行版 linux发行版是以linux为内核,包含了系统软件和应用软件.简化系统安装的工具.软件安装升级的集成管理器. 典型的linux发行版包括:linux内核,一些GNU程序库和工具 ...

  7. 别出心裁的Linux命令学习法

    别出心裁的Linux命令学习法 操作系统操作系统为你完成所有"硬件相关.应用无关"的工作,以给你方便.效率.安全.操作系统的功能我总结为两点:管家婆和服务生: 管家婆:通过进程.虚 ...

  8. DAY1 linux 50条命令

    1. tar压缩,解压缩 tar -cvf *** (压缩) tar -xvf ***  (解压缩) [root@bogon ~]# tar cvf test.tar test/ test/ test ...

  9. 在linux下获取帮助

    1.使用man手册页 man是一种显示Unix/Linux在线手册的命令.可以用来查看命令.函数或文件的帮助手册,另外它还可以显示一些gzip压缩格式的文件. 读者在遇到不懂的命令时,可以用man查看 ...

随机推荐

  1. UF2.0、O4、UFT、TA众明星背后的秘密

    UF2.0--经纪业务运营平台 O4--投资交易管理系统软件 UFT--证券极速交易系统软件 TA--登记过户系统 -- 说到恒生在业内的明星产品,太多了,小编一口气说不完,但小编只知其一,殊不知这些 ...

  2. shell脚本采用crontab定时备份数据库日志

    测试服务器上才用定时脚本备份一个数据库 并打包压缩成tar避免文件过大 脚本如下: 测试服务器的shell backup_mysql.sh #!/bin/bash BASE_PATH=/alidata ...

  3. android考试题

    一.选择题 1. Math.round(11.5)等于多少(    ). Math.round(-11.5) 等于多少(   C  ). A.11 ,-11    B.11 ,-12 C.12 ,-1 ...

  4. jquerymobile-可折叠内容(Collapsible content)

    可能我们在开发中遇到过这样的问题,我们只是看到一个题目或者简单的介绍,然后一点击会在下面展开对应的详细的内容.在jqm中实现这个效果很简单.下面给出一段例子代码: <!DOCTYPE html& ...

  5. android intent 隐式意图和显示意图(activity跳转)

    android中的意图有显示意图和隐式意图两种, 显示意图要求必须知道被激活组件的包和class 隐式意图只需要知道跳转activity的动作和数据,就可以激活对应的组件 A 主activity  B ...

  6. ExtJS笔记--applyTo和renderTo的差别

    extjs中常常会用到renderTo或applyTo配置选项.这里,我就比較下两者的差别与使用方法.1.renderTo与render方法相应2.applyTo与applyToMarkup方法相应 ...

  7. kafka Windows客户端Linux服务器---转

    原文:http://blog.csdn.net/jingshuigg/article/details/25001979 一.对于服务器端的搭建可以参考上一篇文章:kafka单机版环境搭建与测试 服务器 ...

  8. Linux删除文件Argument list too long问题的解决方案

    方法一:使用find find . -name 文件 | xargs rm -f 但文件数量过多,find命令也会出现问题: -bash: /bin/find: Argument list too l ...

  9. C# 事件的理解

    说实话,事件弄得还是很晕,有待于以后的强化吧,下面是我对事件的一点理解 首先,参见大牛的帖子:网上大牛事件讲解 下面我来说一说事件的大致流程: 事件委托事件概述事件就是当对象或类状态发生改变时,对象或 ...

  10. Unty3D动态加载图片

    试验动态加载图片,代码如下: using UnityEngine; using System.Collections; public class DynamicLoad : MonoBehaviour ...