Hadoop mapreduce 本地调试,连接Hadoop服务器,看到hadoop log 返回:
2017-09-28 02:43:19,535 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.mkdirs from 192.168.59.100:58823 Call#4 Retry#0: org.apache.hadoop.security.AccessControlException: Permission denied: user=wangfeng, access=WRITE, inode="/home/tq/hadoop-data/usr":tq:supergroup:drwxr-xr-x
原因:
hdfs dfs -ls /home/tq 查看(/home/tq是原数据目录):
drwxr-xr-x - tq supergroup 0 2017-09-28 00:13 /home/tq/
用户wangfeng没有权限
为用户wangfeng加权限:
hdfs dfs -chown -R wangfeng /home/tq/
hdfs dfs -ls /home/tq
drwxr-xr-x - wangfeng supergroup 0 2017-09-28 00:13 /home/tq/
OK
2017-09-28 02:43:19,535 INFO org.apache.hadoop.ipc.Server: IPC Server handler 6 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.mkdirs from 192.168.59.100:58823 Call#4 Retry#0: org.apache.hadoop.security.AccessControlException: Permission denied: user=wangfeng, access=WRITE, inode="/home/tq/hadoop-data/usr":tq:supergroup:drwxr-xr-x
原因:
hdfs dfs -ls /home/tq 查看(/home/tq是原数据目录):
drwxr-xr-x - tq supergroup 0 2017-09-28 00:13 /home/tq/
用户wangfeng没有权限
为用户wangfeng加权限:
hdfs dfs -chown -R wangfeng /home/tq/
hdfs dfs -ls /home/tq
drwxr-xr-x - wangfeng supergroup 0 2017-09-28 00:13 /home/tq/
OK