Search in sources :

Example 1 with LoggingFutureCallback

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();
    }
}
Also used : InactiveServiceInstance(org.apache.hadoop.hive.llap.registry.impl.InactiveServiceInstance) ServiceInstance(org.apache.hadoop.hive.llap.registry.ServiceInstance) LoggingFutureCallback(org.apache.hadoop.hive.llap.tezplugins.scheduler.LoggingFutureCallback) TezUncheckedException(org.apache.tez.dag.api.TezUncheckedException) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 ServiceInstance (org.apache.hadoop.hive.llap.registry.ServiceInstance)1 InactiveServiceInstance (org.apache.hadoop.hive.llap.registry.impl.InactiveServiceInstance)1 LoggingFutureCallback (org.apache.hadoop.hive.llap.tezplugins.scheduler.LoggingFutureCallback)1 TezUncheckedException (org.apache.tez.dag.api.TezUncheckedException)1