Search in sources :

Example 1 with BaseExecutors

use of com.alibaba.jstorm.task.execute.BaseExecutors in project jstorm by alibaba.

the class Task method getShutdown.

public TaskShutdownDameon getShutdown(List<AsyncLoopThread> allThreads, RunnableCallback baseExecutor) {
    AsyncLoopThread ackerThread = null;
    if (baseExecutor instanceof SpoutExecutors) {
        ackerThread = ((SpoutExecutors) baseExecutor).getAckerRunnableThread();
        if (ackerThread != null) {
            allThreads.add(ackerThread);
        }
    }
    List<AsyncLoopThread> recvThreads = taskReceiver.getDeserializeThread();
    for (AsyncLoopThread recvThread : recvThreads) {
        allThreads.add(recvThread);
    }
    List<AsyncLoopThread> serializeThreads = taskTransfer.getSerializeThreads();
    allThreads.addAll(serializeThreads);
    TaskHeartbeatTrigger taskHeartbeatTrigger = ((BaseExecutors) baseExecutor).getTaskHbTrigger();
    TaskShutdownDameon shutdown = new TaskShutdownDameon(taskStatus, topologyId, taskId, allThreads, zkCluster, taskObj, this, taskHeartbeatTrigger);
    return shutdown;
}
Also used : TaskHeartbeatTrigger(com.alibaba.jstorm.daemon.worker.timer.TaskHeartbeatTrigger) SingleThreadSpoutExecutors(com.alibaba.jstorm.task.execute.spout.SingleThreadSpoutExecutors) MultipleThreadSpoutExecutors(com.alibaba.jstorm.task.execute.spout.MultipleThreadSpoutExecutors) SpoutExecutors(com.alibaba.jstorm.task.execute.spout.SpoutExecutors) BaseExecutors(com.alibaba.jstorm.task.execute.BaseExecutors) AsyncLoopThread(com.alibaba.jstorm.callback.AsyncLoopThread)

Aggregations

AsyncLoopThread (com.alibaba.jstorm.callback.AsyncLoopThread)1 TaskHeartbeatTrigger (com.alibaba.jstorm.daemon.worker.timer.TaskHeartbeatTrigger)1 BaseExecutors (com.alibaba.jstorm.task.execute.BaseExecutors)1 MultipleThreadSpoutExecutors (com.alibaba.jstorm.task.execute.spout.MultipleThreadSpoutExecutors)1 SingleThreadSpoutExecutors (com.alibaba.jstorm.task.execute.spout.SingleThreadSpoutExecutors)1 SpoutExecutors (com.alibaba.jstorm.task.execute.spout.SpoutExecutors)1