开启kerberos身份验证后,root账号没有了执行hdfs写的权限
[root@masternode1 centos]#
hadoop jar /opt/hadoop/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/jar/hadoop-mapreduce-examples-2.6.0-cdh5.7.1.jar wordcount/input /output/wordcount
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x
核查了下/output目录的权限如下
[hdfs@masternode1 ~]$ hdfs dfs -ls /output
Found 1 items
drwxr-xr-x - hdfs supergroup 0 2016-11-23 15:45 /output/wordcount
[root@masternode1 centos]# su - hdfs
[hdfs@masternode1 ~]$ hdfs dfs -mkdir /input
[hdfs@masternode1 jars]$ hadoop jar hadoop-mapreduce-examples-2.6.0-cdh5.7.1.jar wordcount /input/1.txt/output/wordcount16/11/23 18:00:03 INFO client.RMProxy: Connecting to ResourceManager at masternode1/10.10.10.13:8032
16/11/23 18:00:04 INFO input.FileInputFormat: Total input paths to process : 1
16/11/23 18:00:04 INFO mapreduce.JobSubmitter: number of splits:1
16/11/23 18:00:04 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1478226826452_0014
16/11/23 18:00:04 INFO impl.YarnClientImpl: Submitted application application_1478226826452_0014
16/11/23 18:00:04 INFO mapreduce.Job: The url to track the job: http://masternode1:8088/proxy/application_1478226826452_0014/
16/11/23 18:00:04 INFO mapreduce.Job: Running job: job_1478226826452_0014
16/11/23 18:00:09 INFO mapreduce.Job: Job job_1478226826452_0014 running in uber mode : false
16/11/23 18:00:09 INFO mapreduce.Job: map 0% reduce 0%
16/11/23 18:00:14 INFO mapreduce.Job: map 100% reduce 0%
16/11/23 18:00:20 INFO mapreduce.Job: map 100% reduce 13%
16/11/23 18:00:25 INFO mapreduce.Job: map 100% reduce 25%
16/11/23 18:00:30 INFO mapreduce.Job: map 100% reduce 38%
16/11/23 18:00:35 INFO mapreduce.Job: map 100% reduce 50%
16/11/23 18:00:41 INFO mapreduce.Job: map 100% reduce 63%
16/11/23 18:00:46 INFO mapreduce.Job: map 100% reduce 75%
16/11/23 18:00:51 INFO mapreduce.Job: map 100% reduce 88%
16/11/23 18:00:56 INFO mapreduce.Job: map 100% reduce 100%
16/11/23 18:00:57 INFO mapreduce.Job: Job job_1478226826452_0014 completed successfully
16/11/23 18:00:57 INFO mapreduce.Job: Counters: 49
File System Counters
FILE: Number of bytes read=344
FILE: Number of bytes written=2004410
FILE: Number of read operations=0
FILE: Number of large read operations=0
FILE: Number of write operations=0
HDFS: Number of bytes read=112
HDFS: Number of bytes written=16
HDFS: Number of read operations=51
HDFS: Number of large read operations=0
HDFS: Number of write operations=32
Job Counters
Launched map tasks=1
Launched reduce tasks=16
Data-local map tasks=1
Total time spent by all maps in occupied slots (ms)=3003
Total time spent by all reduces in occupied slots (ms)=47687
Total time spent by all map tasks (ms)=3003
Total time spent by all reduce tasks (ms)=47687
Total vcore-seconds taken by all map tasks=3003
Total vcore-seconds taken by all reduce tasks=47687
Total megabyte-seconds taken by all map tasks=3075072
Total megabyte-seconds taken by all reduce tasks=48831488
Map-Reduce Framework
Map input records=1
Map output records=2
Map output bytes=20
Map output materialized bytes=280
Input split bytes=100
Combine input records=2
Combine output records=2
Reduce input groups=2
Reduce shuffle bytes=280
Reduce input records=2
Reduce output records=2
Spilled Records=4
Shuffled Maps =16
Failed Shuffles=0
Merged Map outputs=16
GC time elapsed (ms)=251
CPU time spent (ms)=8650
Physical memory (bytes) snapshot=4489195520
Virtual memory (bytes) snapshot=27209728000
Total committed heap usage (bytes)=8583118848
Shuffle Errors
BAD_ID=0
CONNECTION=0
IO_ERROR=0
WRONG_LENGTH=0
WRONG_MAP=0
WRONG_REDUCE=0
File Input Format Counters
Bytes Read=12
File Output Format Counters
Bytes Written=16
[hdfs@masternode1 ~]$ hdfs dfs -ls /output/wordcount
Found 17 items
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/_SUCCESS
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00000
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00001
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00002
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00003
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00004
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00005
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00006
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00007
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00008
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00009
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00010
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00011
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00012
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00013
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00014
-rw-r--r-- 3 hdfs supergroup 0 2016-11-23 15:45 /output/wordcount/part-r-00015
没做完,后续继续