accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject accumulo git commit: ACCUMULO-3427 Switch LoggingRunnable from log4j to slf4j logger
Date Tue, 16 Dec 2014 21:39:42 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 4b018487a -> 0354a7c88


ACCUMULO-3427 Switch LoggingRunnable from log4j to slf4j logger


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

Branch: refs/heads/master
Commit: 0354a7c883c262757d0c693b2a52a0d08af81555
Parents: 4b01848
Author: Josh Elser <elserj@apache.org>
Authored: Tue Dec 16 16:08:47 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Tue Dec 16 16:39:20 2014 -0500

----------------------------------------------------------------------
 .../core/client/impl/ConditionalWriterImpl.java |  9 ++---
 .../accumulo/core/file/BloomFilterLayer.java    |  5 +--
 .../accumulo/core/util/LoggingRunnable.java     |  7 ++--
 .../accumulo/core/util/NamingThreadFactory.java |  7 ++--
 .../accumulo/server/client/BulkImporter.java    |  9 ++---
 .../server/problems/ProblemReports.java         |  9 ++---
 .../accumulo/server/rpc/TServerUtils.java       |  5 +--
 .../org/apache/accumulo/monitor/Monitor.java    |  9 ++---
 .../apache/accumulo/tserver/TabletServer.java   | 35 ++++++++++----------
 .../tserver/TabletServerResourceManager.java    | 23 +++++++------
 .../apache/accumulo/tserver/log/DfsLogger.java  | 15 +++++----
 11 files changed, 72 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java
