Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6B7D2DB58 for ; Tue, 14 May 2013 18:09:59 +0000 (UTC) Received: (qmail 73316 invoked by uid 500); 14 May 2013 18:09:54 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 73184 invoked by uid 500); 14 May 2013 18:09:54 -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 Delivered-To: moderator for user@hadoop.apache.org Received: (qmail 46824 invoked by uid 99); 14 May 2013 16:44:27 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of prasadm@cloudera.com designates 209.85.216.51 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=45oPM+WjWJufhOGkjE+yNhnaCG6p1a5itxXRHztcs94=; b=VGEGh8BgD67rQIsMHSG3QB2lw1/wjnQKP80QUKagpovjP/osJsi+HmD11KFkiZk4/V U0NGOEajFz+wNc2A8dC41GH+2oU5bYAYLjjcoTAF0NEbAxI5W9ZN8r+rYrx2rPf+fFyV T0nqex77i/hkZCNQ6iMPzr0BfdNoDkMUvZ5bDg5HMVPqnGN9hrhIsgXMLLEsh3TjNbv6 ItfhFgAZjspa0F7PxVgPK2IEQt5ak3ZrypyRzdPBB8fy92Eu8K57kxQHEB1rDhhSIOME vhXdue+m9vd5ZxdoYBGwNfORg+RXb5spoNqnQyQCHtFAXmjCc+wL1/Zn74OAzqRVs2gq pG4A== MIME-Version: 1.0 X-Received: by 10.224.53.4 with SMTP id k4mr25180842qag.63.1368549841107; Tue, 14 May 2013 09:44:01 -0700 (PDT) In-Reply-To: References: Date: Tue, 14 May 2013 09:44:01 -0700 Message-ID: Subject: Re: hiveserver2 Thrift Interface With Perl From: Prasad Mujumdar To: "user@hive.apache.org" Cc: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=20cf3071d10c2342e004dcb0578d X-Gm-Message-State: ALoCoQlmSobbxZ5aK2Rex+oNU9ch1qgOyXAbIbRbY+fM0WpKoQDgPHD0lQq3AramIjztvW4TtXtQ X-Virus-Checked: Checked by ClamAV on apache.org --20cf3071d10c2342e004dcb0578d Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable HiveServer2 uses Thrift SASL transport by default. AFAIK, Thrift doesn't support sasl transport for perl. In order to connect from a perl thrift client, you need to turn off the SASL in HiveServer2. This can be done by setting a property hive.server2.authentication to NOSASL in the hive-site.xml. Note that with this change, all other clients like JDBC applications and beeline, will also need to make non-sasl connection to HiveServer2. The JDBC connection URL should be jdbc:hive2://:/default;auth=3DnoSasl thanks Prasad On Tue, May 14, 2013 at 3:35 AM, Dave Cardwell wro= te: > 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/ > --20cf3071d10c2342e004dcb0578d Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable

=A0 =A0HiveServer2 uses Thrift SASL transport by = default. AFAIK, Thrift doesn't support sasl transport for perl. In orde= r to connect from a perl thrift client, you need to turn off the SASL in Hi= veServer2. This can be done by setting a property hive.server2.authenticati= on to NOSASL in the hive-site.xml. Note that with this change, all other cl= ients like JDBC applications and beeline, will also need to make non-sasl c= onnection to HiveServer2. The JDBC connection URL should be=A0jdbc:hive2://= <host>:<port>/default;auth=3DnoSasl

--20cf3071d10c2342e004dcb0578d--