public class RealtimeIndexTask extends AbstractTask
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
RealtimeIndexTask.TaskActionSegmentPublisher  | 
| Modifier and Type | Field and Description | 
|---|---|
static String | 
CTX_KEY_LOOKUP_TIER  | 
| 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. 
 | 
int | 
getPriority()
Returns task priority. 
 | 
<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, getDataSource, getGroupId, getId, getTaskResource, hashCode, success, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetContextValue, getContextValuepublic static final String CTX_KEY_LOOKUP_TIER
public RealtimeIndexTask(String id, TaskResource taskResource, FireDepartment fireDepartment, Map<String,Object> context)
public int getPriority()
Taskfor default task prioritiespublic 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–2018. All rights reserved.