Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Hive CLI works fine for "ALTER TABLE" but get HiveServerException using ThriftHive.Client


Copy link to this message
-
Hive CLI works fine for "ALTER TABLE" but get HiveServerException using ThriftHive.Client
Hive-site.xml setting
---------------------
hive.security.authorization.enabled = true

Script
------
ALTER TABLE myTable ADD PARTITION (partition1='some_value1' , partition2='some_value2') LOCATION '/path/to/directory/on/hdfs/containing/data'

I can execute this script using Hive CLI but ThriftHive.Client gives this error

HiveServerException(message:Query returned non-zero code: 403, cause: null, errorCode:403, SQLState:null) at
org.apache.hadoop.hive.service.ThriftHive$execute_result.read(ThriftHive.java:1333) at
org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) at
org.apache.hadoop.hive.service.ThriftHive$Client.recv_execute(ThriftHive.java:106) at
org.apache.hadoop.hive.service.ThriftHive$Client.execute(ThriftHive.java:93) at
com.wizecommerce.utils.hive.service.HiveServiceBAction.runActionStr(HiveServiceBAction.java:46) at
com.wizecommerce.utils.hive.service.OutpdirHeaderAddPartition.addPartitions(OutpdirHeaderAddPartition.java:105) at
com.wizecommerce.utils.hive.service.OutpdirHeaderAddPartition.main(OutpdirHeaderAddPartition.java:69) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:472) at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:399) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:334) at
org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:152) at java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1332)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:147)

Thanks
sanjay
CONFIDENTIALITY NOTICE
=====================This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.