hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-13552 ChoreService shutdown message could be more informative (Jonathan Lawlor)
Date Fri, 24 Apr 2015 20:42:16 GMT
Repository: hbase
Updated Branches:
  refs/heads/master b5fb861f7 -> 0415649f3


HBASE-13552 ChoreService shutdown message could be more informative (Jonathan Lawlor)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/0415649f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0415649f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0415649f

Branch: refs/heads/master
Commit: 0415649f3dda70aef9d7196987d341d11c5c1973
Parents: b5fb861
Author: stack <stack@apache.org>
Authored: Fri Apr 24 13:42:03 2015 -0700
Committer: stack <stack@apache.org>
Committed: Fri Apr 24 13:42:03 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/ChoreService.java    | 6 +++---
 .../src/main/java/org/apache/hadoop/hbase/ScheduledChore.java  | 6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/0415649f/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java
index 5e2e43e..17c75f8 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ChoreService.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.hbase;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map.Entry;
 import java.util.concurrent.ScheduledFuture;
 import java.util.concurrent.ScheduledThreadPoolExecutor;
@@ -298,9 +297,10 @@ public class ChoreService implements ChoreServicer {
    * after this method has been called (i.e. future scheduling attempts will fail).
    */
   public void shutdown() {
-    List<Runnable> ongoing = scheduler.shutdownNow();
+    scheduler.shutdownNow();
     if (LOG.isInfoEnabled()) {
-      LOG.info("Chore service for: " + coreThreadPoolPrefix + " had " + ongoing + " on shutdown");
+      LOG.info("Chore service for: " + coreThreadPoolPrefix + " had " + scheduledChores.keySet()
+          + " on shutdown");
     }
     cancelAllChores(true);
     scheduledChores.clear();

http://git-wip-us.apache.org/repos/asf/hbase/blob/0415649f/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java
index 16d080b..8670d60 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/ScheduledChore.java
@@ -338,4 +338,10 @@ public abstract class ScheduledChore implements Runnable {
    */
   protected synchronized void cleanup() {
   }
+
+  @Override
+  public String toString() {
+    return "[ScheduledChore: Name: " + getName() + " Period: " + getPeriod() + " Unit: "
+        + getTimeUnit() + "]";
+  }
 }


Mime
View raw message