b/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java
index ee56fff..7b84e45 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ConditionalWriterImpl.java
@@ -81,11 +81,12 @@ import org.apache.accumulo.fate.zookeeper.ZooUtil.LockID;
 import org.apache.commons.collections.map.LRUMap;
 import org.apache.commons.lang.mutable.MutableLong;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.thrift.TApplicationException;
 import org.apache.thrift.TException;
 import org.apache.thrift.TServiceClient;
 import org.apache.thrift.transport.TTransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 class ConditionalWriterImpl implements ConditionalWriter {
   
@@ -94,9 +95,9 @@ class ConditionalWriterImpl implements ConditionalWriter {
   static {
     cleanupThreadPool.allowCoreThreadTimeOut(true);
   }
-  
-  private static final Logger log = Logger.getLogger(ConditionalWriterImpl.class);
-  
+
+  private static final Logger log = LoggerFactory.getLogger(ConditionalWriterImpl.class);
+
   private static final int MAX_SLEEP = 30000;
   
   private Authorizations auths;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java b/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
index 90506c3..f78ae66 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
@@ -59,14 +59,15 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.util.bloom.Key;
 import org.apache.hadoop.util.hash.Hash;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A class that sits on top of different accumulo file formats and provides bloom filter
functionality.
  * 
  */
 public class BloomFilterLayer {
-  private static final Logger LOG = Logger.getLogger(BloomFilterLayer.class);
+  private static final Logger LOG = LoggerFactory.getLogger(BloomFilterLayer.class);
   public static final String BLOOM_FILE_NAME = "acu_bloom";
   public static final int HASH_COUNT = 5;
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/core/src/main/java/org/apache/accumulo/core/util/LoggingRunnable.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/LoggingRunnable.java b/core/src/main/java/org/apache/accumulo/core/util/LoggingRunnable.java
index 2fcee24..5d486b9 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/LoggingRunnable.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/LoggingRunnable.java
@@ -18,7 +18,7 @@ package org.apache.accumulo.core.util;
 
 import java.util.Date;
 
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
 
 public class LoggingRunnable implements Runnable {
   private Runnable runnable;
@@ -28,13 +28,14 @@ public class LoggingRunnable implements Runnable {
     this.runnable = r;
     this.log = log;
   }
-  
+
+  @Override
   public void run() {
     try {
       runnable.run();
     } catch (Throwable t) {
       try {
-        log.error("Thread \"" + Thread.currentThread().getName() + "\" died " + t.getMessage(),
t);
+        log.error("Thread \"{}\" died {}", Thread.currentThread().getName(), t.getMessage(),
t);
       } catch (Throwable t2) {
         // maybe the logging system is screwed up OR there is a bug in the exception, like
t.getMessage() throws a NPE
         System.err.println("ERROR " + new Date() + " Failed to log message about thread death
" + t2.getMessage());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/core/src/main/java/org/apache/accumulo/core/util/NamingThreadFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/NamingThreadFactory.java b/core/src/main/java/org/apache/accumulo/core/util/NamingThreadFactory.java
index f90065d..c37d0af 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/NamingThreadFactory.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/NamingThreadFactory.java
@@ -20,11 +20,12 @@ import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.accumulo.core.trace.wrappers.TraceRunnable;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class NamingThreadFactory implements ThreadFactory {
-  private static final Logger log = Logger.getLogger(NamingThreadFactory.class);
-  
+  private static final Logger log = LoggerFactory.getLogger(NamingThreadFactory.class);
+
   private AtomicInteger threadNum = new AtomicInteger(1);
   private String name;
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
index f338db8..4f21a15 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/client/BulkImporter.java
@@ -68,13 +68,14 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.thrift.TServiceClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class BulkImporter {
-  
-  private static final Logger log = Logger.getLogger(BulkImporter.class);
-  
+
+  private static final Logger log = LoggerFactory.getLogger(BulkImporter.class);
+
   public static List<String> bulkLoad(ClientContext context, long tid, String tableId,
List<String> files, String errorDir, boolean setTime)
       throws IOException, AccumuloException, AccumuloSecurityException, ThriftTableOperationException
{
     AssignmentStats stats = new BulkImporter(context, tid, tableId, setTime).importFiles(files,
new Path(errorDir));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
index a559985..c1da89a 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
@@ -53,12 +53,13 @@ import org.apache.accumulo.server.util.MetadataTableUtil;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.commons.collections.map.LRUMap;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ProblemReports implements Iterable<ProblemReport> {
-  
-  private static final Logger log = Logger.getLogger(ProblemReports.class);
-  
+
+  private static final Logger log = LoggerFactory.getLogger(ProblemReports.class);
+
   private final LRUMap problemReports = new LRUMap(1000);
   
   /*

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
index ebf2c84..1bd337c 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
@@ -36,18 +36,19 @@ import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.util.Halt;
 import org.apache.accumulo.server.util.time.SimpleTimer;
-import org.apache.log4j.Logger;
 import org.apache.thrift.TProcessor;
 import org.apache.thrift.TProcessorFactory;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.server.TThreadPoolServer;
 import org.apache.thrift.transport.TServerTransport;
 import org.apache.thrift.transport.TTransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.net.HostAndPort;
 
 public class TServerUtils {
-  private static final Logger log = Logger.getLogger(TServerUtils.class);
+  private static final Logger log = LoggerFactory.getLogger(TServerUtils.class);
 
   public static final ThreadLocal<String> clientAddress = new ThreadLocal<String>();
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index f7c28f6..a207ea9 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -90,8 +90,9 @@ import org.apache.accumulo.server.util.Halt;
 import org.apache.accumulo.server.util.TableInfoUtil;
 import org.apache.accumulo.server.zookeeper.ZooLock;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.net.HostAndPort;
 
@@ -99,7 +100,7 @@ import com.google.common.net.HostAndPort;
  * Serve master statistics with an embedded web server.
  */
 public class Monitor {
-  private static final Logger log = Logger.getLogger(Monitor.class);
+  private static final Logger log = LoggerFactory.getLogger(Monitor.class);
 
   private static final int REFRESH_TIME = 5;
   private static long lastRecalc = 0L;
@@ -551,7 +552,7 @@ public class Monitor {
           allScans.put(server, new ScanStats(scans));
         }
       } catch (Exception ex) {
-        log.debug(ex, ex);
+        log.debug("Failed to get active scans from {}", server, ex);
       } finally {
         ThriftUtil.returnClient(tserver);
       }
@@ -643,7 +644,7 @@ public class Monitor {
       Halt.halt(-1, new Runnable() {
         @Override
         public void run() {
-          log.fatal("No longer able to monitor Monitor lock node", e);
+          log.error("No longer able to monitor Monitor lock node", e);
         }
       });
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 19d101e..3f709b0 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -230,18 +230,19 @@ import org.apache.hadoop.fs.FSError;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
 import org.apache.thrift.TProcessor;
 import org.apache.thrift.TServiceClient;
 import org.apache.thrift.server.TServer;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.KeeperException.NoNodeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.net.HostAndPort;
 
 public class TabletServer extends AccumuloServerContext implements Runnable {
-  private static final Logger log = Logger.getLogger(TabletServer.class);
+  private static final Logger log = LoggerFactory.getLogger(TabletServer.class);
   private static final long MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS = 1000;
   private static final long RECENTLY_SPLIT_MILLIES = 60 * 1000;
   private static final long TIME_BETWEEN_GC_CHECKS = 5000;
@@ -325,7 +326,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
             try {
               tablet.updateRates(now);
             } catch (Exception ex) {
-              log.error(ex, ex);
+              log.error("Error updating rates for {}", tablet.getExtent(), ex);
             }
         }
       }
@@ -561,7 +562,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
         if (!security.userHasAuthorizations(credentials, authorizations))
           throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.BAD_AUTHORIZATIONS);
       } catch (ThriftSecurityException tse) {
-        log.error(tse, tse);
+        log.error("{} is not authorized", credentials.getPrincipal(), tse);
         throw tse;
       }
       Map<KeyExtent,List<Range>> batch = Translator.translate(tbatch, new TKeyExtentTranslator(),
new Translator.ListTranslator<TRange,Range>(
@@ -985,7 +986,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
             }
             break;
           } catch (IOException ex) {
-            log.warn(ex, ex);
+            log.warn("Error writing mutations to log", ex);
           }
         }
 
@@ -1357,7 +1358,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       } catch (ThriftSecurityException e) {
         log.warn("Got " + request + " message from unauthenticatable user: " + e.getUser());
         if (getCredentials().getToken().getClass().getName().equals(credentials.getTokenClassName()))
{
-          log.fatal("Got message from a service with a mismatched configuration. Please ensure
a compatible configuration.", e);
+          log.error("Got message from a service with a mismatched configuration. Please ensure
a compatible configuration.", e);
           fatal = true;
         }
         throw e;
@@ -1412,7 +1413,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       try {
         checkPermission(credentials, lock, "loadTablet");
       } catch (ThriftSecurityException e) {
-        log.error(e, e);
+        log.error("Caller doesn't have permission to load a tablet", e);
         throw new RuntimeException(e);
       }
 
@@ -1493,7 +1494,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       try {
         checkPermission(credentials, lock, "unloadTablet");
       } catch (ThriftSecurityException e) {
-        log.error(e, e);
+        log.error("Caller doesn't have permission to unload a tablet", e);
         throw new RuntimeException(e);
       }
 
@@ -1507,7 +1508,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       try {
         checkPermission(credentials, lock, "flush");
       } catch (ThriftSecurityException e) {
-        log.error(e, e);
+        log.error("Caller doesn't have permission to flush a table", e);
         throw new RuntimeException(e);
       }
 
@@ -1544,7 +1545,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       try {
         checkPermission(credentials, lock, "flushTablet");
       } catch (ThriftSecurityException e) {
-        log.error(e, e);
+        log.error("Caller doesn't have permission to flush a tablet", e);
         throw new RuntimeException(e);
       }
 
@@ -1573,7 +1574,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
           try {
             tabletServerLock.unlock();
           } catch (Exception e) {
-            log.error(e, e);
+            log.error("Caught exception unlocking TabletServer lock", e);
           }
         }
       });
@@ -1598,7 +1599,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       try {
         checkPermission(credentials, null, "getScans");
       } catch (ThriftSecurityException e) {
-        log.error(e, e);
+        log.error("Caller doesn't have permission to get active scans", e);
         throw e;
       }
 
@@ -1610,7 +1611,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       try {
         checkPermission(credentials, lock, "chop");
       } catch (ThriftSecurityException e) {
-        log.error(e, e);
+        log.error("Caller doesn't have permission to chop extent", e);
         throw new RuntimeException(e);
       }
 
@@ -1627,7 +1628,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       try {
         checkPermission(credentials, lock, "compact");
       } catch (ThriftSecurityException e) {
-        log.error(e, e);
+        log.error("Caller doesn't have permission to compact a table", e);
         throw new RuntimeException(e);
       }
 
@@ -1722,7 +1723,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
       try {
         checkPermission(credentials, null, "getActiveCompactions");
       } catch (ThriftSecurityException e) {
-        log.error(e, e);
+        log.error("Caller doesn't have permission to get active compactions", e);
         throw e;
       }
 
@@ -2323,7 +2324,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
             @Override
             public void run() {
               if (!serverStopRequested)
-                log.fatal("Lost tablet server lock (reason = " + reason + "), exiting.");
+                log.error("Lost tablet server lock (reason = " + reason + "), exiting.");
               gcLogger.logGCInfo(getConfiguration());
             }
           });
@@ -2334,7 +2335,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
           Halt.halt(0, new Runnable() {
             @Override
             public void run() {
-              log.fatal("Lost ability to monitor tablet server lock, exiting.", e);
+              log.error("Lost ability to monitor tablet server lock, exiting.", e);
             }
           });
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
index 6b2eaf0..bb9d427 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
@@ -16,6 +16,8 @@
  */
 package org.apache.accumulo.tserver;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -58,9 +60,8 @@ import org.apache.accumulo.tserver.compaction.DefaultCompactionStrategy;
 import org.apache.accumulo.tserver.compaction.MajorCompactionReason;
 import org.apache.accumulo.tserver.compaction.MajorCompactionRequest;
 import org.apache.accumulo.tserver.tablet.Tablet;
-import org.apache.log4j.Logger;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * ResourceManager is responsible for managing the resources of all tablets within a tablet
server.
@@ -70,7 +71,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
  */
 public class TabletServerResourceManager {
 
-  private static final Logger log = Logger.getLogger(TabletServerResourceManager.class);
+  private static final Logger log = LoggerFactory.getLogger(TabletServerResourceManager.class);
 
   private final ExecutorService minorCompactionThreadPool;
   private final ExecutorService majorCompactionThreadPool;
@@ -123,7 +124,7 @@ public class TabletServerResourceManager {
             tp.setMaximumPoolSize(max);
           }
         } catch (Throwable t) {
-          log.error(t, t);
+          log.error("Failed to change thread pool size", t);
         }
       }
 
@@ -227,7 +228,7 @@ public class TabletServerResourceManager {
    * exceed a threshold. If the time is exceeded a warning is printed and a stack trace is
logged for the running assignment.
    */
   protected static class AssignmentWatcher implements Runnable {
-    private static final Logger log = Logger.getLogger(AssignmentWatcher.class);
+    private static final Logger log = LoggerFactory.getLogger(AssignmentWatcher.class);
 
     private final Map<KeyExtent,RunnableStartedAt> activeAssignments;
     private final AccumuloConfiguration conf;
@@ -385,7 +386,7 @@ public class TabletServerResourceManager {
           }
 
         } catch (InterruptedException e) {
-          log.warn(e, e);
+          log.warn("Interrupted processing tablet memory statistics", e);
         }
       }
     }
@@ -513,7 +514,7 @@ public class TabletServerResourceManager {
             break;
           log.info("Waiting for thread pool " + entry.getKey() + " to shutdown");
         } catch (InterruptedException e) {
-          log.warn(e);
+          log.warn("Interrupted waiting for executor to terminate", e);
         }
       }
     }
@@ -744,7 +745,7 @@ public class TabletServerResourceManager {
         }
         break;
       } catch (InterruptedException ex) {
-        log.info(ex, ex);
+        log.info("Interrupted waiting for splits executor to terminate", ex);
       }
     }
   }
