From d559773a0e3679a6894390b17380332b84843f57 Mon Sep 17 00:00:00 2001 From: Tejaswini Bandlamudi <96047043+tejaswini-imply@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:07:39 +0530 Subject: [PATCH] sets Hadoop conf ClassLoader (#12738) --- .../org/apache/druid/data/input/orc/OrcExtensionsModule.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions-core/orc-extensions/src/main/java/org/apache/druid/data/input/orc/OrcExtensionsModule.java b/extensions-core/orc-extensions/src/main/java/org/apache/druid/data/input/orc/OrcExtensionsModule.java index 110ac82dc0f..d39b757540a 100644 --- a/extensions-core/orc-extensions/src/main/java/org/apache/druid/data/input/orc/OrcExtensionsModule.java +++ b/extensions-core/orc-extensions/src/main/java/org/apache/druid/data/input/orc/OrcExtensionsModule.java @@ -62,6 +62,10 @@ public class OrcExtensionsModule implements DruidModule // to properly initialize everything final Configuration conf = new Configuration(); + + // Set explicit CL. Otherwise it'll try to use thread context CL, which may not have all of our dependencies. + conf.setClassLoader(getClass().getClassLoader()); + if (props != null) { for (String propName : props.stringPropertyNames()) { if (propName.startsWith("hadoop.")) {