我正在尝试安装Hadoop以在我的MacBook Pro上试用它。我正在按照本文中的步骤http://dennyglee.com/2012/05/08/installing-hadoop-on-osx-lion-10-7/进行操作。但是,当我尝试执行namenode格式时,我失败了:
hadoop namenode -format /usr/local/Cellar/hadoop/1.1.2/libexec/bin/../conf/hadoop-env.sh:line 20:export:`-Djava.security.krb5.kdc =“':不是有效的标识符 错误:无法找到或加载主类“-Djava.security.krb5.realm =
我在hadoop-env.sh
中有以下定义导出JAVA_HOME =“$(/ usr / libexec / java_home)”
export HADOOP_OPTS =“ - Djava.security.krb5.realm = -Djava.security.krb5.kdc =”
export HADOOP_NAMENODE_OPTS =“ - Dcom.sun.management.jmxremote $ HADOOP_NAMENODE_OPTS” export HADOOP_SECONDARYNAMENODE_OPTS =“ - Dcom.sun.management.jmxremote 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”
有人可以指出我做错了什么。
谢谢,
杰里
答案 0 :(得分:0)
它没有从导出的变量中获取类名。您可以尝试从脚本中注释掉这一行并尝试:
export HADOOP_OPTS=”-Djava.security.krb5.realm= -Djava.security.krb5.kdc=”