Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F229F8870 for ; Tue, 13 Sep 2011 17:37:36 +0000 (UTC) Received: (qmail 41201 invoked by uid 500); 13 Sep 2011 17:37:36 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 41164 invoked by uid 500); 13 Sep 2011 17:37:36 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 41156 invoked by uid 500); 13 Sep 2011 17:37:36 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 41153 invoked by uid 99); 13 Sep 2011 17:37:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Sep 2011 17:37:36 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Sep 2011 17:37:33 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 84D8196C43 for ; Tue, 13 Sep 2011 17:37:12 +0000 (UTC) Date: Tue, 13 Sep 2011 17:37:12 +0000 (UTC) From: "Chinna Rao Lalam (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <2110040543.22978.1315935432541.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1849631177.41521.1306304267352.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HIVE-2182) Avoid null pointer exception when executing UDF MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HIVE-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chinna Rao Lalam updated HIVE-2182: ----------------------------------- Status: Patch Available (was: Open) > Avoid null pointer exception when executing UDF > ----------------------------------------------- > > Key: HIVE-2182 > URL: https://issues.apache.org/jira/browse/HIVE-2182 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.5.0, 0.8.0 > Environment: Hadoop 0.20.1, Hive0.8.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5) > Reporter: Chinna Rao Lalam > Assignee: Chinna Rao Lalam > Attachments: HIVE-2182.1.patch, HIVE-2182.2.patch, HIVE-2182.3.patch, HIVE-2182.4.patch, HIVE-2182.5.patch, HIVE-2182.patch > > > For using UDF's executed following steps > {noformat} > add jar /home/udf/udf.jar; > create temporary function grade as 'udf.Grade'; > select m.userid,m.name,grade(m.maths,m.physics,m.chemistry) from marks m; > {noformat} > But from the above steps if we miss the first step (add jar) and execute remaining steps > {noformat} > create temporary function grade as 'udf.Grade'; > select m.userid,m.name,grade(m.maths,m.physics,m.chemistry) from marks m; > {noformat} > In tasktracker it is throwing this exception > {noformat} > Caused by: java.lang.RuntimeException: Map operator initialization failed > at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:121) > ... 18 more > Caused by: java.lang.RuntimeException: java.lang.NullPointerException > at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:115) > at org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge.initialize(GenericUDFBridge.java:126) > at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.initialize(ExprNodeGenericFuncEvaluator.java:133) > at org.apache.hadoop.hive.ql.exec.Operator.initEvaluators(Operator.java:878) > at org.apache.hadoop.hive.ql.exec.Operator.initEvaluatorsAndReturnStruct(Operator.java:904) > at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:60) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:433) > at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:389) > at org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:133) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:444) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:98) > ... 18 more > Caused by: java.lang.NullPointerException > at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768) > at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:107) > ... 31 more > {noformat} > Instead of null pointer exception it should throw meaning full exception -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira