Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 14189200B49 for ; Mon, 4 Jul 2016 15:14:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 12DE6160A55; Mon, 4 Jul 2016 13:14:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 5B498160A65 for ; Mon, 4 Jul 2016 15:14:12 +0200 (CEST) Received: (qmail 67665 invoked by uid 500); 4 Jul 2016 13:14:11 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 67573 invoked by uid 99); 4 Jul 2016 13:14:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jul 2016 13:14:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 4130B2C02A5 for ; Mon, 4 Jul 2016 13:14:11 +0000 (UTC) Date: Mon, 4 Jul 2016 13:14:11 +0000 (UTC) From: "Rui Li (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-14139) NPE dropping permanent function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 04 Jul 2016 13:14:13 -0000 [ https://issues.apache.org/jira/browse/HIVE-14139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rui Li updated HIVE-14139: -------------------------- Attachment: HIVE-14139.2.patch Patch v2 makes the persistent map of className -> refCount. This way, we don't have to load function resource if not registering to session. And we don't have to load the resource just in order to drop the function. Also adds a UT to cover this. > NPE dropping permanent function > ------------------------------- > > Key: HIVE-14139 > URL: https://issues.apache.org/jira/browse/HIVE-14139 > Project: Hive > Issue Type: Bug > Reporter: Rui Li > Assignee: Rui Li > Attachments: HIVE-14139.1.patch, HIVE-14139.2.patch > > > To reproduce: > 1. Start a CLI session and create a permanent function. > 2. Exit current CLI session. > 3. Start a new CLI session and drop the function. > Stack trace: > {noformat} > FAILED: error during drop function: java.lang.NullPointerException > at org.apache.hadoop.hive.ql.exec.Registry.removePersistentFunctionUnderLock(Registry.java:513) > at org.apache.hadoop.hive.ql.exec.Registry.unregisterFunction(Registry.java:501) > at org.apache.hadoop.hive.ql.exec.FunctionRegistry.unregisterPermanentFunction(FunctionRegistry.java:1532) > at org.apache.hadoop.hive.ql.exec.FunctionTask.dropPermanentFunction(FunctionTask.java:228) > at org.apache.hadoop.hive.ql.exec.FunctionTask.execute(FunctionTask.java:95) > at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:197) > at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:100) > at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1860) > at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1564) > at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1316) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1085) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1073) > at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:232) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)