我已经按照这个方法在我的ubuntu 12.04.4上配置hadoop:
http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/
执行此命令时
./hadoop dfs -mkdir /In
我有这个错误:
mkdir: org.apache.hadoop.security.AccessControlException: Permission denied: user=hduser, access=WRITE, inode="":root:supergroup:rwxr-xr-x
在我执行命令的操作方法中:
sudo chmod 750 /app/hadoop/tmp
如果我给chmod 777,错误不会改变。我不明白这是什么问题。
P.s:How-To和我的配置之间的唯一区别在于我的方法是hadoop-env.sh:
# The java implementation to use. Required.
export JAVA_HOME=/usr/lib/jvm/java-6-sun
在我的配置中,我有:
# The java implementation to use. Required.
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64
因为我使用openjdk。
另一个问题,如果我给出命令./start-all.sh我有这些输出:
Warning: $HADOOP_HOME is deprecated.
starting namenode, logging to /home/hduser/hadoop/libexec/../logs/hadoop-hduser-namenode-ubuntu.out
hduser@localhost's password:
localhost: starting datanode, logging to /home/hduser/hadoop/libexec/../logs/hadoop-hduser-datanode-ubuntu.out
hduser@localhost's password:
localhost: starting secondarynamenode, logging to /home/hduser/hadoop/libexec/../logs/hadoop-hduser-secondarynamenode-ubuntu.out
starting jobtracker, logging to /home/hduser/hadoop/libexec/../logs/hadoop-hduser-jobtracker-ubuntu.out
hduser@localhost's password:
localhost: starting tasktracker, logging to /home/hduser/hadoop/libexec/../logs/hadoop-hduser-tasktracker-ubuntu.out
我不明白他为什么要问我好几次。
如果我执行命令./stop-all.s我有这个输出:
Warning: $HADOOP_HOME is deprecated.
no jobtracker to stop
hduser@localhost's password:
localhost: stopping tasktracker
no namenode to stop
hduser@localhost's password:
localhost: no datanode to stop
hduser@localhost's password:
localhost: no secondarynamenode to stop
这是女性吗?
答案 0 :(得分:1)
为了创建新的hdfs目录,您应该拥有具有适当权限的专用hadoop用户。请按照以下步骤解决您的问题
$ sudo addgroup hadoop
$ sudo adduser --ingroup hadoop hduser
$ cd /usr/local
$ sudo tar xzf hadoop-1.0.3.tar.gz
$ sudo mv hadoop-1.0.3 hadoop
$ sudo chown -R hduser:hadoop hadoop