org.apache.hadoop.yarn.util
Class ApplicationClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by java.security.SecureClassLoader
          extended by java.net.URLClassLoader
              extended by org.apache.hadoop.yarn.util.ApplicationClassLoader

@InterfaceAudience.Public
@InterfaceStability.Unstable
public class ApplicationClassLoader
extends URLClassLoader

A URLClassLoader for YARN application isolation. Classes from the application JARs are loaded in preference to the parent loader.


Constructor Summary
ApplicationClassLoader(String classpath, ClassLoader parent, List<String> systemClasses)
           
ApplicationClassLoader(URL[] urls, ClassLoader parent, List<String> systemClasses)
           
 
Method Summary
 URL getResource(String name)
           
 Class<?> loadClass(String name)
           
protected  Class<?> loadClass(String name, boolean resolve)
           
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
 
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
 

Constructor Detail

ApplicationClassLoader

public ApplicationClassLoader(URL[] urls,
                              ClassLoader parent,
                              List<String> systemClasses)

ApplicationClassLoader

public ApplicationClassLoader(String classpath,
                              ClassLoader parent,
                              List<String> systemClasses)
                       throws MalformedURLException
Throws:
MalformedURLException
Method Detail

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


Copyright © 2013 Apache Software Foundation. All Rights Reserved.