You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ss...@apache.org on 2015/05/13 22:03:22 UTC

hive git commit: HIVE-10700. LLAP: Log additional debug information in the scheduler. (Siddharth Seth)

Repository: hive
Updated Branches:
  refs/heads/llap c8ed4b068 -> 6aef59d66


HIVE-10700. LLAP: Log additional debug information in the scheduler. (Siddharth Seth)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/6aef59d6
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/6aef59d6
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/6aef59d6

Branch: refs/heads/llap
Commit: 6aef59d663d12c3671fc7e81cd27011256bb65e9
Parents: c8ed4b0
Author: Siddharth Seth <ss...@apache.org>
Authored: Wed May 13 13:02:59 2015 -0700
Committer: Siddharth Seth <ss...@apache.org>
Committed: Wed May 13 13:02:59 2015 -0700

----------------------------------------------------------------------
 .../dag/app/rm/LlapTaskSchedulerService.java    | 31 ++++++++++++++++++--
 1 file changed, 28 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/6aef59d6/llap-server/src/java/org/apache/tez/dag/app/rm/LlapTaskSchedulerService.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/tez/dag/app/rm/LlapTaskSchedulerService.java b/llap-server/src/java/org/apache/tez/dag/app/rm/LlapTaskSchedulerService.java
index 8100ece..fff4142 100644
--- a/llap-server/src/java/org/apache/tez/dag/app/rm/LlapTaskSchedulerService.java
+++ b/llap-server/src/java/org/apache/tez/dag/app/rm/LlapTaskSchedulerService.java
@@ -44,8 +44,8 @@ import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.llap.configuration.LlapConfiguration;
 import org.apache.hadoop.hive.llap.daemon.registry.ServiceInstance;
@@ -66,10 +66,12 @@ import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.ListeningExecutorService;
 import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class LlapTaskSchedulerService extends TaskSchedulerService {
 
-  private static final Log LOG = LogFactory.getLog(LlapTaskSchedulerService.class);
+  private static final Logger LOG = LoggerFactory.getLogger(LlapTaskSchedulerService.class);
 
   private final ExecutorService appCallbackExecutor;
   private final TaskSchedulerAppCallback appClientDelegate;
@@ -208,7 +210,29 @@ public class LlapTaskSchedulerService extends TaskSchedulerService {
     writeLock.lock();
     try {
       nodeEnablerFuture = nodeEnabledExecutor.submit(nodeEnablerCallable);
+      Futures.addCallback(nodeEnablerFuture, new FutureCallback<Void>() {
+        @Override
+        public void onSuccess(Void result) {
+          LOG.info("NodeEnabledThread exited");
+        }
+
+        @Override
+        public void onFailure(Throwable t) {
+          LOG.warn("NodeEnabledThread exited with error", t);
+        }
+      });
       schedulerFuture = schedulerExecutor.submit(schedulerCallable);
+      Futures.addCallback(schedulerFuture, new FutureCallback<Void>() {
+        @Override
+        public void onSuccess(Void result) {
+          LOG.info("SchedulerThread exited");
+        }
+
+        @Override
+        public void onFailure(Throwable t) {
+          LOG.warn("SchedulerThread exited with error", t);
+        }
+      });
       registry.start();
       activeInstances = registry.getInstances();
       for (ServiceInstance inst : activeInstances.getAll().values()) {
@@ -910,6 +934,7 @@ public class LlapTaskSchedulerService extends TaskSchedulerService {
     public boolean canAcceptTask() {
       boolean result = !hadCommFailure && !disabled && serviceInstance.isAlive()
           &&(numSchedulableTasks == -1 || ((numSchedulableTasks - numScheduledTasks) > 0));
+      LOG.info("canAcceptTask={}, numScheduledTasks={}, numSchedulableTasks={}, hadCommFailure={}, disabled={}, serviceInstance.isAlive={}", result, numScheduledTasks, numSchedulableTasks, hadCommFailure, disabled, serviceInstance.isAlive());
       return result;
     }