Search in sources :

Example 1 with ApplicationClassLoader

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);
}
Also used : URLClassLoader(java.net.URLClassLoader) ApplicationClassLoader(org.apache.hadoop.yarn.util.ApplicationClassLoader) URLClassLoader(java.net.URLClassLoader) ApplicationClassLoader(org.apache.hadoop.yarn.util.ApplicationClassLoader)

Aggregations

URLClassLoader (java.net.URLClassLoader)1 ApplicationClassLoader (org.apache.hadoop.yarn.util.ApplicationClassLoader)1