Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9DD0F3CC for ; Tue, 26 Mar 2013 20:42:24 +0000 (UTC) Received: (qmail 53335 invoked by uid 500); 26 Mar 2013 20:42:23 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 53238 invoked by uid 500); 26 Mar 2013 20:42:23 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 53230 invoked by uid 99); 26 Mar 2013 20:42:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 20:42:23 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FROM_12LTRDOM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Sanjay.Subramanian@wizecommerce.com designates 216.32.181.186 as permitted sender) Received: from [216.32.181.186] (HELO ch1outboundpool.messaging.microsoft.com) (216.32.181.186) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 20:42:16 +0000 Received: from mail190-ch1-R.bigfish.com (10.43.68.244) by CH1EHSOBE015.bigfish.com (10.43.70.65) with Microsoft SMTP Server id 14.1.225.23; Tue, 26 Mar 2013 20:41:55 +0000 Received: from mail190-ch1 (localhost [127.0.0.1]) by mail190-ch1-R.bigfish.com (Postfix) with ESMTP id A1568380148 for ; Tue, 26 Mar 2013 20:41:55 +0000 (UTC) X-Forefront-Antispam-Report: CIP:157.56.232.197;KIP:(null);UIP:(null);IPV:NLI;H:BLUPRD0411HT003.namprd04.prod.outlook.com;RD:none;EFVD:NLI X-SpamScore: -5 X-BigFish: PS-5(zzc85fh181fMzz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz18c673h8275bhz2fh2a8h668h839hbe3he5bhf0ah1288h12a5h12bdh137ah1441h1504h1537h153bh162dh1631h1758h18e1h1946h19b5h1ad9h1b0ah1bceh1155h) Received-SPF: pass (mail190-ch1: domain of wizecommerce.com designates 157.56.232.197 as permitted sender) client-ip=157.56.232.197; envelope-from=Sanjay.Subramanian@wizecommerce.com; helo=BLUPRD0411HT003.namprd04.prod.outlook.com ;.outlook.com ; Received: from mail190-ch1 (localhost.localdomain [127.0.0.1]) by mail190-ch1 (MessageSwitch) id 1364330513723410_852; Tue, 26 Mar 2013 20:41:53 +0000 (UTC) Received: from CH1EHSMHS024.bigfish.com (snatpool2.int.messaging.microsoft.com [10.43.68.238]) by mail190-ch1.bigfish.com (Postfix) with ESMTP id AD7F0320081 for ; Tue, 26 Mar 2013 20:41:53 +0000 (UTC) Received: from BLUPRD0411HT003.namprd04.prod.outlook.com (157.56.232.197) by CH1EHSMHS024.bigfish.com (10.43.70.24) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 26 Mar 2013 20:41:49 +0000 Received: from BLUPRD0411MB426.namprd04.prod.outlook.com ([169.254.10.122]) by BLUPRD0411HT003.namprd04.prod.outlook.com ([10.255.127.38]) with mapi id 14.16.0275.006; Tue, 26 Mar 2013 20:41:49 +0000 From: Sanjay Subramanian To: "user@hive.apache.org" Subject: Hive CLI works fine for "ALTER TABLE" but get HiveServerException using ThriftHive.Client Thread-Topic: Hive CLI works fine for "ALTER TABLE" but get HiveServerException using ThriftHive.Client Thread-Index: AQHOKmJW802Y2azRckKdRkiCR488hg== Date: Tue, 26 Mar 2013 20:41:48 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.127.4] Content-Type: multipart/alternative; boundary="_000_CD7754775FB1sanjaysubramanianwizecommercecom_" MIME-Version: 1.0 X-OriginatorOrg: wizecommerce.com X-Virus-Checked: Checked by ClamAV on apache.org --_000_CD7754775FB1sanjaysubramanianwizecommercecom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hive-site.xml setting --------------------- hive.security.authorization.enabled =3D true Script ------ ALTER TABLE myTable ADD PARTITION (partition1=3D'some_value1' , partition2= =3D'some_value2') LOCATION '/path/to/directory/on/hdfs/containing/data' I can execute this script using Hive CLI but ThriftHive.Client gives this e= rror 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.ja= va:1333) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) at org.apache.hadoop.hive.service.ThriftHive$Client.recv_execute(ThriftHive.ja= va:106) at org.apache.hadoop.hive.service.ThriftHive$Client.execute(ThriftHive.java:93= ) at com.wizecommerce.utils.hive.service.HiveServiceBAction.runActionStr(HiveSer= viceBAction.java:46) at com.wizecommerce.utils.hive.service.OutpdirHeaderAddPartition.addPartitions= (OutpdirHeaderAddPartition.java:105) at com.wizecommerce.utils.hive.service.OutpdirHeaderAddPartition.main(OutpdirH= eaderAddPartition.java:69) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.= NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor= Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:47= 2) at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:399) at org.a= pache.hadoop.mapred.MapTask.run(MapTask.java:334) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:152) at java.securi= ty.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.sec= urity.UserGroupInformation.doAs(UserGroupInformation.java:1332) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:147) Thanks sanjay CONFIDENTIALITY NOTICE =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This email message and any attachments are for the exclusive use of the int= ended 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 ema= il and destroy all copies of the original message along with any attachment= s, 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 d= isclosure by the sender's Email System Administrator. --_000_CD7754775FB1sanjaysubramanianwizecommercecom_ Content-Type: text/html; charset="us-ascii" Content-ID: <2F75DB7AE3C75244A4C791307D322B81@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable
Hive-site.xml setting&= nbsp;
---------------------<= /span>
hive.security.authoriz= ation.enabled =3D true

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

I can execute this scr= ipt using Hive CLI but ThriftHive.Client gives this error

HiveServerException(message:Query returned non-zero code: 403, cause: n= ull, 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&= nbsp;
org.apache.= hadoop.hive.service.ThriftHive$Client.execute(ThriftHive.java:93) at <= /div>
com.wizecom= merce.utils.hive.service.HiveServiceBAction.runActionStr(HiveServiceBAction= .java:46) at 
com.wizecom= merce.utils.hive.service.OutpdirHeaderAddPartition.addPartitions(OutpdirHea= derAddPartition.java:105) at 
com.wizecom= merce.utils.hive.service.OutpdirHeaderAddPartition.main(OutpdirHeaderAddPar= tition.java:69) at 
sun.reflect= .NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMetho= dAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
at sun.refl= ect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2= 5) at java.lang.reflect.Method.invoke(Method.java:597) 
at org.apac= he.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:472) at org.a= pache.hadoop.mapred.MapRunner.run(MapRunner.java:54) 
at org.apac= he.hadoop.mapred.MapTask.runOldMapper(MapTask.java:399) at org.apache.hadoo= p.mapred.MapTask.run(MapTask.java:334) at 
org.apache.= hadoop.mapred.YarnChild$2.run(YarnChild.java:152) at java.security.AccessCo= ntroller.doPrivileged(Native Method) at 
javax.secur= ity.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserG= roupInformation.doAs(UserGroupInformation.java:1332) 
at org.apac= he.hadoop.mapred.YarnChild.main(YarnChild.java:147)

Than= ks
sanj= ay


CONFIDENTIALITY NOTICE
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This email message and any attachments are for the exclusive use of the int= ended 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 ori= ginal message along with any attachments, from your computer system. If you= are the intended recipient, please be advised that the content of this mes= sage is subject to access, review and disclosure by the sender's Email System Administrator.
--_000_CD7754775FB1sanjaysubramanianwizecommercecom_--