[1.2.1]

来源:互联网 发布:男变女声音软件 编辑:程序博客网 时间:2024/06/11 06:07

有用link

http://dongxicheng.org/mapreduce/hadoop-permission-management/

http://dongxicheng.org/category/apache-mesos/

http://dongxicheng.org/category/structure/

http://dongxicheng.org/structure/knapsack-problems/


http://localhost:50030/jobtracker.jsp

http://localhost:50070/dfshealth.jsp

hadoop fs -ls hdfs://localhost:9000/user/hehe


export PIG_INSTALL=$HOME/bin/pig-0.12.0export JAVA_HOME=$HOME/bin/jdk1.7.0_40/export HADOOP_INSTALL=$HOME/bin/hadoop-1.2.1export PATH=$HADOOP_INSTALL/bin/:$HADOOP_INSTALL/sbin:$PIG_INSTALL/bin:$PATHsource it.vi bin/hadoop132 export JAVA_HOME="/home/usergrid/bin/jdk1.7.0_40/"

> chown -R usergrid pig> ll  | grep usergridlrwxrwxrwx. 1 usergrid root         21 Nov  6 22:19 pig -> /root/grid/pig-0.12.0> chown -R usergrid:usergrid pig> ll  | grep usergridlrwxrwxrwx. 1 usergrid usergrid      21 Nov  6 22:19 pig -> /root/grid/pig-0.12.0


man chown

 chown - change file owner and group

EXAMPLES
       chown root /u
              Change the owner of /u to "root".

       chown root:staff /u
              Likewise, but also change its group to "staff".

       chown -hR root /u
              Change the owner of /u and subfiles to "root".


error;

1

> hadoop fs -mkdir pig_warehourse
mkdir: org.apache.hadoop.security.AccessControlException: Permission denied: user=hehe, access=WRITE, inode="":usergrid:supergroup:rwxr-xr-x

sulution:added this entry to conf/hdfs-site.xml

<property>
<name>dfs.permissions</name>
<value>false</value>
</property>


2.

> hadoop fs -mkdir pig_warehourse
mkdir: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /user/hehe/pig_warehourse. Name node is in safe mode.

hadoop dfsadmin -leave

check the url http://localhost:50030/jobtracker.jsp

once its start up down, it will turn off the SafeMode.

3.

ACL

http://www.linuxidc.com/Linux/2012-01/50858.htm

http://sishuok.com/forum/blogPost/list/0/5966.html

http://blog.csdn.net/yangjl38/article/details/7583374

原创粉丝点击