use of io.druid.indexing.overlord.TaskRunnerListener in project druid by druid-io.
the class KafkaSupervisor method possiblyRegisterListener.
public void possiblyRegisterListener() {
if (listenerRegistered) {
return;
}
Optional<TaskRunner> taskRunner = taskMaster.getTaskRunner();
if (taskRunner.isPresent()) {
taskRunner.get().registerListener(new TaskRunnerListener() {
@Override
public String getListenerId() {
return supervisorId;
}
@Override
public void locationChanged(final String taskId, final TaskLocation newLocation) {
// do nothing
}
@Override
public void statusChanged(String taskId, TaskStatus status) {
notices.add(new RunNotice());
}
}, MoreExecutors.sameThreadExecutor());
listenerRegistered = true;
}
}
Aggregations