public interface Task
Modifier and Type | Method and Description |
---|---|
String |
getClasspathPrefix()
Returns an extra classpath that should be prepended to the default classpath when running this task.
|
String |
getDataSource()
Returns the datasource this task operates on.
|
String |
getGroupId()
Returns group ID of this task.
|
String |
getId()
Returns ID of this task.
|
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.
|
TaskResource |
getTaskResource()
Returns a
TaskResource for this task. |
String |
getType()
Returns a descriptive label for this task type.
|
boolean |
isReady(TaskActionClient taskActionClient)
Execute preflight actions for a task.
|
TaskStatus |
run(TaskToolbox toolbox)
Execute a task.
|
String getId()
String getGroupId()
TaskResource getTaskResource()
TaskResource
for this task. Task resources define specific
worker requirements a task may require.TaskResource
for this taskString getType()
String getNodeType()
String getDataSource()
<T> QueryRunner<T> getQueryRunner(Query<T> query)
T
- query result typeString getClasspathPrefix()
boolean isReady(TaskActionClient taskActionClient) throws Exception
taskActionClient
- action client for this task (not the full toolbox)Exception
- if the task should be considered a failureTaskStatus run(TaskToolbox toolbox) throws Exception
toolbox
- Toolbox for this taskException
- if this task failedCopyright © 2011–2015. All rights reserved.