use of org.apache.hadoop.yarn.util.ApplicationClassLoader in project druid by druid-io.
the class HadoopTaskTest method assertClassLoaderIsSingular.
public static void assertClassLoaderIsSingular(ClassLoader classLoader) {
// This is a check against the current HadoopTask which creates a single URLClassLoader with null parent
Assert.assertNull(classLoader.getParent());
Assert.assertFalse(classLoader instanceof ApplicationClassLoader);
Assert.assertTrue(classLoader instanceof URLClassLoader);
final ClassLoader appLoader = HadoopDruidConverterConfig.class.getClassLoader();
Assert.assertNotEquals(String.format("ClassLoader [%s] is not isolated!", classLoader), appLoader, classLoader);
}
Aggregations