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, invokeForeignLoader
equals, getDataSource, getGroupId, getId, getNodeType, getQueryRunner, getTaskLocks, getTaskResource, hashCode, joinId, makeId, success, toString
public 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()
Task
public boolean isReady(TaskActionClient taskActionClient) throws Exception
Task
taskActionClient
- 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 HadoopTask
public String getClasspathPrefix()
Task
getClasspathPrefix
in interface Task
getClasspathPrefix
in class AbstractTask
public TaskStatus run(TaskToolbox toolbox) throws Exception
Task
toolbox
- Toolbox for this taskException
- if this task failedCopyright © 2011–2015. All rights reserved.