accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [1/5] accumulo git commit: ACCUMULO-3651 Replace log4j with slf4j where log4j specific features (like set level) are not used.
Date Tue, 17 Mar 2015 22:02:23 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 1fb0d7ca0 -> e4583eb3d


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/main/java/org/apache/accumulo/test/randomwalk/Environment.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/Environment.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/Environment.java
index c39f390..7122b4e 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/Environment.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/Environment.java
@@ -32,7 +32,8 @@ import org.apache.accumulo.core.client.MultiTableBatchWriter;
 import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * The test environment that is available for randomwalk tests. This includes configuration
properties that are available to any randomwalk test and facilities
@@ -68,7 +69,7 @@ public class Environment {
    */
   public static final String KEY_NUM_THREADS = "NUM_THREADS";
 
-  private static final Logger log = Logger.getLogger(Environment.class);
+  private static final Logger log = LoggerFactory.getLogger(Environment.class);
 
   private final Properties p;
   private Instance instance = null;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/SelectiveQueueing.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/SelectiveQueueing.java
b/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/SelectiveQueueing.java
index c7f490c..b3b4df3 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/SelectiveQueueing.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/bulk/SelectiveQueueing.java
@@ -21,13 +21,14 @@ import java.util.concurrent.ThreadPoolExecutor;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.test.randomwalk.Environment;
 import org.apache.accumulo.test.randomwalk.State;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Chooses whether or not an operation should be queued based on the current thread pool
queue length and the number of available TServers.
  */
 public class SelectiveQueueing {
-  private static final Logger log = Logger.getLogger(SelectiveQueueing.class);
+  private static final Logger log = LoggerFactory.getLogger(SelectiveQueueing.class);
 
   public static boolean shouldQueueOperation(State state, Environment env) throws Exception
{
     final ThreadPoolExecutor pool = (ThreadPoolExecutor) state.get("pool");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
index f106dd5..4b54a28 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
@@ -28,10 +28,11 @@ import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SecurityHelper {
-  private static final Logger log = Logger.getLogger(SecurityHelper.class);
+  private static final Logger log = LoggerFactory.getLogger(SecurityHelper.class);
 
   private static final String tableName = "secTableName";
   private static final String masterName = "sysUserName";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
index 7763544..6c97751 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/WalkingSecurity.java
@@ -50,7 +50,8 @@ import org.apache.accumulo.server.security.handler.PermissionHandler;
 import org.apache.accumulo.test.randomwalk.Environment;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.hadoop.fs.FileSystem;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  *
@@ -58,7 +59,7 @@ import org.apache.log4j.Logger;
 public class WalkingSecurity extends SecurityOperation implements Authorizor, Authenticator,
PermissionHandler {
   State state = null;
   Environment env = null;
-  private static final Logger log = Logger.getLogger(WalkingSecurity.class);
+  private static final Logger log = LoggerFactory.getLogger(WalkingSecurity.class);
 
   private static final String tableName = "SecurityTableName";
   private static final String namespaceName = "SecurityNamespaceName";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/SortTool.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/SortTool.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/SortTool.java
index dcfe50b..cdeccb3 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/SortTool.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/SortTool.java
@@ -28,10 +28,11 @@ import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Job;
 import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat;
 import org.apache.hadoop.util.Tool;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class SortTool extends Configured implements Tool {
-  protected final Logger log = Logger.getLogger(this.getClass());
+  protected final Logger log = LoggerFactory.getLogger(this.getClass());
   private String outputDir;
   private String seqFile;
   private String splitFile;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java b/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java
index dfb5547..7c04000 100644
--- a/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java
+++ b/test/src/main/java/org/apache/accumulo/test/scalability/Ingest.java
@@ -30,11 +30,12 @@ import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.test.continuous.ContinuousIngest;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class Ingest extends ScaleTest {
 
-  private static final Logger log = Logger.getLogger(Ingest.class);
+  private static final Logger log = LoggerFactory.getLogger(Ingest.class);
 
   @Override
   public void setup() {
@@ -81,6 +82,7 @@ public class Ingest extends ScaleTest {
           .setMaxWriteThreads(maxWriteThreads));
     } catch (TableNotFoundException e) {
       log.error("Table '" + tableName + "' not found.", e);
+      System.exit(-1);
     }
 
     // configure writing

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/main/java/org/apache/accumulo/test/scalability/Run.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/scalability/Run.java b/test/src/main/java/org/apache/accumulo/test/scalability/Run.java
index f7af2ff..744dc42 100644
--- a/test/src/main/java/org/apache/accumulo/test/scalability/Run.java
+++ b/test/src/main/java/org/apache/accumulo/test/scalability/Run.java
@@ -25,13 +25,14 @@ import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.Parameter;
 
 public class Run {
 
-  private static final Logger log = Logger.getLogger(Run.class);
+  private static final Logger log = LoggerFactory.getLogger(Run.class);
 
   static class Opts extends Help {
     @Parameter(names = "--testId", required = true)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java b/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
index 8f66791..4c21a1f 100644
--- a/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
+++ b/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
@@ -25,8 +25,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.accumulo.fate.zookeeper.ZooLock.AsyncLockWatcher;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason;
 import org.apache.accumulo.minicluster.MiniAccumuloCluster;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
@@ -111,8 +109,6 @@ public class ZooLockTest {
 
     folder.create();
 
-    Logger.getLogger("org.apache.zookeeper").setLevel(Level.ERROR);
-
     accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
 
     accumulo.start();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java b/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java
index b0ea6a4..a5c28bf 100644
--- a/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java
+++ b/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java
@@ -57,12 +57,13 @@ import org.apache.accumulo.tracer.TraceServer;
 import org.apache.accumulo.tracer.TracerExecutable;
 import org.apache.accumulo.tserver.TServerExecutable;
 import org.apache.accumulo.tserver.TabletServer;
-import org.apache.log4j.Logger;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class KeywordStartIT {
 
-  private final Logger log = Logger.getLogger(getClass());
+  private final Logger log = LoggerFactory.getLogger(getClass());
 
   @Test
   public void testKeywordsMatch() throws IOException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java b/test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java
index 4d0260c..8ed0e2a 100644
--- a/test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ArbitraryTablePropertiesIT.java
@@ -26,12 +26,13 @@ import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.harness.SharedMiniClusterIT;
-import org.apache.log4j.Logger;
 import org.junit.Assert;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ArbitraryTablePropertiesIT extends SharedMiniClusterIT {
-  private static final Logger log = Logger.getLogger(ArbitraryTablePropertiesIT.class);
+  private static final Logger log = LoggerFactory.getLogger(ArbitraryTablePropertiesIT.class);
 
   @Override
   protected int defaultTimeoutSeconds() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/BadDeleteMarkersCreatedIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/BadDeleteMarkersCreatedIT.java b/test/src/test/java/org/apache/accumulo/test/BadDeleteMarkersCreatedIT.java
index 9cae889..25337b2 100644
--- a/test/src/test/java/org/apache/accumulo/test/BadDeleteMarkersCreatedIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/BadDeleteMarkersCreatedIT.java
@@ -41,15 +41,16 @@ import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 // Accumulo3047
 public class BadDeleteMarkersCreatedIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(BadDeleteMarkersCreatedIT.class);
+  private static final Logger log = LoggerFactory.getLogger(BadDeleteMarkersCreatedIT.class);
 
   @Override
   public int defaultTimeoutSeconds() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/CleanWalIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/CleanWalIT.java b/test/src/test/java/org/apache/accumulo/test/CleanWalIT.java
index 2f2cdf5..f553be8 100644
--- a/test/src/test/java/org/apache/accumulo/test/CleanWalIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/CleanWalIT.java
@@ -40,13 +40,14 @@ import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.test.functional.FunctionalTestUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.RawLocalFileSystem;
-import org.apache.log4j.Logger;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class CleanWalIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(CleanWalIT.class);
+  private static final Logger log = LoggerFactory.getLogger(CleanWalIT.class);
 
   @Override
   public int defaultTimeoutSeconds() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/ConditionalWriterIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ConditionalWriterIT.java b/test/src/test/java/org/apache/accumulo/test/ConditionalWriterIT.java
index e77b876..bd00f02 100644
--- a/test/src/test/java/org/apache/accumulo/test/ConditionalWriterIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ConditionalWriterIT.java
@@ -89,11 +89,12 @@ import org.apache.accumulo.tracer.TraceDump;
 import org.apache.accumulo.tracer.TraceDump.Printer;
 import org.apache.accumulo.tracer.TraceServer;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterables;
 
@@ -101,7 +102,7 @@ import com.google.common.collect.Iterables;
  *
  */
 public class ConditionalWriterIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(ConditionalWriterIT.class);
+  private static final Logger log = LoggerFactory.getLogger(ConditionalWriterIT.class);
 
   @Override
   protected int defaultTimeoutSeconds() {
@@ -212,7 +213,7 @@ public class ConditionalWriterIT extends AccumuloClusterIT {
     Connector conn = getConnector();
     String tableName = getUniqueNames(1)[0];
 
-    String user= null;
+    String user = null;
     ClientConfiguration clientConf = cluster.getClientConfig();
     final boolean saslEnabled = clientConf.getBoolean(ClientProperty.INSTANCE_RPC_SASL_ENABLED.getKey(),
false);
 
@@ -973,7 +974,7 @@ public class ConditionalWriterIT extends AccumuloClusterIT {
         }
 
       } catch (Exception e) {
-        log.error(e);
+        log.error(e.getMessage(), e);
         failed.set(true);
       }
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
b/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
index b2458a1..61d9e82 100644
--- a/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/CreateTableWithNewTableConfigIT.java
@@ -33,15 +33,16 @@ import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.ServerColumnFamily;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.harness.SharedMiniClusterIT;
-import org.apache.log4j.Logger;
 import org.junit.Assert;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  *
  */
 public class CreateTableWithNewTableConfigIT extends SharedMiniClusterIT {
-  static private final Logger log = Logger.getLogger(CreateTableWithNewTableConfigIT.class);
+  static private final Logger log = LoggerFactory.getLogger(CreateTableWithNewTableConfigIT.class);
 
   @Override
   protected int defaultTimeoutSeconds() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java b/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java
index 8ceabcb..a465955 100644
--- a/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java
@@ -40,12 +40,13 @@ import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.test.functional.ConfigurableMacIT;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.Assert;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class LargeSplitRowIT extends ConfigurableMacIT {
-  static private final Logger log = Logger.getLogger(LargeSplitRowIT.class);
+  static private final Logger log = LoggerFactory.getLogger(LargeSplitRowIT.class);
 
   @Override
   public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/MetaGetsReadersIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/MetaGetsReadersIT.java b/test/src/test/java/org/apache/accumulo/test/MetaGetsReadersIT.java
index 7f9983a..ec89c5d 100644
--- a/test/src/test/java/org/apache/accumulo/test/MetaGetsReadersIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/MetaGetsReadersIT.java
@@ -66,7 +66,7 @@ public class MetaGetsReadersIT extends ConfigurableMacIT {
             }
           }
         } catch (Exception ex) {
-          log.trace(ex, ex);
+          log.trace(ex.getMessage(), ex);
           stop.set(true);
         }
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/MultiTableRecoveryIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/MultiTableRecoveryIT.java b/test/src/test/java/org/apache/accumulo/test/MultiTableRecoveryIT.java
index bf2b1ac..5f9b389 100644
--- a/test/src/test/java/org/apache/accumulo/test/MultiTableRecoveryIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/MultiTableRecoveryIT.java
@@ -125,7 +125,7 @@ public class MultiTableRecoveryIT extends ConfigurableMacIT {
           }
           System.out.println("Restarted " + i + " times");
         } catch (Exception ex) {
-          log.error(ex, ex);
+          log.error(ex.getMessage(), ex);
         }
       }
     };

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index a7538af..56a6a70 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -76,7 +76,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.tools.DistCp;
-import org.apache.log4j.Logger;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Assert;
@@ -86,6 +85,8 @@ import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TestName;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ShellServerIT extends SharedMiniClusterIT {
   public static class TestOutputStream extends OutputStream {
@@ -105,7 +106,7 @@ public class ShellServerIT extends SharedMiniClusterIT {
     }
   }
 
-  private static final Logger log = Logger.getLogger(ShellServerIT.class);
+  private static final Logger log = LoggerFactory.getLogger(ShellServerIT.class);
 
   public static class StringInputStream extends InputStream {
     private String source = "";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java b/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java
index 94e0a3c..c02daea 100644
--- a/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java
@@ -33,12 +33,13 @@ import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.harness.AccumuloClusterIT;
 import org.apache.accumulo.server.conf.NamespaceConfiguration;
 import org.apache.accumulo.server.conf.TableConfiguration;
-import org.apache.log4j.Logger;
 import org.junit.Assert;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class TableConfigurationUpdateIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(TableConfigurationUpdateIT.class);
+  private static final Logger log = LoggerFactory.getLogger(TableConfigurationUpdateIT.class);
 
   @Override
   public int defaultTimeoutSeconds() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java
index 30d6958..fb52c05 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java
@@ -39,11 +39,12 @@ import org.apache.accumulo.harness.AccumuloClusterIT;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class BatchScanSplitIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(BatchScanSplitIT.class);
+  private static final Logger log = LoggerFactory.getLogger(BatchScanSplitIT.class);
 
   @Override
   public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite)
{

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java
index 64d6827..67a556c 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java
@@ -46,11 +46,12 @@ import org.apache.accumulo.minicluster.MemoryUnit;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class BloomFilterIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(BloomFilterIT.class);
+  private static final Logger log = LoggerFactory.getLogger(BloomFilterIT.class);
 
   @Override
   public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite)
{

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/CleanUpIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CleanUpIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CleanUpIT.java
index 82b8b70..4982071 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/CleanUpIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/CleanUpIT.java
@@ -29,9 +29,10 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.CleanUp;
 import org.apache.accumulo.harness.SharedMiniClusterIT;
-import org.apache.log4j.Logger;
 import org.junit.Assert;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Ensures that all threads spawned for ZooKeeper and Thrift connectivity are reaped after
calling CleanUp.shutdown().
@@ -40,7 +41,7 @@ import org.junit.Test;
  * the ZooKeeperInstance and Connector are self-contained WRT resource management, we can't
leverage the AccumuloClusterIT.
  */
 public class CleanUpIT extends SharedMiniClusterIT {
-  private static final Logger log = Logger.getLogger(CleanUpIT.class);
+  private static final Logger log = LoggerFactory.getLogger(CleanUpIT.class);
 
   @Override
   protected int defaultTimeoutSeconds() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
index ad03f11..eced2c3 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
@@ -44,17 +44,18 @@ import org.apache.accumulo.test.util.CertUtils;
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 import org.junit.After;
 import org.junit.Before;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * General Integration-Test base class that provides access to a {@link MiniAccumuloCluster}
for testing. Tests using these typically do very disruptive things
  * to the instance, and require specific configuration. Most tests don't need this level
of control and should extend {@link AccumuloClusterIT} instead.
  */
 public class ConfigurableMacIT extends AccumuloIT {
-  public static final Logger log = Logger.getLogger(ConfigurableMacIT.class);
+  public static final Logger log = LoggerFactory.getLogger(ConfigurableMacIT.class);
 
   protected MiniAccumuloClusterImpl cluster;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java
index 02192e9..7fdc65e 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java
@@ -36,8 +36,9 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.harness.AccumuloClusterIT;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DeleteRowsIT extends AccumuloClusterIT {
 
@@ -46,7 +47,7 @@ public class DeleteRowsIT extends AccumuloClusterIT {
     return 10 * 60;
   }
 
-  private static final Logger log = Logger.getLogger(DeleteRowsIT.class);
+  private static final Logger log = LoggerFactory.getLogger(DeleteRowsIT.class);
 
   private static final int ROWS_PER_TABLET = 10;
   private static final String[] LETTERS = new String[] {"a", "b", "c", "d", "e", "f", "g",
"h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
index d3d7439..1330779 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
@@ -37,8 +37,9 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterIT;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 // attempt to reproduce ACCUMULO-315
 public class DeleteRowsSplitIT extends AccumuloClusterIT {
@@ -48,7 +49,7 @@ public class DeleteRowsSplitIT extends AccumuloClusterIT {
     return 4 * 60;
   }
 
-  private static final Logger log = Logger.getLogger(DeleteRowsSplitIT.class);
+  private static final Logger log = LoggerFactory.getLogger(DeleteRowsSplitIT.class);
 
   private static final String LETTERS = "abcdefghijklmnopqrstuvwxyz";
   static final SortedSet<Text> SPLITS = new TreeSet<Text>();
@@ -91,7 +92,7 @@ public class DeleteRowsSplitIT extends AccumuloClusterIT {
             final SortedSet<Text> afterEnd = SPLITS.tailSet(new Text(end.toString()
+ "\0"));
             conn.tableOperations().addSplits(tableName, afterEnd);
           } catch (Exception ex) {
-            log.error(ex, ex);
+            log.error("Exception", ex);
             synchronized (fail) {
               fail[0] = true;
             }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
index 5ec0bee..33c4e48 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
@@ -91,15 +91,16 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.util.Tool;
-import org.apache.log4j.Logger;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ExamplesIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(ExamplesIT.class);
+  private static final Logger log = LoggerFactory.getLogger(ExamplesIT.class);
   private static final BatchWriterOpts bwOpts = new BatchWriterOpts();
   private static final BatchWriterConfig bwc = new BatchWriterConfig();
   private static final String visibility = "A|B";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
index 0e31253..a29defd 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
@@ -80,7 +80,7 @@ public class HalfDeadTServerIT extends ConfigurableMacIT {
           output.append("\n");
         }
       } catch (IOException ex) {
-        log.error(ex, ex);
+        log.error("IOException", ex);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java b/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java
index 3bb7d75..027f1e6 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java
@@ -41,14 +41,15 @@ import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.test.TestIngest;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class LargeRowIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(LargeRowIT.class);
+  private static final Logger log = LoggerFactory.getLogger(LargeRowIT.class);
 
   @Override
   public void configureMiniCluster(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite)
{

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java b/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java
index ca0c62a..e36ac09 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java
@@ -29,11 +29,12 @@ import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.harness.AccumuloClusterIT;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class LogicalTimeIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(LogicalTimeIT.class);
+  private static final Logger log = LoggerFactory.getLogger(LogicalTimeIT.class);
 
   @Override
   protected int defaultTimeoutSeconds() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
index 43e2350..bf892db 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/MonitorLoggingIT.java
@@ -30,12 +30,13 @@ import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.monitor.Monitor;
 import org.apache.accumulo.server.util.Admin;
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class MonitorLoggingIT extends ConfigurableMacIT {
-  private static final Logger log = Logger.getLogger(MonitorLoggingIT.class);
+  private static final Logger log = LoggerFactory.getLogger(MonitorLoggingIT.class);
 
   @Override
   public void beforeClusterStart(MiniAccumuloConfigImpl cfg) throws Exception {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java b/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
index 807f020..022a3a0 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
@@ -54,15 +54,16 @@ import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.harness.AccumuloClusterIT;
 import org.apache.hadoop.io.Text;
-import org.apache.log4j.Logger;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 // This test verifies the default permissions so a clean instance must be used. A shared
instance might
 // not be representative of a fresh installation.
 public class PermissionsIT extends AccumuloClusterIT {
-  private static final Logger log = Logger.getLogger(PermissionsIT.class);
+  private static final Logger log = LoggerFactory.getLogger(PermissionsIT.class);
 
   @Override
   public int defaultTimeoutSeconds() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
index 92fc215..7793627 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/RecoveryWithEmptyRFileIT.java
@@ -35,8 +35,9 @@ 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.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * XXX As a part of verifying lossy recovery via inserting an empty rfile, this test deletes
test table tablets. This will require write access to the backing
@@ -46,7 +47,7 @@ import org.junit.Test;
  * make sure the test user doesn't have write access to the HDFS files of any colocated live
Accumulo instance or any important local filesystem files..
  */
 public class RecoveryWithEmptyRFileIT extends ConfigurableMacIT {
-  private static final Logger log = Logger.getLogger(RecoveryWithEmptyRFileIT.class);
+  private static final Logger log = LoggerFactory.getLogger(RecoveryWithEmptyRFileIT.class);
 
   static final int ROWS = 200000;
   static final int COLS = 1;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4583eb3/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java b/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java
index 1f39b47..3bbd737 100644
--- a/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java
+++ b/test/src/test/java/org/apache/accumulo/test/util/CertUtils.java
@@ -51,7 +51,6 @@ import org.apache.accumulo.core.conf.SiteConfiguration;
 import org.apache.commons.io.FileExistsException;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
-import org.apache.log4j.Logger;
 import org.bouncycastle.asn1.x500.X500Name;
 import org.bouncycastle.asn1.x500.style.IETFUtils;
 import org.bouncycastle.asn1.x500.style.RFC4519Style;
@@ -66,12 +65,14 @@ import org.bouncycastle.jce.provider.BouncyCastleProvider;
 import org.bouncycastle.jce.provider.X509CertificateObject;
 import org.bouncycastle.operator.OperatorCreationException;
 import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
 
 public class CertUtils {
-  private static final Logger log = Logger.getLogger(CertUtils.class);
+  private static final Logger log = LoggerFactory.getLogger(CertUtils.class);
   static {
     Security.addProvider(new BouncyCastleProvider());
   }


Mime
View raw message