问题提示:
Exception in thread “main” org.apache.hadoop.security.AccessControlException: Permission deniedUse
Permission denied: user=zhuy, access=WRITE, inode="/user":root:supergroup:drwxr-xr-x
解决方法:
- 在hdfs的配置文件中,将dfs.permissions.enabled修改为False
- hadoop fs -chmod 777 /
- 添加有读写权限的用户
Properties properties = System.getProperties();
properties.setProperty("HADOOP_USER_NAME", "root");