@@ -758,7 +759,7 @@ public class TabletServerResourceManager {
         }
         break;
       } catch (InterruptedException ex) {
-        log.info(ex, ex);
+        log.info("Interrupted waiting for assignment executor to terminate", ex);
       }
     }
   }
@@ -772,7 +773,7 @@ public class TabletServerResourceManager {
         }
         break;
       } catch (InterruptedException ex) {
-        log.info(ex, ex);
+        log.info("Interrupted waiting for metadata assignment executor to terminate", ex);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0354a7c8/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index 6fd2624..1f94bf0 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@ -42,9 +42,6 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.atomic.AtomicLong;
 
-import com.google.common.base.Joiner;
-import com.google.common.base.Optional;
-
 import org.apache.accumulo.core.client.Durability;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
@@ -67,7 +64,11 @@ import org.apache.accumulo.tserver.logger.LogFileValue;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.base.Joiner;
+import com.google.common.base.Optional;
 
 /**
  * Wrap a connection to a logger.
@@ -77,7 +78,7 @@ public class DfsLogger {
   public static final String LOG_FILE_HEADER_V2 = "--- Log File Header (v2) ---";
   public static final String LOG_FILE_HEADER_V3 = "--- Log File Header (v3) ---";
 
-  private static final Logger log = Logger.getLogger(DfsLogger.class);
+  private static final Logger log = LoggerFactory.getLogger(DfsLogger.class);
 
   public static class LogClosedException extends IOException {
     private static final long serialVersionUID = 1L;
@@ -517,7 +518,7 @@ public class DfsLogger {
       try {
         logFile.close();
       } catch (IOException ex) {
-        log.error(ex);
+        log.error("Failed to close log file", ex);
         throw new LogClosedException();
       }
   }
@@ -557,7 +558,7 @@ public class DfsLogger {
       } catch (ClosedChannelException ex) {
         throw new LogClosedException();
       } catch (Exception e) {
-        log.error(e, e);
+        log.error("Failed to write log entries", e);
         work.exception = e;
       }
     }


Mime
View raw message