cgl.imr.util
Class CustomClassLoader

java.lang.Object
  extended by java.lang.ClassLoader
      extended by cgl.imr.util.CustomClassLoader

public class CustomClassLoader
extends ClassLoader

Custom class loader for MapReduce computations. A separate class loader is created for every MapReduce computation and is initialized at the request of the new MapReduce computation. Then the class loader remains in memory during the iterative execution of the maps and reduce tasks and finally gets discarded at the end of the computation. This enables the application jar files to be updated without restarting the Twister runtime. The custom class loader loads only the jars available in the "apps" directory and the system classes.


Constructor Summary
CustomClassLoader()
           
 
Method Summary
 void close()
           
 Class<?> findClass(String className)
           
 Class<?> loadClass(String className)
           
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, 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

CustomClassLoader

public CustomClassLoader()
                  throws JarClassLoaderException
Throws:
JarClassLoaderException
Method Detail

close

public void close()

findClass

public Class<?> findClass(String className)
                   throws ClassNotFoundException
Overrides:
findClass in class ClassLoader
Throws:
ClassNotFoundException

loadClass

public Class<?> loadClass(String className)
                   throws ClassNotFoundException
Overrides:
loadClass in class ClassLoader
Throws:
ClassNotFoundException


For comments and suggestions please send e-mail to