Return-Path: Delivered-To: apmail-hive-user-archive@www.apache.org Received: (qmail 32810 invoked from network); 24 Mar 2011 20:36:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Mar 2011 20:36:51 -0000 Received: (qmail 78268 invoked by uid 500); 24 Mar 2011 20:36:50 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 78149 invoked by uid 500); 24 Mar 2011 20:36:50 -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 78141 invoked by uid 99); 24 Mar 2011 20:36:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 20:36:50 +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 matthew@foursquare.com designates 209.85.220.176 as permitted sender) Received: from [209.85.220.176] (HELO mail-vx0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 20:36:44 +0000 Received: by vxi40 with SMTP id 40so523824vxi.35 for ; Thu, 24 Mar 2011 13:36:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.0.199 with SMTP id 7mr2677617vdg.307.1300998983558; Thu, 24 Mar 2011 13:36:23 -0700 (PDT) Received: by 10.52.164.98 with HTTP; Thu, 24 Mar 2011 13:36:23 -0700 (PDT) Date: Thu, 24 Mar 2011 16:36:23 -0400 Message-ID: Subject: Adding a temporary function for thirft queries From: Matthew Rathbone To: user@hive.apache.org Content-Type: multipart/alternative; boundary=20cf304346f044a607049f406e16 --20cf304346f044a607049f406e16 Content-Type: text/plain; charset=ISO-8859-1 Hey all, We use Amazon's elastic mapreduce and Hive 0.7 to run analytics queries, and I'm having problems dynamically adding functions for use in the thrift server. I want to add a jar, add a function, then execute a query. Using ruby as the example, I've tried: Hive.connect(@url, @port) do |connection| connection.execute() results = connection.fetch(query) end but the function is not available between calls. So I tried prepending the query with the function creation calls, but then I don't get any data back from hive (simply an empty array). Could someone direct me to the best way to add functions for thrift queries? Honestly I'd rather add them permanently on startup, but I can't find a way to do that either. --20cf304346f044a607049f406e16 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hey all,

We use Amazon's elastic mapreduce and Hive = 0.7 to run analytics queries, and I'm having problems dynamically addin= g functions for use in the thrift server.

I want t= o add a jar, add a function, then execute a query.

Using ruby as the example, I've tried:
=A0=A0 =A0 =A0Hive.connect(@url, @port) do |connection|
=A0=A0 =A0 =A0 =A0connection.execute(<ADD JAR and FUNCTION>)=
=A0=A0 =A0 =A0 =A0results =3D connection.fetch(query)
=A0=A0 =A0 =A0end
but the function is not available be= tween calls.

So I tried prepending the query with = the function creation calls, but then I don't get any data back from hi= ve (simply an empty array).

Could someone direct me to the best way to add function= s for thrift queries? Honestly I'd rather add them permanently on start= up, but I can't find a way to do that either.
--20cf304346f044a607049f406e16--