HDP 2.2 手动安装 namenode 格式 - 参数数量错误?

HDP 2.2 manual installation namenode format - wrong number of parameters?

我正在通过 RPM 在 CentOS 6.5 64 位上手动安装 Hortonworks Data Platform 2.2。在格式化名称节点期间参数不足错误是 "thrown"

这些是根据手册的说明:

Format and Start HDFS
1. Execute these commands at the NameNode host machine:
su - hdfs
/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh
namenode -format
/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh -
-config $HADOOP_CONF_DIR start namenode

但是在格式化命令期间:

[root@virtual ~]# su - hdfs
[hdfs@virtual ~]$ /usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh namenode -format
Usage: hadoop-daemon.sh [--config <conf-dir>] [--hosts hostlistfile] [--script script] (start|stop) <hadoop-command> <args...>

没有通过参数检查:

# Runs a Hadoop command as a daemon.
#
# Environment Variables
#
#   HADOOP_CONF_DIR  Alternate conf dir. Default is ${HADOOP_PREFIX}/conf.
#   HADOOP_LOG_DIR   Where log files are stored.  PWD by default.
#   HADOOP_MASTER    host:path where hadoop code should be rsync'd from
#   HADOOP_PID_DIR   The pid files are stored. /tmp by default.
#   HADOOP_IDENT_STRING   A string representing this instance of hadoop. $USER by default
#   HADOOP_NICENESS The scheduling priority for daemons. Defaults to 0.
##

export HADOOP_HOME=/usr/hdp/2.2.0.0-2041/hadoop
usage="Usage: hadoop-daemon.sh [--config <conf-dir>] [--hosts hostlistfile] [--script script] (start|stop) <hadoop-command> <args...>"

# if no args specified, show usage
if [ $# -le 1 ]; then
  echo $usage
  exit 1
fi

我不确定这是脚本错误还是手册错误...

任何提示都会有所帮助

感谢

要格式化 NameNode,您可以使用以下命令 运行 作为 'hdfs' 管理员用户:

/usr/bin/hdfs namenode -format

要启动 NameNode 守护进程,请使用 hadoop-daemon.sh 脚本:

/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh start namenode

"-config $HADOOP_CONF_DIR" 是一个可选参数,以防您想引用特定的 Hadoop 配置目录。