public class KafkaIndexTask extends AbstractTask implements ChatHandler
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
KafkaIndexTask.Status  | 
| Modifier and Type | Field and Description | 
|---|---|
static long | 
PAUSE_FOREVER  | 
| Constructor and Description | 
|---|
KafkaIndexTask(String id,
              TaskResource taskResource,
              DataSchema dataSchema,
              KafkaTuningConfig tuningConfig,
              KafkaIOConfig ioConfig,
              Map<String,Object> context,
              ChatHandlerProvider chatHandlerProvider,
              AuthorizerMapper authorizerMapper)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canRestore()
Returns whether or not this task can restore its progress from its on-disk working directory. 
 | 
Map<Integer,Map<Integer,Long>> | 
getCheckpoints()  | 
Map<Integer,Map<Integer,Long>> | 
getCheckpointsHTTP(javax.servlet.http.HttpServletRequest req)  | 
Map<Integer,Long> | 
getCurrentOffsets()  | 
Map<Integer,Long> | 
getCurrentOffsets(javax.servlet.http.HttpServletRequest req)  | 
DataSchema | 
getDataSchema()  | 
Map<Integer,Long> | 
getEndOffsets()  | 
Map<Integer,Long> | 
getEndOffsetsHTTP(javax.servlet.http.HttpServletRequest req)  | 
KafkaIOConfig | 
getIOConfig()  | 
int | 
getPriority()
Returns task priority. 
 | 
<T> QueryRunner<T> | 
getQueryRunner(Query<T> query)
Returns query runners for this task. 
 | 
org.joda.time.DateTime | 
getStartTime(javax.servlet.http.HttpServletRequest req)  | 
KafkaIndexTask.Status | 
getStatus()  | 
KafkaIndexTask.Status | 
getStatusHTTP(javax.servlet.http.HttpServletRequest req)  | 
KafkaTuningConfig | 
getTuningConfig()  | 
String | 
getType()
Returns a descriptive label for this task type. 
 | 
boolean | 
isReady(TaskActionClient taskActionClient)
Execute preflight actions for a task. 
 | 
javax.ws.rs.core.Response | 
pause(long timeout)  | 
javax.ws.rs.core.Response | 
pauseHTTP(long timeout,
         javax.servlet.http.HttpServletRequest req)
Signals the ingestion loop to pause. 
 | 
void | 
resume()  | 
javax.ws.rs.core.Response | 
resumeHTTP(javax.servlet.http.HttpServletRequest req)  | 
TaskStatus | 
run(TaskToolbox toolbox)
Execute a task. 
 | 
javax.ws.rs.core.Response | 
setEndOffsets(Map<Integer,Long> offsets,
             boolean resume,
             boolean finish)  | 
javax.ws.rs.core.Response | 
setEndOffsetsHTTP(Map<Integer,Long> offsets,
                 boolean resume,
                 boolean finish,
                 javax.servlet.http.HttpServletRequest req)  | 
javax.ws.rs.core.Response | 
stop(javax.servlet.http.HttpServletRequest req)  | 
void | 
stopGracefully()
Asks a task to arrange for its "run" method to exit promptly. 
 | 
equals, getClasspathPrefix, getContext, getDataSource, getGroupId, getId, getNodeType, getTaskResource, hashCode, success, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetContextValue, getContextValuepublic static final long PAUSE_FOREVER
public KafkaIndexTask(String id, TaskResource taskResource, DataSchema dataSchema, KafkaTuningConfig tuningConfig, KafkaIOConfig ioConfig, Map<String,Object> context, ChatHandlerProvider chatHandlerProvider, AuthorizerMapper authorizerMapper)
public int getPriority()
TaskgetPriority in interface Taskfor default task prioritiespublic String getType()
Taskpublic boolean isReady(TaskActionClient taskActionClient) throws Exception
Taskpublic DataSchema getDataSchema()
public KafkaTuningConfig getTuningConfig()
public KafkaIOConfig getIOConfig()
public TaskStatus run(TaskToolbox toolbox) throws Exception
Taskpublic 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 <T> QueryRunner<T> getQueryRunner(Query<T> query)
TaskgetQueryRunner in interface TaskgetQueryRunner in class AbstractTaskT - query result typepublic javax.ws.rs.core.Response stop(@Context
                                      javax.servlet.http.HttpServletRequest req)
public KafkaIndexTask.Status getStatusHTTP(@Context javax.servlet.http.HttpServletRequest req)
public KafkaIndexTask.Status getStatus()
public Map<Integer,Long> getCurrentOffsets(@Context javax.servlet.http.HttpServletRequest req)
public Map<Integer,Long> getEndOffsetsHTTP(@Context javax.servlet.http.HttpServletRequest req)
public javax.ws.rs.core.Response setEndOffsetsHTTP(Map<Integer,Long> offsets, boolean resume, boolean finish, @Context javax.servlet.http.HttpServletRequest req) throws InterruptedException
InterruptedExceptionpublic javax.ws.rs.core.Response setEndOffsets(Map<Integer,Long> offsets, boolean resume, boolean finish) throws InterruptedException
InterruptedExceptionpublic Map<Integer,Map<Integer,Long>> getCheckpointsHTTP(@Context javax.servlet.http.HttpServletRequest req)
public javax.ws.rs.core.Response pauseHTTP(long timeout,
                                           @Context
                                           javax.servlet.http.HttpServletRequest req)
                                    throws InterruptedException
timeout - how long to pause for before resuming in milliseconds, <= 0 means indefinitelyInterruptedExceptionpublic javax.ws.rs.core.Response pause(long timeout)
                                throws InterruptedException
InterruptedExceptionpublic javax.ws.rs.core.Response resumeHTTP(@Context
                                            javax.servlet.http.HttpServletRequest req)
                                     throws InterruptedException
InterruptedExceptionpublic void resume()
            throws InterruptedException
InterruptedExceptionpublic org.joda.time.DateTime getStartTime(@Context
                                           javax.servlet.http.HttpServletRequest req)
Copyright © 2011–2018. All rights reserved.