Class AccumuloVFSClassLoader
- java.lang.Object
-
- org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader
-
public class AccumuloVFSClassLoader extends Object
This class builds a hierarchy of Classloaders in the form of:SystemClassLoader that loads JVM classes ^ | AccumuloClassLoader loads jars from locations in general.classpaths. Usually the URLs for HADOOP_HOME, ZOOKEEPER_HOME, ACCUMULO_HOME and their associated directories ^ | VFSClassLoader that loads jars from locations in general.vfs.classpaths. Can be used to load accumulo jar from HDFS ^ | AccumuloReloadingVFSClassLoader That loads jars from locations in general.dynamic.classpaths. Used to load jar dynamically.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAccumuloVFSClassLoader.AccumuloVFSClassLoaderShutdownThreadstatic interfaceAccumuloVFSClassLoader.Printer
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DYNAMIC_CLASSPATH_VALUEstatic StringDYNAMIC_CLASSPATH_PROPERTY_NAMEstatic StringVFS_CACHE_DIRstatic StringVFS_CLASSLOADER_SYSTEM_CLASSPATH_PROPERTYstatic StringVFS_CONTEXT_CLASSPATH_PROPERTY
-
Constructor Summary
Constructors Constructor Description AccumuloVFSClassLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose()static org.apache.commons.vfs2.FileSystemManagergenerateVfs()static ClassLoadergetClassLoader()static ContextManagergetContextManager()static Class<?>loadClass(String classname)static <U> Class<? extends U>loadClass(String classname, Class<U> extension)static voidprintClassPath()static voidprintClassPath(AccumuloVFSClassLoader.Printer out)
-
-
-
Field Detail
-
DYNAMIC_CLASSPATH_PROPERTY_NAME
public static final String DYNAMIC_CLASSPATH_PROPERTY_NAME
- See Also:
- Constant Field Values
-
DEFAULT_DYNAMIC_CLASSPATH_VALUE
public static final String DEFAULT_DYNAMIC_CLASSPATH_VALUE
- See Also:
- Constant Field Values
-
VFS_CLASSLOADER_SYSTEM_CLASSPATH_PROPERTY
public static final String VFS_CLASSLOADER_SYSTEM_CLASSPATH_PROPERTY
- See Also:
- Constant Field Values
-
VFS_CONTEXT_CLASSPATH_PROPERTY
public static final String VFS_CONTEXT_CLASSPATH_PROPERTY
- See Also:
- Constant Field Values
-
VFS_CACHE_DIR
public static final String VFS_CACHE_DIR
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadClass
public static <U> Class<? extends U> loadClass(String classname, Class<U> extension) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
loadClass
public static Class<?> loadClass(String classname) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
getClassLoader
public static ClassLoader getClassLoader() throws IOException
- Throws:
IOException
-
generateVfs
public static org.apache.commons.vfs2.FileSystemManager generateVfs() throws org.apache.commons.vfs2.FileSystemException- Throws:
org.apache.commons.vfs2.FileSystemException
-
printClassPath
public static void printClassPath()
-
printClassPath
public static void printClassPath(AccumuloVFSClassLoader.Printer out)
-
getContextManager
public static ContextManager getContextManager() throws IOException
- Throws:
IOException
-
close
public static void close()
-
-