Support Questions
Find answers, ask questions, and share your expertise

Unable to load data into hive from file on hdfs - User null does not belong to hdfs


I am unable to load data into hive from a file that exists on hdfs using hive interactively. If I place the user in the hdfs group, this works, but, of course, grants way more privileges than I want on hdfs for a basic user.

Can interactive hive commands access HDFS without being a member of the group?


user@server:~$ hdfs dfs -put /home/user/test99.csv /user/user/test99.csv

user@server:~$ hive
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.

Logging initialized using configuration in file:/etc/hive/

hive> LOAD DATA INPATH '/user/user/test99.csv' INTO TABLE test96;

Loading data to table default.test96
Failed with exception User null does not belong to hdfs

at org.apache.hadoop.hdfs.server.namenode.FSDirAttrOp.setOwner(

at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.setOwner(

at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.setOwner(

at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.setOwner(

at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(

at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$
at org.apache.hadoop.ipc.RPC$
at org.apache.hadoop.ipc.Server$Handler$

at org.apache.hadoop.ipc.Server$Handler$
at Method)


at org.apache.hadoop.ipc.Server$

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask


New Contributor

Your user does not have permissions to write to HDFS.

Try to run the query with the user that belongs to hadoop/hdfs group.


My user has access to HDFS, but only his own space. As I mentioned in the question, I know it works when I put the regular user into the HDFS group. I do not want to do this, because it grants the user access to everyone's HDFS space, just like the hdfs user. I want to get this working without the user being a member of the hdfs group. Is this possible?

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.