public abstract class MergeTaskBase extends AbstractFixedIntervalTask
Modifier | Constructor and Description |
---|---|
protected |
MergeTaskBase(String id,
String dataSource,
List<DataSegment> segments,
SegmentWriteOutMediumFactory segmentWriteOutMediumFactory,
Map<String,Object> context) |
Modifier and Type | Method and Description |
---|---|
int |
getPriority()
Returns task priority.
|
List<DataSegment> |
getSegments() |
SegmentWriteOutMediumFactory |
getSegmentWriteOutMediumFactory() |
boolean |
isReady(TaskActionClient taskActionClient)
Checks pre-existing segments in "context" to confirm that this merge query is valid.
|
protected abstract File |
merge(TaskToolbox taskToolbox,
Map<DataSegment,File> segments,
File outDir) |
TaskStatus |
run(TaskToolbox toolbox)
Execute a task.
|
String |
toString() |
protected void |
verifyInputSegments(List<DataSegment> segments) |
getInterval
canRestore, equals, getClasspathPrefix, getContext, getDataSource, getGroupId, getId, getNodeType, getQueryRunner, getTaskResource, hashCode, stopGracefully, success
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getContextValue, getContextValue, getType
protected MergeTaskBase(String id, String dataSource, List<DataSegment> segments, @Nullable SegmentWriteOutMediumFactory segmentWriteOutMediumFactory, Map<String,Object> context)
protected void verifyInputSegments(List<DataSegment> segments)
public int getPriority()
Task
for default task priorities
public TaskStatus run(TaskToolbox toolbox) throws Exception
Task
toolbox
- Toolbox for this taskException
- if this task failedpublic boolean isReady(TaskActionClient taskActionClient) throws Exception
isReady
in interface Task
isReady
in class AbstractFixedIntervalTask
taskActionClient
- action client for this task (not the full toolbox)Exception
- if the task should be considered a failureprotected abstract File merge(TaskToolbox taskToolbox, Map<DataSegment,File> segments, File outDir) throws Exception
Exception
public List<DataSegment> getSegments()
@Nullable public SegmentWriteOutMediumFactory getSegmentWriteOutMediumFactory()
public String toString()
toString
in class AbstractTask
Copyright © 2011–2018. All rights reserved.