public class ConvertSegmentTask extends AbstractFixedIntervalTask
| Modifier and Type | Class and Description |
|---|---|
static class |
ConvertSegmentTask.SubTask |
| Modifier | Constructor and Description |
|---|---|
protected |
ConvertSegmentTask(String id,
String dataSource,
org.joda.time.Interval interval,
io.druid.timeline.DataSegment segment,
IndexSpec indexSpec,
boolean force,
boolean validate) |
| Modifier and Type | Method and Description |
|---|---|
static ConvertSegmentTask |
create(io.druid.timeline.DataSegment segment,
IndexSpec indexSpec,
boolean force,
boolean validate)
Create a task to update the segment specified to the most recent binary version with the specified indexSpec
|
static ConvertSegmentTask |
create(String dataSource,
org.joda.time.Interval interval,
IndexSpec indexSpec,
boolean force,
boolean validate)
Create a segment converter task to convert a segment to the most recent version including the specified indexSpec
|
boolean |
equals(Object o) |
protected Iterable<Task> |
generateSubTasks(String groupId,
Iterable<io.druid.timeline.DataSegment> segments,
IndexSpec indexSpec,
boolean force,
boolean validate) |
IndexSpec |
getIndexSpec() |
io.druid.timeline.DataSegment |
getSegment() |
String |
getType()
Returns a descriptive label for this task type.
|
boolean |
isForce() |
boolean |
isValidate() |
TaskStatus |
run(TaskToolbox toolbox)
Execute a task.
|
getInterval, isReadygetClasspathPrefix, getDataSource, getGroupId, getId, getNodeType, getQueryRunner, getTaskLocks, getTaskResource, hashCode, joinId, makeId, success, toStringpublic static ConvertSegmentTask create(String dataSource, org.joda.time.Interval interval, IndexSpec indexSpec, boolean force, boolean validate)
dataSource - The datasource to which this update should be appliedinterval - The interval in the datasource which to apply the update toindexSpec - The IndexSpec to use in the updated segmentsforce - Force an update, even if the task thinks it doesn't need to update.validate - Validate the new segment compared to the old segment on a row by row basispublic static ConvertSegmentTask create(io.druid.timeline.DataSegment segment, IndexSpec indexSpec, boolean force, boolean validate)
segment - The segment to which this update should be appliedindexSpec - The IndexSpec to use in the updated segmentsforce - Force an update, even if the task thinks it doesn't need to update.validate - Validate the new segment compared to the old segment on a row by row basispublic boolean isForce()
public boolean isValidate()
public IndexSpec getIndexSpec()
public String getType()
Taskpublic io.druid.timeline.DataSegment getSegment()
public TaskStatus run(TaskToolbox toolbox) throws Exception
Tasktoolbox - Toolbox for this taskException - if this task failedprotected Iterable<Task> generateSubTasks(String groupId, Iterable<io.druid.timeline.DataSegment> segments, IndexSpec indexSpec, boolean force, boolean validate)
public boolean equals(Object o)
equals in class AbstractTaskCopyright © 2011–2015. All rights reserved.