1)异常情况描述
Permission denied: user=anonymous, access=WRITE, inode="/user/hive/warehouse":root:supergroup:drwxr-xr-x
Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.. MetaException(message:Got exception: Permission denied: user=anonymous, access=WRITE, inode="/user/hive/warehouse":root:supergroup:drwxr-xr-x
at .hadoop.(:496)
at .server.(:336)
at (:360)
at (:239)
at (:1909)
at (:1893)
at (:1852)
at (:60)
at (:3407)
at (:1161)
at (:739)
at $ClientNamenodeProtocol
2.
c
a
l
l
B
l
o
c
k
i
n
g
M
e
t
h
o
d
(
C
l
i
e
n
t
N
a
m
e
n
o
d
e
P
r
o
t
o
c
o
l
P
r
o
t
o
s
.
j
a
v
a
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
P
r
o
t
o
b
u
f
R
p
c
E
n
g
i
n
e
2
() at .ProtobufRpcEngine2
2.callBlockingMethod(ClientNamenodeProtocolProtos.java)atorg.apache.hadoop.ipc.ProtobufRpcEngine2Server
P
r
o
t
o
B
u
f
R
p
c
I
n
v
o
k
e
r
.
c
a
l
l
(
P
r
o
t
o
b
u
f
R
p
c
E
n
g
i
n
e
2.
j
a
v
a
:
532
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
R
P
C
(:532) at
ProtoBufRpcInvoker.call(ProtobufRpcEngine2.java:532)atorg.apache.hadoop.ipc.RPC(:1070)
at
R
p
c
C
a
l
l
.
r
u
n
(
S
e
r
v
e
r
.
j
a
v
a
:
1020
)
a
t
o
r
g
.
a
p
a
c
h
e
.
h
a
d
o
o
p
.
i
p
c
.
S
e
r
v
e
r
(:1020) at
RpcCall.run(Server.java:1020)atorg.apache.hadoop.ipc.Server(:948)
at (Native Method)
at (:422)
at (:1845)
at $(:2952)
2)原因分析
hdfs中的 /user/hive/warehouse没有读写权限
3)解决办法
在命令行执行命令:hdfs dfs -chmod -R 777 /user 再重新运行脚本