2.1.6版本HDFS RESOURCE 写入路径配置

Viewed 37

集群版本2.1.6
HDFS账号没有根目录权限,确认有/user/mpp 路径下完全权限
账号鉴权使用Kerberos认证,连hive也是通的
resource创建语句如下
create RESOURCE "remote_hdfs" PROPERTIES (
"type"="hdfs",
"fs.defaultFS"="hdfs://172.1.1.1:8020",
"root_path"="/user/mpp",
"hadoop.security.authentication"="kerberos",
"hadoop.kerberos.principal"="mpp@CN.CHINA.COM",
"hadoop.kerberos.keytab"="/home/doris/keytab/mpp.keytab",
"dfs.nameservices"="cluster",
"dfs.ha.namenodes.cluster" = "namenode663,namenode2382",
"dfs.namenode.rpc-address.cluster.namenode2382" = "172.1.1.1:8020",
"dfs.namenode.rpc-address.cluster.namenode663" = "172.1.1.2:8020",
"dfs.client.failover.proxy.provider.cluster" = "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider"
);

报错如下
W20241127 20:36:40.698213 22137 status.h:413] meet error status: [INTERNAL_ERROR]create dir failed. (BE: 172.16.1.1) namenode: /user/mpp path: /data/79043890, err: (13), Permission denied), reason: RemoteException: Permission denied: user=mpp, access=WRITE, inode="/data":hive:supergroup:drwxr-xr-x

如果把root_path参数拿掉,报错如下:
W20241127 20:39:08.540642 22139 status.h:413] meet error status: [INTERNAL_ERROR]create dir failed. (BE: 172.16.1.1) namenode: hdfs://172.1.1.1:8020 path: /data/79044677, err: (13), Permission denied), reason: RemoteException: Permission denied: user=mpp, access=WRITE, inode="/data":hive:supergroup:drwxr-xr-x

请教专家怎么正确配置

1 Answers
Permission denied: user=mpp, access=WRITE

看着是权限配置导致,可以检查下hdfs那边的账号或文件访问权限看看的。