使用CDH来安装大数据组件的时候,当安装到YARN、Hbase、Spark的时候报错,主要原因是YARN、Hbase、Spark在HDFS里面没有权限去创建文件
SparkSecurityManager: authentication disabled; ui acls disabled; users
with view permissions : Set(spark); groups with view permissions:
Set(); users with modify permissions: Set(spark) ;group with
modify permissions: Set()
运行下面的命令:
$ sudo -u hdfs hadoop fs -mkdir /user/spark
$ sudo -u hdfs hadoop fs -mkdir /user/spark/applicationHistory
$ sudo -u hdfs hadoop fs -chown -R spark:spark /user/spark
$ sudo -u hdfs hadoop fs -chmod 1777 /user/spark/applicationHistory
参考文档
YarnCaused by: org.apache.hadoop.security.AccessControlException: Permission denied: user=mapred, access=WRITE, inode="/user":hdfs:supergroup:drwxrwxr-x
运行下面的命令:
sudo -u hdfs hdfs dfs -chmod 775 /
sudo -u hdfs hdfs dfs -mkdir /user
sudo -u hdfs hdfs dfs -chown mapred:mapred /user
sudo -u hdfs hdfs dfs -mkdir /tmp
sudo -u hdfs hdfs dfs -chown mapred:mapred /tmp
参考文档
HbaseCaused by: org.apache.hadoop.security.AccessControlException: Permission denied: user=hbase, access=WRITE, inode="/user":hdfs:supergroup:drwxrwxr-x
运行下面的命令:
sudo -u hdfs hdfs dfs -mkdir /hbase
sudo -u hdfs hdfs dfs -chown hbase:hbase /hbase
仿照YARN的处理方案,尝试一下。