public class DirectoryClassLoaderProvider extends Object implements DatasetClassLoaderProvider
ClassLoader for a DatasetModuleMeta by unpacking the dataset jar and creating a
DirectoryClassLoader over the unpacked jar. Classloaders are cached, and unpacked directories are cleaned
up when the provider is closed. Note that this means changes to dataset code are not picked up, as the assumption
is that this provider is created once at the start of a program run and closed at the end.| Constructor and Description |
|---|
DirectoryClassLoaderProvider(CConfiguration cConf,
LocationFactory locationFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ClassLoader |
get(DatasetModuleMeta moduleMeta,
ClassLoader parentClassLoader)
Get the classloader for a specific dataset module.
|
public DirectoryClassLoaderProvider(CConfiguration cConf, LocationFactory locationFactory)
public ClassLoader get(DatasetModuleMeta moduleMeta, ClassLoader parentClassLoader) throws IOException
DatasetClassLoaderProviderget in interface DatasetClassLoaderProvidermoduleMeta - the metadata for the dataset module to get a classloader forparentClassLoader - the class loader to use as the parentIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.