Cant create a Hive Tble

Hi Team,
I cant able to create a hive table ontop of a directory in HDFS, its giving some permission issue.kindly do the needfull.

Thanks
Vignesh

Hi @Vignesh_Dhanaraj,

What error are you getting? Can you post your create statement?

Hi Abhinav,
Am the below error…

create external table sparkhivehbase1(key int, first_name string, last_name string, city string,age int) row format delimited fields terminated by ‘,’
location ‘/user/accessvignesh9151/sparkhivehbase’;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.security.AccessControlException: Permission denied:
user=accessvignesh9151, access=WRITE, inode="/":hdfs:hdfs:drwxr-xr-x
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:353)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:252)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1950)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1934)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPathAccess(FSDirectory.java:1908)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkAccess(FSNamesystem.java:8800)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.checkAccess(NameNodeRpcServer.java:2089)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.checkAccess(ClientNamenodeProtocolServerSideTranslatorPB.java:1466)
at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:640)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2351)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2347)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1869)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2347)
)

Hi Vignesh,

You will have write permissions only in your home directory in HDFS which is /user/accessvignesh9151

yes thats fine, but i have created the table in my home directory only /user/accessvignesh9151 but i cant able to do it.earlier this was working fine now its giving some issue. plz help on it.

Hi @Vignesh_Dhanaraj,

I can not see any data in /user/accessvignesh9151/sparkhivehbase

Can you please put some data there so that we can test it.

Hope this helps.

Thanks

Hi Abhinav,
The thing is that i am creating a hive table on the top of the directory ‘/user/accessvignesh9151/sparkhivehbase’. I should able to do it, earlier it was working fine, now only its giving error.