Sunil S. Ranka's Weblog

Superior BI is the antidote to Business Failure

Permission Denied Exception When ran count(*) query on Hive/Impala

Posted by sranka on October 8, 2013

Hi All

While while running a simple

beeline > select count(*) from samvi_test_table;

Got the following error.

<br />Job Submission failed with exception ' denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x<
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkAncestorAccess(
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInternal(
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirsInt(
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(

After debugging into the details, found out the to read the count() the user needs to read the blocks on the HDFS. Since the user didn’t have needed privileges, I was getting the error. The issue was resolved using below ::

sudo -u hdfs hadoop fs -mkdir /user/root
sudo -u hdfs hadoop fs -chown root:root /user/root<br />

Hope this helps.

Sunil S Ranka

“Superior BI is the antidote to Business Failure”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 49 other followers

%d bloggers like this: