public class HadoopIndexTask extends HadoopTask
| Modifier and Type | Class and Description |
|---|---|
static class |
HadoopIndexTask.HadoopDetermineConfigInnerProcessing |
static class |
HadoopIndexTask.HadoopIndexGeneratorInnerProcessing |
| Constructor and Description |
|---|
HadoopIndexTask(String id,
HadoopIngestionSpec spec,
String hadoopCoordinates,
List<String> hadoopDependencyCoordinates,
String classpathPrefix,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper) |
| Modifier and Type | Method and Description |
|---|---|
String |
getClasspathPrefix()
Returns an extra classpath that should be prepended to the default classpath when running this task.
|
List<String> |
getHadoopDependencyCoordinates() |
HadoopIngestionSpec |
getSpec() |
String |
getType()
Returns a descriptive label for this task type.
|
boolean |
isReady(TaskActionClient taskActionClient)
Execute preflight actions for a task.
|
TaskStatus |
run(TaskToolbox toolbox)
Execute a task.
|
buildClassLoader, invokeForeignLoaderequals, getDataSource, getGroupId, getId, getNodeType, getQueryRunner, getTaskLocks, getTaskResource, hashCode, joinId, makeId, success, toStringpublic HadoopIndexTask(String id, HadoopIngestionSpec spec, String hadoopCoordinates, List<String> hadoopDependencyCoordinates, String classpathPrefix, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
spec - is used by the HadoopDruidIndexerJob to set up the appropriate parameters
for creating Druid index segments. It may be modified.
Here, we will ensure that the DbConnectorConfig field of the spec is set to null, such that the
job does not push a list of published segments the database. Instead, we will use the method
IndexGeneratorJob.getPublishedSegments() to simply return a list of the published
segments, and let the indexing service report these segments to the database.public String getType()
Taskpublic boolean isReady(TaskActionClient taskActionClient) throws Exception
TasktaskActionClient - action client for this task (not the full toolbox)Exception - if the task should be considered a failurepublic HadoopIngestionSpec getSpec()
public List<String> getHadoopDependencyCoordinates()
getHadoopDependencyCoordinates in class HadoopTaskpublic String getClasspathPrefix()
TaskgetClasspathPrefix in interface TaskgetClasspathPrefix in class AbstractTaskpublic TaskStatus run(TaskToolbox toolbox) throws Exception
Tasktoolbox - Toolbox for this taskException - if this task failedCopyright © 2011–2015. All rights reserved.