use of org.apache.hadoop.hive.llap.tezplugins.scheduler.LoggingFutureCallback in project hive by apache.
the class LlapTaskSchedulerService method start.
@Override
public void start() throws IOException {
writeLock.lock();
try {
scheduledLoggingExecutor.schedule(new Callable<Void>() {
@Override
public Void call() throws Exception {
readLock.lock();
try {
if (dagRunning) {
LOG.info("Stats for current dag: {}", dagStats);
}
} finally {
readLock.unlock();
}
return null;
}
}, 10000L, TimeUnit.MILLISECONDS);
nodeEnablerFuture = nodeEnabledExecutor.submit(nodeEnablerCallable);
Futures.addCallback(nodeEnablerFuture, new LoggingFutureCallback("NodeEnablerThread", LOG));
delayedTaskSchedulerFuture = delayedTaskSchedulerExecutor.submit(delayedTaskSchedulerCallable);
Futures.addCallback(delayedTaskSchedulerFuture, new LoggingFutureCallback("DelayedTaskSchedulerThread", LOG));
schedulerFuture = schedulerExecutor.submit(schedulerCallable);
Futures.addCallback(schedulerFuture, new LoggingFutureCallback("SchedulerThread", LOG));
registry.start();
registry.registerStateChangeListener(new NodeStateChangeListener());
activeInstances = registry.getInstances();
for (ServiceInstance inst : activeInstances.getAll()) {
addNode(new NodeInfo(inst, nodeBlacklistConf, clock, numSchedulableTasksPerNode, metrics), inst);
}
} finally {
writeLock.unlock();
}
}
Aggregations