public class RealtimeIndexTask extends AbstractTask
| Modifier and Type | Class and Description |
|---|---|
static class |
RealtimeIndexTask.TaskActionSegmentPublisher |
| Constructor and Description |
|---|
RealtimeIndexTask(String id,
TaskResource taskResource,
FireDepartment fireDepartment,
Map<String,Object> context) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRestore()
Returns whether or not this task can restore its progress from its on-disk working directory.
|
Firehose |
getFirehose()
Public for tests.
|
FireDepartmentMetrics |
getMetrics()
Public for tests.
|
String |
getNodeType()
Get the nodeType for if/when this task publishes on zookeeper.
|
<T> QueryRunner<T> |
getQueryRunner(Query<T> query)
Returns query runners for this task.
|
FireDepartment |
getRealtimeIngestionSchema() |
String |
getType()
Returns a descriptive label for this task type.
|
protected boolean |
isFirehoseDrainableByClosing(FirehoseFactory firehoseFactory)
Is a firehose from this factory drainable by closing it? If so, we should drain on stopGracefully rather than
abruptly stopping.
|
boolean |
isReady(TaskActionClient taskActionClient)
Execute preflight actions for a task.
|
TaskStatus |
run(TaskToolbox toolbox)
Execute a task.
|
void |
stopGracefully()
Asks a task to arrange for its "run" method to exit promptly.
|
equals, getClasspathPrefix, getContext, getContextValue, getDataSource, getGroupId, getId, getTaskLocks, getTaskResource, hashCode, joinId, makeId, success, toStringpublic RealtimeIndexTask(String id, TaskResource taskResource, FireDepartment fireDepartment, Map<String,Object> context)
public String getType()
Taskpublic String getNodeType()
TaskgetNodeType in interface TaskgetNodeType in class AbstractTaskpublic <T> QueryRunner<T> getQueryRunner(Query<T> query)
TaskgetQueryRunner in interface TaskgetQueryRunner in class AbstractTaskT - query result typepublic boolean isReady(TaskActionClient taskActionClient) throws Exception
TasktaskActionClient - action client for this task (not the full toolbox)Exception - if the task should be considered a failurepublic TaskStatus run(TaskToolbox toolbox) throws Exception
Tasktoolbox - Toolbox for this taskException - if this task failedpublic boolean canRestore()
TaskcanRestore in interface TaskcanRestore in class AbstractTaskpublic void stopGracefully()
TaskTask.canRestore() returns true. Tasks that take too long to stop gracefully will be terminated with
extreme prejudice.stopGracefully in interface TaskstopGracefully in class AbstractTaskpublic Firehose getFirehose()
public FireDepartmentMetrics getMetrics()
public FireDepartment getRealtimeIngestionSchema()
protected boolean isFirehoseDrainableByClosing(FirehoseFactory firehoseFactory)
Copyright © 2011–2017. All rights reserved.