use of com.alibaba.jstorm.task.execute.spout.SpoutExecutors 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;
}
Aggregations