Quanlong Huang has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19009 )
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 Merge conflicts in branch-4.1: - HiveJavaFunctionFactoryImpl.java ignores the case for GenericUDF - Ignores changes in GenericImportsNearbyClassesUdf.java Change-Id: If16e38b8fc3b2577a5d32104ea9e6948b9562e24 Reviewed-on: http://gerrit.cloudera.org:8080/18611 Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Reviewed-on: http://gerrit.cloudera.org:8080/19009 Reviewed-by: Csaba Ringhofer <csringho...@cloudera.com> --- 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 fe/src/main/java/org/apache/impala/hive/executor/UdfExecutor.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, 79 insertions(+), 18 deletions(-) Approvals: Csaba Ringhofer: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/19009 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: branch-4.1.1 Gerrit-MessageType: merged Gerrit-Change-Id: If16e38b8fc3b2577a5d32104ea9e6948b9562e24 Gerrit-Change-Number: 19009 Gerrit-PatchSet: 2 Gerrit-Owner: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Steve Carlin <scar...@cloudera.com>