Spark学习(权限错误)



在集群的master上执行spark-shell时出现如下错误:

16/09/09 15:42:14 ERROR spark.SparkContext: Error initializing SparkContext.
org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

1)在网上搜索了一下,修改hdfs-site.xml,增加


dfs.permissions
false

好像没有用,最后用sudo方式修改了/user的权限:

[root@master conf.dist]# hdfs dfs -ls /user
Found 4 items
drwxrwxrwx   - mapred hadoop          0 2016-09-09 14:17 /user/history
drwxrwxr-x   - hue    hue             0 2016-09-09 10:06 /user/hue
drwxr-x--x   - spark  spark           0 2016-09-08 21:45 /user/spark
drwxrwxr-x   - sqoop2 sqoop           0 2016-09-08 21:45 /user/sqoop2
[root@master conf.dist]# sudo -uhdfs hdfs dfs -ls
ls: `.': No such file or directory
[root@master conf.dist]# sudo -uhdfs hdfs dfs -chmod 777 /user
[root@master conf.dist]# hdfs dfs -ls
ls: `.': No such file or directory
[root@master conf.dist]# sudo -uhdfs hdfs dfs -chmod 777 .
chmod: `.': No such file or directory
[root@master conf.dist]# sudo -uhdfs hdfs dfs -chmod 777 /
[root@master conf.dist]# hdfs dfs -ls
ls: `.': No such file or directory
[root@master conf.dist]# spark-shell

 

 

你可能感兴趣的:(4,学习笔记,大数据)