public class CompactionTask extends AbstractTask
Constructor and Description |
---|
CompactionTask(String id,
TaskResource taskResource,
String dataSource,
org.joda.time.Interval interval,
List<DataSegment> segments,
DimensionsSpec dimensionsSpec,
IndexTask.IndexTuningConfig tuningConfig,
Map<String,Object> context,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper) |
Modifier and Type | Method and Description |
---|---|
DimensionsSpec |
getDimensionsSpec() |
org.joda.time.Interval |
getInterval() |
int |
getPriority()
Returns task priority.
|
List<DataSegment> |
getSegments() |
IndexTask.IndexTuningConfig |
getTuningConfig() |
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.
|
canRestore, equals, getClasspathPrefix, getContext, getDataSource, getGroupId, getId, getNodeType, getQueryRunner, getTaskResource, hashCode, stopGracefully, success, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getContextValue, getContextValue
public CompactionTask(String id, TaskResource taskResource, String dataSource, @Nullable org.joda.time.Interval interval, @Nullable List<DataSegment> segments, @Nullable DimensionsSpec dimensionsSpec, @Nullable IndexTask.IndexTuningConfig tuningConfig, @Nullable Map<String,Object> context, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
public org.joda.time.Interval getInterval()
public List<DataSegment> getSegments()
public DimensionsSpec getDimensionsSpec()
public IndexTask.IndexTuningConfig getTuningConfig()
public String getType()
Task
public int getPriority()
Task
for default task priorities
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 TaskStatus run(TaskToolbox toolbox) throws Exception
Task
toolbox
- Toolbox for this taskException
- if this task failedCopyright © 2011–2018. All rights reserved.