hdp2.2手动安装namenode格式-参数数目错误?

hc8w905p  于 2021-06-04  发布在  Hadoop
关注(0)|答案(1)|浏览(369)

我正在centos 6.5 64位rpm上手动安装hortonworks数据平台2.2。在格式化namenode insufficent parameters期间,会“抛出”错误
这些是手册中的说明:

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

我不确定这是脚本中的错误还是手册中的错误。。。
任何暗示都会有帮助
谢谢

1sbrub3j

1sbrub3j1#

要格式化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\u conf\u dir”在这里是一个可选参数,以防您要引用特定的hadoop配置目录。

相关问题