public abstract class HadoopTask extends AbstractTask
| Modifier and Type | Field and Description |
|---|---|
protected static com.google.common.base.Predicate<URL> |
IS_DRUID_URL |
| Modifier | Constructor and Description |
|---|---|
protected |
HadoopTask(String id,
String dataSource,
List<String> hadoopDependencyCoordinates,
Map<String,Object> context) |
| Modifier and Type | Method and Description |
|---|---|
static ClassLoader |
buildClassLoader(List<String> hadoopDependencyCoordinates,
List<String> defaultHadoopCoordinates) |
protected ClassLoader |
buildClassLoader(TaskToolbox toolbox)
This makes an isolated classloader that has classes loaded in the "proper" priority.
|
List<String> |
getHadoopDependencyCoordinates() |
static <InputType,OutputType> |
invokeForeignLoader(String clazzName,
InputType input,
ClassLoader loader)
This method tries to isolate class loading during a Function call
|
canRestore, equals, getClasspathPrefix, getContext, getContextValue, getDataSource, getGroupId, getId, getNodeType, getQueryRunner, getTaskLocks, getTaskResource, hashCode, joinId, makeId, stopGracefully, success, toStringprotected static final com.google.common.base.Predicate<URL> IS_DRUID_URL
protected ClassLoader buildClassLoader(TaskToolbox toolbox) throws MalformedURLException
toolbox - The toolbox to pull the default coordinates from if not present in the taskMalformedURLException - from Initialization.getClassLoaderForExtensionpublic static ClassLoader buildClassLoader(List<String> hadoopDependencyCoordinates, List<String> defaultHadoopCoordinates) throws MalformedURLException
MalformedURLExceptionpublic static <InputType,OutputType> OutputType invokeForeignLoader(String clazzName, InputType input, ClassLoader loader)
InputType - The input type of the method.OutputType - The output type of the method. The result of runTask must be castable to this type.clazzName - The Class which has a static method called `runTask`input - The input for `runTask`, must have `input.getClass()` be the class of the input for runTaskloader - The loader to use as the context class loader during invocationCopyright © 2011–2017. All rights reserved.