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 656F1CDC3 for ; Tue, 29 May 2012 12:35:57 +0000 (UTC) Received: (qmail 44470 invoked by uid 500); 29 May 2012 12:35:56 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 44429 invoked by uid 500); 29 May 2012 12:35:56 -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 44419 invoked by uid 99); 29 May 2012 12:35:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 May 2012 12:35:55 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Maoz.Gelbart@pursway.com designates 80.179.176.203 as permitted sender) Received: from [80.179.176.203] (HELO mail-srv.pursway.com) (80.179.176.203) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 May 2012 12:35:47 +0000 From: Maoz Gelbart To: "user@hive.apache.org" Subject: GenericUdf and Jdbc issues Thread-Topic: GenericUdf and Jdbc issues Thread-Index: Ac09l04+aqDD8FpDT1WLcHUIZ24mqA== Date: Tue, 29 May 2012 12:35:22 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: multipart/alternative; boundary="_000_A8260C5F5DD89247B5378BF1AC15B05779E1136AMailsrvpurswayl_" MIME-Version: 1.0 --_000_A8260C5F5DD89247B5378BF1AC15B05779E1136AMailsrvpurswayl_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, I am using Hive 0.7.1 over Cloudera's Hadoop distribution 0.20.2 and MapR h= dfs distribution 1.1.1. I wrote a GenericUDF packaged as a Jar that attempts to open a local resour= ce during its initialization at initialize(ObjectInspector[] arguments) com= mand. When I run with the CLI, everything is fine. When I run using Cloudera's Hive-JDBC driver, The UDF fails with null point= er returned from the command this.getResourceAsStream(filename). Removing the line fixed the problem and the UDF ran on both CLI and Jdbc, s= o I believe that "ADD JAR" and "CREATE TEMPORARY FUNCTION" were entered cor= rectly. Did anyone observe such a behavior? I have a demo Jar to reproduce the prob= lem if needed. Thanks, Maoz --_000_A8260C5F5DD89247B5378BF1AC15B05779E1136AMailsrvpurswayl_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi all,

 

I am u= sing Hive 0.7.1 over Cloudera’s Hadoop distribution 0.20.2 and MapR h= dfs distribution 1.1.1.

I wrote a Generi= cUDF packaged as a Jar that attempts to open a local resource during its in= itialization at initialize(ObjectInspector[] arguments) command.

 

When I run with the CLI, everything is = fine.

When I run using Cloudera’s = Hive-JDBC driver, The UDF fails with null pointer returned from the command= this.getResourceAsStream(filename).

Removing the line fixed the proble= m and the UDF ran on both CLI and Jdbc= , so I believe that “ADD JAR” and “CREATE TEMPORARY FUNCT= ION” were entered correctly.

=  

Did anyone observe such a behavior? I = have a demo Jar to reproduce the problem if needed.

 

Thanks,

Maoz

= --_000_A8260C5F5DD89247B5378BF1AC15B05779E1136AMailsrvpurswayl_--