accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [07/35] git commit: ACCUMULO-1961 clean up warnings as listed by eclipse
Date Thu, 05 Jun 2014 04:42:49 GMT
ACCUMULO-1961 clean up warnings as listed by eclipse


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

Branch: refs/heads/ACCUMULO-378
Commit: 9e770ca3d0ad2192057c35463277bf9048c0d491
Parents: 9d8d69a
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Tue Jun 3 10:43:36 2014 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Tue Jun 3 10:43:36 2014 -0400

----------------------------------------------------------------------
 .../accumulo/core/iterators/conf/ColumnToClassMapping.java   | 1 +
 .../org/apache/accumulo/core/util/AsyncSocketAppender.java   | 3 +--
 .../apache/accumulo/core/util/AsyncSocketAppenderTest.java   | 8 ++++----
 .../java/org/apache/accumulo/fate/zookeeper/ZooCache.java    | 1 -
 .../org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java  | 4 ----
 .../accumulo/server/zookeeper/ZooReaderWriterFactory.java    | 2 --
 .../test/java/org/apache/accumulo/server/AccumuloTest.java   | 1 -
 .../accumulo/server/watcher/MonitorLog4jWatcherTest.java     | 8 ++++----
 .../org/apache/accumulo/tserver/log/LocalWALRecovery.java    | 6 ++----
 .../apache/accumulo/test/functional/MonitorLoggingIT.java    | 1 -
 10 files changed, 12 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
b/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
index 97f242b..062b1ce 100644
--- a/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
+++ b/core/src/main/java/org/apache/accumulo/core/iterators/conf/ColumnToClassMapping.java
@@ -46,6 +46,7 @@ public class ColumnToClassMapping<K> {
 	  this(objectStrings, c, null);
   }
 
+  @SuppressWarnings("unchecked")
   public ColumnToClassMapping(Map<String,String> objectStrings, Class<? extends
K> c, String context) throws InstantiationException, IllegalAccessException,
   ClassNotFoundException, IOException {
 	  this();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/core/src/main/java/org/apache/accumulo/core/util/AsyncSocketAppender.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/util/AsyncSocketAppender.java b/core/src/main/java/org/apache/accumulo/core/util/AsyncSocketAppender.java
index baae9ba..07c2b6c 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/AsyncSocketAppender.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/AsyncSocketAppender.java
@@ -17,9 +17,8 @@
 package org.apache.accumulo.core.util;
 
 import java.util.concurrent.atomic.AtomicBoolean;
+
 import org.apache.log4j.AsyncAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
 import org.apache.log4j.net.SocketAppender;
 import org.apache.log4j.spi.LoggingEvent;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java
b/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java
index 414125a..7598ef0 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/AsyncSocketAppenderTest.java
@@ -16,14 +16,14 @@
  */
 package org.apache.accumulo.core.util;
 
+import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
-import org.apache.log4j.Priority;
 import org.apache.log4j.net.SocketAppender;
 import org.apache.log4j.spi.LoggingEvent;
 import org.junit.Before;
 import org.junit.Test;
+
 import static org.junit.Assert.*;
-import org.easymock.Capture;
 import static org.easymock.EasyMock.*;
 
 public class AsyncSocketAppenderTest {
@@ -63,8 +63,8 @@ public class AsyncSocketAppenderTest {
   public void testAppend() {
     asa = new AsyncSocketAppender(sa);
     assertFalse(asa.isAttached(sa));
-    LoggingEvent event1 = new LoggingEvent("java.lang.String", Logger.getRootLogger(), Priority.INFO,
"event1", null);
-    LoggingEvent event2 = new LoggingEvent("java.lang.Integer", Logger.getRootLogger(), Priority.WARN,
"event2", null);
+    LoggingEvent event1 = new LoggingEvent("java.lang.String", Logger.getRootLogger(), Level.INFO,
"event1", null);
+    LoggingEvent event2 = new LoggingEvent("java.lang.Integer", Logger.getRootLogger(), Level.WARN,
"event2", null);
     sa.activateOptions();
     sa.doAppend(event1);
     sa.doAppend(event2);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
----------------------------------------------------------------------
diff --git a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
index 99ffd04..fa1e76b 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
@@ -27,7 +27,6 @@ import java.util.ConcurrentModificationException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
----------------------------------------------------------------------
diff --git a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
index 16f7833..1f0ae14 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooReaderWriter.java
@@ -17,17 +17,13 @@
 package org.apache.accumulo.fate.zookeeper;
 
 import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.security.SecurityPermission;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.accumulo.fate.util.UtilWaitThread;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
-import org.apache.log4j.Logger;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.KeeperException.BadVersionException;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
index 1682cda..0f22f07 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriterFactory.java
@@ -19,10 +19,8 @@ package org.apache.accumulo.server.zookeeper;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Proxy;
 import java.nio.charset.Charset;
-import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.fate.util.UtilWaitThread;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.ZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.RetryingInvocationHandler;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java b/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java
index a090b40..9c8d1e0 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/AccumuloTest.java
@@ -113,7 +113,6 @@ public class AccumuloTest {
     String confDirName = confDir.getAbsolutePath();
     assertTrue("Failed to make test configuration directory", confDir.mkdir());
     try {
-      File genericXml = new File(confDir, "generic_logger.xml");
       String genericXmlName = String.format("%s/generic_logger.xml", confDirName);
 
       assertEquals(genericXmlName, Accumulo.locateLogConfig(confDirName, "flogger"));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/server/base/src/test/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcherTest.java
----------------------------------------------------------------------
diff --git a/server/base/src/test/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcherTest.java
b/server/base/src/test/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcherTest.java
index 448e0ac..53c3c6e 100644
--- a/server/base/src/test/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcherTest.java
+++ b/server/base/src/test/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcherTest.java
@@ -16,14 +16,14 @@
  */
 package org.apache.accumulo.server.watcher;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-
 import org.junit.Before;
 import org.junit.Test;
-import static org.junit.Assert.*;
-import org.easymock.Capture;
-import static org.easymock.EasyMock.*;
 
 public class MonitorLog4jWatcherTest {
   private static final String INSTANCE = "instance";

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
index 51c13d5..868188a 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
@@ -30,8 +30,8 @@ import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
-import org.apache.accumulo.server.logger.LogFileKey;
-import org.apache.accumulo.server.logger.LogFileValue;
+import org.apache.accumulo.tserver.logger.LogFileKey;
+import org.apache.accumulo.tserver.logger.LogFileValue;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -137,9 +137,7 @@ public class LocalWALRecovery implements Runnable {
           continue;
         }
 
-        @SuppressWarnings("deprecation")
         LogFileKey key = new LogFileKey();
-        @SuppressWarnings("deprecation")
         LogFileValue value = new LogFileValue();
 
         log.info("Openning local log " + file.getAbsolutePath());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9e770ca3/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 c4a2e3d..331a546 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,7 +30,6 @@ 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.hadoop.conf.Configuration;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 import org.junit.Test;


Mime
View raw message