$ bin / hadoop namenode -format错误:在cygwin中找不到命令

时间:2017-05-20 09:39:04

标签: hadoop installation cygwin

我一直关注hadoop windows7安装format教程
一切都很顺利,但是在格式化名称节点时我遇到了问题 我无法执行bin/hadoop namenode -format命令$ bin/hadoop namenode -format bin/hadoop: line 2: $'\r': command not found bin/hadoop: line 17: $'\r': command not found bin/hadoop: line 18: $'\r': command not found bin/hadoop: line 56: $'\r': command not found bin/hadoop: line 58: cd: $'bin\r': No such file or directory bin/hadoop: line 59: $'\r': command not found bin/hadoop: line 67: syntax error near unexpected token `$'in\r'' 'in/hadoop: line 67: `case "`uname`" in
一旦我点击此命令,我就会收到以下错误:

hadoop-env.sh

我按照http://saphanatutorial.com/hadoop-installation-on-windows-7-using-cygwin/中提到的解决方案对计算机属性中的hadoop-env.sh文件和系统变量路径进行了必要的更改。

问题仍未解决。能不能让我知道我哪里出错了。
PFB # Set Hadoop-specific environment variables here. # The only required environment variable is JAVA_HOME. All others are # optional. When running a distributed configuration it is best to # set JAVA_HOME in this file, so that it is correctly defined on # remote nodes. # The java implementation to use. Required. export JAVA_HOME="/cygdrive/c/PROGRA~1/Java/jdk1.7.0_80" # Extra Java CLASSPATH elements. Optional. # export HADOOP_CLASSPATH= # The maximum amount of heap to use, in MB. Default is 1000. # export HADOOP_HEAPSIZE=2000 # Extra Java runtime options. Empty by default. # export HADOOP_OPTS=-server # Command specific options appended to HADOOP_OPTS when specified export HADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_NAMENODE_OPTS" export HADOOP_SECONDARYNAMENODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_SECONDARYNAMENODE_OPTS" export HADOOP_DATANODE_OPTS="-Dcom.sun.management.jmxremote $HADOOP_DATANODE_OPTS" export HADOOP_BALANCER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_BALANCER_OPTS" export HADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote $HADOOP_JOBTRACKER_OPTS" # export HADOOP_TASKTRACKER_OPTS= # The following applies to multiple commands (fs, dfs, fsck, distcp etc) # export HADOOP_CLIENT_OPTS # Extra ssh options. Empty by default. # export HADOOP_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HADOOP_CONF_DIR" # Where log files are stored. $HADOOP_HOME/logs by default. # export HADOOP_LOG_DIR=${HADOOP_HOME}/logs # File naming remote slave hosts. $HADOOP_HOME/conf/slaves by default. # export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves # host:path where hadoop code should be rsync'd from. Unset by default. # export HADOOP_MASTER=master:/home/$USER/src/hadoop # Seconds to sleep between slave commands. Unset by default. This # can be useful in large clusters, where, e.g., slave rsyncs can # otherwise arrive faster than the master can service them. # export HADOOP_SLAVE_SLEEP=0.1 # The directory where pid files are stored. /tmp by default. # NOTE: this should be set to a directory that can only be written to by # the users that are going to run the hadoop daemons. Otherwise there is # the potential for a symlink attack. # export HADOOP_PID_DIR=/var/hadoop/pids # A string representing this instance of hadoop. $USER by default. # export HADOOP_IDENT_STRING=$USER # The scheduling priority for daemon processes. See 'man nice'. # export HADOOP_NICENESS=10 文件配置:

predicted=truth

0 个答案:

没有答案