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,
DataSegment segment,
IndexSpec indexSpec,
boolean force,
boolean validate,
Map<String,Object> context) |
Modifier and Type | Method and Description |
---|---|
static ConvertSegmentTask |
create(DataSegment segment,
IndexSpec indexSpec,
boolean force,
boolean validate,
Map<String,Object> context)
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,
Map<String,Object> context)
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<DataSegment> segments,
IndexSpec indexSpec,
boolean force,
boolean validate,
Map<String,Object> context) |
IndexSpec |
getIndexSpec() |
DataSegment |
getSegment() |
String |
getType()
Returns a descriptive label for this task type.
|
boolean |
isForce() |
boolean |
isValidate() |
protected static String |
makeId(String dataSource,
org.joda.time.Interval interval) |
TaskStatus |
run(TaskToolbox toolbox)
Execute a task.
|
getInterval, isReady
canRestore, getClasspathPrefix, getContext, getContextValue, getDataSource, getGroupId, getId, getNodeType, getQueryRunner, getTaskLocks, getTaskResource, hashCode, joinId, makeId, stopGracefully, success, toString
public static ConvertSegmentTask create(String dataSource, org.joda.time.Interval interval, IndexSpec indexSpec, boolean force, boolean validate, Map<String,Object> context)
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(DataSegment segment, IndexSpec indexSpec, boolean force, boolean validate, Map<String,Object> context)
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()
Task
public DataSegment getSegment()
public TaskStatus run(TaskToolbox toolbox) throws Exception
Task
toolbox
- Toolbox for this taskException
- if this task failedprotected Iterable<Task> generateSubTasks(String groupId, Iterable<DataSegment> segments, IndexSpec indexSpec, boolean force, boolean validate, Map<String,Object> context)
public boolean equals(Object o)
equals
in class AbstractTask
Copyright © 2011–2017. All rights reserved.