Csaba Ringhofer has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/18611


Change subject: IMPALA-11342: Fix class loading in Hive UDFs' constructors
......................................................................

IMPALA-11342: Fix class loading in Hive UDFs' constructors

Loading new classes from the same jar in the constructor of UDFs
did not work in the catalog because the URLClassLoader was closed
too early. Extended the lifecycle of the class loader a bit to
let the catalog finish all initialisation.

Note that the instantiation of legacy Hive UDFs doesn't seem
necessary in the catalog, we can get all relevant info from
the class. Generic UDFs do need to be instantiated to be able
to call initialize().

Testing:
- added new classes to load in test UDFs and loaded these
  in constructor / initialize()
- ran the Hive UDF ee tests

Change-Id: If16e38b8fc3b2577a5d32104ea9e6948b9562e24
---
M 
fe/src/main/java/org/apache/impala/hive/executor/HiveJavaFunctionFactoryImpl.java
M fe/src/main/java/org/apache/impala/hive/executor/HiveUdfLoader.java
M 
java/test-hive-udfs/src/main/java/org/apache/impala/GenericImportsNearbyClassesUdf.java
M 
java/test-hive-udfs/src/main/java/org/apache/impala/ImportsNearbyClassesUdf.java
A java/test-hive-udfs/src/main/java/org/apache/impala/UtilForUdfConstructor.java
A java/test-hive-udfs/src/main/java/org/apache/impala/UtilForUdfInitialize.java
6 files changed, 88 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/11/18611/1
-- 
To view, visit http://gerrit.cloudera.org:8080/18611
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If16e38b8fc3b2577a5d32104ea9e6948b9562e24
Gerrit-Change-Number: 18611
Gerrit-PatchSet: 1
Gerrit-Owner: Csaba Ringhofer <[email protected]>

Reply via email to