Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-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 D07C41049C for ; Mon, 1 Jul 2013 09:52:55 +0000 (UTC) Received: (qmail 92860 invoked by uid 500); 1 Jul 2013 09:52:50 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 92715 invoked by uid 500); 1 Jul 2013 09:52:48 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 92705 invoked by uid 99); 1 Jul 2013 09:52:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 09:52:46 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dave@davecardwell.co.uk designates 209.85.192.180 as permitted sender) Received: from [209.85.192.180] (HELO mail-pd0-f180.google.com) (209.85.192.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 09:52:43 +0000 Received: by mail-pd0-f180.google.com with SMTP id 10so2456600pdi.39 for ; Mon, 01 Jul 2013 02:52:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=davecardwell.co.uk; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=14C4Qfca1hRu5g6iamqZKpfD0U8ZM0mUXgrpzVRkh80=; b=Btt8DHZVMp2yq33Kggpadbq62lWY/ffdma5+sNBNsNKwO26e5IT3VfoRYtWOBQgjKv E9kXEhnFMvrGYt64QM1iY330gpFAPFbN5AvyIYV3h/qNdzJ/F1Rweb7dsQWsxuRpen1x 9XLzI9ambmNujzOcaUF5HLAa/2ztBPK3UMneU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=14C4Qfca1hRu5g6iamqZKpfD0U8ZM0mUXgrpzVRkh80=; b=mdE+lz7/Q/Ove5a4l3BhlEsW7UucuePErhxRiCycoyMg1lIjmGfqTc7CaPrWHRzHF8 J+Re2JQeR85ZFfSPOfz+EB1Ix550C0qfIfY3hPOv5RLXEbF056Cr+u4wpWaZrgoutsoT 5a45O3ul92jz/vKV5pEFMS/snijxj3zYusCh66FHSa9I/bd/+fiEBGiEZjQw2Ct6Ygq/ csJoHMrQXAk6L1y/BGq96+akR4O7CV8djFW7/e3+nvjpdJotnDioA0rO6r5n/CkNBN0D +flx3tYgGc62UOurAnXv0N9qu5vmkQT3LtGSUSX23UO/wNfBIV8d06ZDz6pCVVQPylD1 zKYw== X-Received: by 10.68.253.227 with SMTP id ad3mr9692708pbd.63.1372672342757; Mon, 01 Jul 2013 02:52:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.70.38.129 with HTTP; Mon, 1 Jul 2013 02:52:02 -0700 (PDT) In-Reply-To: References: From: Dave Cardwell Date: Mon, 1 Jul 2013 10:52:02 +0100 Message-ID: Subject: Re: hiveserver2 Thrift Interface With Perl To: user@hive.apache.org, user@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7b1630d1621e3704e0702f79 X-Gm-Message-State: ALoCoQkGhZJeAJAPmg0L5lklHT+/w/jCHRbiUHLs6mOGv2WgB54/LE8UyMXtJuiv++jbBxyFsgeD X-Virus-Checked: Checked by ClamAV on apache.org --047d7b1630d1621e3704e0702f79 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I just wanted to update the list to let future searchers know that I found a solution=97David Morel of booking.com kindly shared some code with me to get this working, which he has now released as a Perl library that has been working well: https://github.com/dmorel/Thrift-API-HiveClient2 https://metacpan.org/release/Thrift-API-HiveClient2 --=20 Best wishes, Dave Cardwell. http://davecardwell.co.uk/ On 14 May 2013 11:35, Dave Cardwell wrote: > I wrote a few reporting scripts in Perl that connected to Hive via the > Thrift interface. > > Since we upgraded CDH to 4.2.0 and hiveserver2 was installed (with Hive > 0.10.0) the scripts no longer ran due to the API changes. > > I regenerated the Perl modules from the .thrift files and have tried to > translate the Java examples I=92ve found online, but cannot for the life = of > me get it working with the new interface. > > The Java examples seem to use a TOpenSessionReq class but I cannot find > this anywhere in the generated Perl modules. If I try to skip that part a= nd > go straight to $client->OpenSession() without an argument, the TCLIServic= e > module itself complains that it cannot create a TOpenSessionResp object > because the class is not loaded. > > I have attached example code. Can anyone advise me on how to get past thi= s > block? > > -- > Best wishes, > Dave Cardwell. > > http://davecardwell.co.uk/ > --047d7b1630d1621e3704e0702f79 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
I just wanted to update the list to let future searchers k= now that I found a solution=97David Morel of booking.com kindly shared some code with me to get this working, which= he has now released as a Perl library that has been working well:


--=A0
Best wishes,
Dave Cardwell= .



On 14 May 2013 11:35, Dave Cardwell <dave@davecardwell.co.uk> wrote:
I wrote a few reporting scripts in Perl that connected to = Hive via the Thrift interface.

Since we upgraded CDH to = 4.2.0 and hiveserver2 was installed (with Hive 0.10.0) the scripts no longe= r ran due to the API changes.

I regenerated the Perl modules from the .thrift files a= nd have tried to translate the Java examples I=92ve found online, but canno= t for the life of me get it working with the new interface.

The Java examples seem to use a=A0TOpenSessionReq class but I ca= nnot find this anywhere in the generated Perl modules. If I try to skip tha= t part and go straight to $client->OpenSession() without an argument, th= e TCLIService module itself complains that it cannot create a=A0TOpenSessio= nResp object because the class is not loaded.

I have attached example code. Can anyone advise me on h= ow to get past this block?

--=A0
Best wishes,
Dave Cardwell.
=


--047d7b1630d1621e3704e0702f79--