org.apache.hadoop.util
Class ApplicationClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.apache.hadoop.util.ApplicationClassLoader
- Direct Known Subclasses:
- ApplicationClassLoader
@InterfaceAudience.Public
@InterfaceStability.Unstable
public class ApplicationClassLoader
- extends URLClassLoader
A URLClassLoader
for application isolation. Classes from the
application JARs are loaded in preference to the parent loader.
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SYSTEM_CLASSES_DEFAULT
public static final String SYSTEM_CLASSES_DEFAULT
- Default value of the system classes if the user did not override them.
JDK classes, hadoop classes and resources, and some select third-party
classes are considered system classes, and are not loaded by the
application classloader.
ApplicationClassLoader
public ApplicationClassLoader(URL[] urls,
ClassLoader parent,
List<String> systemClasses)
ApplicationClassLoader
public ApplicationClassLoader(String classpath,
ClassLoader parent,
List<String> systemClasses)
throws MalformedURLException
- Throws:
MalformedURLException
getResource
public URL getResource(String name)
- Overrides:
getResource
in class ClassLoader
loadClass
public Class<?> loadClass(String name)
throws ClassNotFoundException
- Overrides:
loadClass
in class ClassLoader
- Throws:
ClassNotFoundException
loadClass
protected Class<?> loadClass(String name,
boolean resolve)
throws ClassNotFoundException
- Overrides:
loadClass
in class ClassLoader
- Throws:
ClassNotFoundException
isSystemClass
public static boolean isSystemClass(String name,
List<String> systemClasses)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.