accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [2/6] accumulo git commit: ACCUMULO-2346 use Uninterruptibles.sleepUninterruptibly
Date Fri, 17 Jul 2015 18:53:06 GMT
ACCUMULO-2346 use Uninterruptibles.sleepUninterruptibly


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

Branch: refs/heads/master
Commit: b3692d464e8834f7ef561a45bc39509898b2741f
Parents: 1148751
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Wed Jul 15 16:19:51 2015 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Wed Jul 15 16:19:51 2015 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/core/util/UtilWaitThread.java   | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b3692d46/core/src/main/java/org/apache/accumulo/core/util/UtilWaitThread.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/UtilWaitThread.java b/core/src/main/java/org/apache/accumulo/core/util/UtilWaitThread.java
index 01f5fa8..816d8ed 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/UtilWaitThread.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/UtilWaitThread.java
@@ -16,17 +16,13 @@
  */
 package org.apache.accumulo.core.util;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.concurrent.TimeUnit;
+
+import com.google.common.util.concurrent.Uninterruptibles;
 
 public class UtilWaitThread {
-  private static final Logger log = LoggerFactory.getLogger(UtilWaitThread.class);
 
   public static void sleep(long millis) {
-    try {
-      Thread.sleep(millis);
-    } catch (InterruptedException e) {
-      log.error("{}", e.getMessage(), e);
-    }
+    Uninterruptibles.sleepUninterruptibly(millis, TimeUnit.MILLISECONDS);
   }
 }


Mime
View raw message