You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2016/07/22 02:58:55 UTC

[01/16] accumulo git commit: ACCUMULO-4385 Fix type safety warning

Repository: accumulo
Updated Branches:
  refs/heads/1.6 a37461648 -> dcc5dffc8
  refs/heads/1.7 710964086 -> 982286079
  refs/heads/1.8 227bfe886 -> c587a6f56
  refs/heads/master faa92c502 -> 2f8c8e7a4


ACCUMULO-4385 Fix type safety warning

Suppress unavoidable type safety warning about overriding a generic
method.


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

Branch: refs/heads/1.6
Commit: 775f67cc50ad51c61ae044ab2764d28541ea91dc
Parents: a374616
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 21:51:05 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 21:51:05 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/775f67cc/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
index 7496202..3b12d07 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
@@ -458,10 +458,10 @@ public class CachableBlockFile {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public <T> T getIndex(Class<T> clazz) {
       T bi = null;
       synchronized (cb) {
-        @SuppressWarnings("unchecked")
         SoftReference<T> softRef = (SoftReference<T>) cb.getIndex();
         if (softRef != null)
           bi = softRef.get();


[05/16] accumulo git commit: ACCUMULO-4386 Fix trivial compiler warnings

Posted by ct...@apache.org.
ACCUMULO-4386 Fix trivial compiler warnings

Fixes a few trivial compiler warnings when building with JDK8

* Unnecessary cast
* Misuse of auxillary class (use of wrong class in logger)
* Use explicit casts for generic arrays, to highlight lack of type
  safety in generic parameters, and avoid warning about missing generic
  parameters


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

Branch: refs/heads/master
Commit: dcc5dffc8ee9badddac85b714ca28123b528b264
Parents: 775f67c
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:21:32 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:30:06 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/cache/TestLruBlockCache.java    | 2 +-
 .../test/java/org/apache/accumulo/core/util/PartitionerTest.java | 4 ++--
 .../accumulo/examples/simple/filedata/ChunkCombinerTest.java     | 2 +-
 .../apache/accumulo/server/zookeeper/DistributedWorkQueue.java   | 2 +-
 .../org/apache/accumulo/master/tableOps/DeleteNamespace.java     | 4 ++--
 .../src/main/java/org/apache/accumulo/tserver/InMemoryMap.java   | 4 ++--
 .../src/main/java/org/apache/accumulo/tserver/NativeMap.java     | 4 ++--
 start/src/main/java/org/apache/accumulo/start/Main.java          | 4 ++--
 8 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
index 15abbaf..c85164f 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
@@ -460,7 +460,7 @@ public class TestLruBlockCache extends TestCase {
     int numEntries = (int) Math.ceil((1.2) * maxSize / roughBlockSize);
     long totalOverhead = LruBlockCache.CACHE_FIXED_OVERHEAD + ClassSize.CONCURRENT_HASHMAP + (numEntries * ClassSize.CONCURRENT_HASHMAP_ENTRY)
         + (LruBlockCache.DEFAULT_CONCURRENCY_LEVEL * ClassSize.CONCURRENT_HASHMAP_SEGMENT);
-    long negateBlockSize = (long) (totalOverhead / numEntries);
+    long negateBlockSize = totalOverhead / numEntries;
     negateBlockSize += CachedBlock.PER_BLOCK_OVERHEAD;
     return ClassSize.align((long) Math.floor((roughBlockSize - negateBlockSize) * 0.99f));
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java b/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
index c4538ab..b4b7136 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
@@ -39,7 +39,7 @@ public class PartitionerTest {
   public void test1() {
 
     @SuppressWarnings("unchecked")
-    Map<ByteSequence,MutableLong>[] groups = new Map[2];
+    Map<ByteSequence,MutableLong>[] groups = (Map<ByteSequence,MutableLong>[]) new Map<?,?>[2];
 
     groups[0] = new HashMap<ByteSequence,MutableLong>();
     groups[0].put(new ArrayByteSequence("cf1"), new MutableLong(1));
@@ -71,7 +71,7 @@ public class PartitionerTest {
 
     List<Mutation> mutations = Arrays.asList(m1, m2, m3, m4, m5);
     @SuppressWarnings("unchecked")
-    List<Mutation>[] partitioned = new List[3];
+    List<Mutation>[] partitioned = (List<Mutation>[]) new List<?>[3];
 
     for (int i = 0; i < partitioned.length; i++) {
       partitioned[i] = new ArrayList<Mutation>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
----------------------------------------------------------------------
diff --git a/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java b/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
index 6d1467a..5943d2a 100644
--- a/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
+++ b/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
@@ -83,7 +83,7 @@ public class ChunkCombinerTest extends TestCase {
           entry = null;
           continue;
         }
-        if (range.afterEndKey((Key) entry.getKey()))
+        if (range.afterEndKey(entry.getKey()))
           entry = null;
         break;
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
index 769ab86..f359cec 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
@@ -153,7 +153,7 @@ public class DistributedWorkQueue {
 
   public void startProcessing(final Processor processor, ThreadPoolExecutor executorService) throws KeeperException, InterruptedException {
 
-    threadPool = (ThreadPoolExecutor) executorService;
+    threadPool = executorService;
 
     zoo.mkdirs(path);
     zoo.mkdirs(path + "/" + LOCKS_NODE);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
index b6a9578..76dbf2d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
@@ -28,7 +28,7 @@ import org.apache.log4j.Logger;
 
 class NamespaceCleanUp extends MasterRepo {
 
-  final private static Logger log = Logger.getLogger(CleanUp.class);
+  final private static Logger log = Logger.getLogger(NamespaceCleanUp.class);
 
   private static final long serialVersionUID = 1L;
 
@@ -63,7 +63,7 @@ class NamespaceCleanUp extends MasterRepo {
 
     Utils.unreserveNamespace(namespaceId, id, true);
 
-    Logger.getLogger(CleanUp.class).debug("Deleted namespace " + namespaceId);
+    log.debug("Deleted namespace " + namespaceId);
 
     return null;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index 792d35a..8febaf2 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@ -274,9 +274,9 @@ public class InMemoryMap {
 
     @SuppressWarnings("unchecked")
     LocalityGroupMap(Map<String,Set<ByteSequence>> groups, boolean useNativeMap) {
-      this.groupFams = new Map[groups.size()];
+      this.groupFams = (Map<ByteSequence,MutableLong>[]) new Map<?,?>[groups.size()];
       this.maps = new SimpleMap[groups.size() + 1];
-      this.partitioned = new List[groups.size() + 1];
+      this.partitioned = (List<Mutation>[]) new List<?>[groups.size() + 1];
       this.nonDefaultColumnFamilies = new HashSet<ByteSequence>();
 
       for (int i = 0; i < maps.length; i++) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
index 7e1435e..ba5faaa 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
@@ -275,7 +275,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
     @SuppressWarnings("unchecked")
     ConcurrentIterator(Key key) {
       // start off with a small read ahead
-      nextEntries = new Entry[1];
+      nextEntries = (Entry<Key,Value>[]) new Entry<?,?>[1];
 
       rlock.lock();
       try {
@@ -299,7 +299,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
 
       // as we keep filling, increase the read ahead buffer
       if (nextEntries.length < MAX_READ_AHEAD_ENTRIES)
-        nextEntries = new Entry[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)];
+        nextEntries = (Entry<Key,Value>[]) new Entry<?,?>[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)];
 
       while (source.hasNext() && end < nextEntries.length) {
         Entry<Key,Value> ne = source.next();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/start/src/main/java/org/apache/accumulo/start/Main.java
----------------------------------------------------------------------
diff --git a/start/src/main/java/org/apache/accumulo/start/Main.java b/start/src/main/java/org/apache/accumulo/start/Main.java
index b9753bf..ac00ed9 100644
--- a/start/src/main/java/org/apache/accumulo/start/Main.java
+++ b/start/src/main/java/org/apache/accumulo/start/Main.java
@@ -40,7 +40,7 @@ public class Main {
 
       Class<?> vfsClassLoader = AccumuloClassLoader.getClassLoader().loadClass("org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader");
 
-      ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class[] {}).invoke(null, new Object[] {});
+      ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class<?>[] {}).invoke(null, new Object[] {});
 
       Class<?> runTMP = null;
 
@@ -70,7 +70,7 @@ public class Main {
       } else if (args[0].equals("minicluster")) {
         runTMP = cl.loadClass("org.apache.accumulo.minicluster.MiniAccumuloRunner");
       } else if (args[0].equals("classpath")) {
-        vfsClassLoader.getMethod("printClassPath", new Class[] {}).invoke(vfsClassLoader, new Object[] {});
+        vfsClassLoader.getMethod("printClassPath", new Class<?>[] {}).invoke(vfsClassLoader, new Object[] {});
         return;
       } else if (args[0].equals("version")) {
         runTMP = cl.loadClass("org.apache.accumulo.core.Constants");


[02/16] accumulo git commit: ACCUMULO-4385 Fix type safety warning

Posted by ct...@apache.org.
ACCUMULO-4385 Fix type safety warning

Suppress unavoidable type safety warning about overriding a generic
method.


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

Branch: refs/heads/1.7
Commit: 775f67cc50ad51c61ae044ab2764d28541ea91dc
Parents: a374616
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 21:51:05 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 21:51:05 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/775f67cc/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
index 7496202..3b12d07 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
@@ -458,10 +458,10 @@ public class CachableBlockFile {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public <T> T getIndex(Class<T> clazz) {
       T bi = null;
       synchronized (cb) {
-        @SuppressWarnings("unchecked")
         SoftReference<T> softRef = (SoftReference<T>) cb.getIndex();
         if (softRef != null)
           bi = softRef.get();


[08/16] accumulo git commit: ACCUMULO-4386 Fix trivial compiler warnings

Posted by ct...@apache.org.
ACCUMULO-4386 Fix trivial compiler warnings

Fixes a few trivial compiler warnings when building with JDK8

* Unnecessary cast
* Misuse of auxillary class (use of wrong class in logger)
* Use explicit casts for generic arrays, to highlight lack of type
  safety in generic parameters, and avoid warning about missing generic
  parameters


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

Branch: refs/heads/1.7
Commit: dcc5dffc8ee9badddac85b714ca28123b528b264
Parents: 775f67c
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:21:32 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:30:06 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/cache/TestLruBlockCache.java    | 2 +-
 .../test/java/org/apache/accumulo/core/util/PartitionerTest.java | 4 ++--
 .../accumulo/examples/simple/filedata/ChunkCombinerTest.java     | 2 +-
 .../apache/accumulo/server/zookeeper/DistributedWorkQueue.java   | 2 +-
 .../org/apache/accumulo/master/tableOps/DeleteNamespace.java     | 4 ++--
 .../src/main/java/org/apache/accumulo/tserver/InMemoryMap.java   | 4 ++--
 .../src/main/java/org/apache/accumulo/tserver/NativeMap.java     | 4 ++--
 start/src/main/java/org/apache/accumulo/start/Main.java          | 4 ++--
 8 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
index 15abbaf..c85164f 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
@@ -460,7 +460,7 @@ public class TestLruBlockCache extends TestCase {
     int numEntries = (int) Math.ceil((1.2) * maxSize / roughBlockSize);
     long totalOverhead = LruBlockCache.CACHE_FIXED_OVERHEAD + ClassSize.CONCURRENT_HASHMAP + (numEntries * ClassSize.CONCURRENT_HASHMAP_ENTRY)
         + (LruBlockCache.DEFAULT_CONCURRENCY_LEVEL * ClassSize.CONCURRENT_HASHMAP_SEGMENT);
-    long negateBlockSize = (long) (totalOverhead / numEntries);
+    long negateBlockSize = totalOverhead / numEntries;
     negateBlockSize += CachedBlock.PER_BLOCK_OVERHEAD;
     return ClassSize.align((long) Math.floor((roughBlockSize - negateBlockSize) * 0.99f));
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java b/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
index c4538ab..b4b7136 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
@@ -39,7 +39,7 @@ public class PartitionerTest {
   public void test1() {
 
     @SuppressWarnings("unchecked")
-    Map<ByteSequence,MutableLong>[] groups = new Map[2];
+    Map<ByteSequence,MutableLong>[] groups = (Map<ByteSequence,MutableLong>[]) new Map<?,?>[2];
 
     groups[0] = new HashMap<ByteSequence,MutableLong>();
     groups[0].put(new ArrayByteSequence("cf1"), new MutableLong(1));
@@ -71,7 +71,7 @@ public class PartitionerTest {
 
     List<Mutation> mutations = Arrays.asList(m1, m2, m3, m4, m5);
     @SuppressWarnings("unchecked")
-    List<Mutation>[] partitioned = new List[3];
+    List<Mutation>[] partitioned = (List<Mutation>[]) new List<?>[3];
 
     for (int i = 0; i < partitioned.length; i++) {
       partitioned[i] = new ArrayList<Mutation>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
----------------------------------------------------------------------
diff --git a/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java b/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
index 6d1467a..5943d2a 100644
--- a/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
+++ b/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
@@ -83,7 +83,7 @@ public class ChunkCombinerTest extends TestCase {
           entry = null;
           continue;
         }
-        if (range.afterEndKey((Key) entry.getKey()))
+        if (range.afterEndKey(entry.getKey()))
           entry = null;
         break;
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
index 769ab86..f359cec 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
@@ -153,7 +153,7 @@ public class DistributedWorkQueue {
 
   public void startProcessing(final Processor processor, ThreadPoolExecutor executorService) throws KeeperException, InterruptedException {
 
-    threadPool = (ThreadPoolExecutor) executorService;
+    threadPool = executorService;
 
     zoo.mkdirs(path);
     zoo.mkdirs(path + "/" + LOCKS_NODE);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
index b6a9578..76dbf2d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
@@ -28,7 +28,7 @@ import org.apache.log4j.Logger;
 
 class NamespaceCleanUp extends MasterRepo {
 
-  final private static Logger log = Logger.getLogger(CleanUp.class);
+  final private static Logger log = Logger.getLogger(NamespaceCleanUp.class);
 
   private static final long serialVersionUID = 1L;
 
@@ -63,7 +63,7 @@ class NamespaceCleanUp extends MasterRepo {
 
     Utils.unreserveNamespace(namespaceId, id, true);
 
-    Logger.getLogger(CleanUp.class).debug("Deleted namespace " + namespaceId);
+    log.debug("Deleted namespace " + namespaceId);
 
     return null;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index 792d35a..8febaf2 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@ -274,9 +274,9 @@ public class InMemoryMap {
 
     @SuppressWarnings("unchecked")
     LocalityGroupMap(Map<String,Set<ByteSequence>> groups, boolean useNativeMap) {
-      this.groupFams = new Map[groups.size()];
+      this.groupFams = (Map<ByteSequence,MutableLong>[]) new Map<?,?>[groups.size()];
       this.maps = new SimpleMap[groups.size() + 1];
-      this.partitioned = new List[groups.size() + 1];
+      this.partitioned = (List<Mutation>[]) new List<?>[groups.size() + 1];
       this.nonDefaultColumnFamilies = new HashSet<ByteSequence>();
 
       for (int i = 0; i < maps.length; i++) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
index 7e1435e..ba5faaa 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
@@ -275,7 +275,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
     @SuppressWarnings("unchecked")
     ConcurrentIterator(Key key) {
       // start off with a small read ahead
-      nextEntries = new Entry[1];
+      nextEntries = (Entry<Key,Value>[]) new Entry<?,?>[1];
 
       rlock.lock();
       try {
@@ -299,7 +299,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
 
       // as we keep filling, increase the read ahead buffer
       if (nextEntries.length < MAX_READ_AHEAD_ENTRIES)
-        nextEntries = new Entry[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)];
+        nextEntries = (Entry<Key,Value>[]) new Entry<?,?>[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)];
 
       while (source.hasNext() && end < nextEntries.length) {
         Entry<Key,Value> ne = source.next();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/start/src/main/java/org/apache/accumulo/start/Main.java
----------------------------------------------------------------------
diff --git a/start/src/main/java/org/apache/accumulo/start/Main.java b/start/src/main/java/org/apache/accumulo/start/Main.java
index b9753bf..ac00ed9 100644
--- a/start/src/main/java/org/apache/accumulo/start/Main.java
+++ b/start/src/main/java/org/apache/accumulo/start/Main.java
@@ -40,7 +40,7 @@ public class Main {
 
       Class<?> vfsClassLoader = AccumuloClassLoader.getClassLoader().loadClass("org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader");
 
-      ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class[] {}).invoke(null, new Object[] {});
+      ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class<?>[] {}).invoke(null, new Object[] {});
 
       Class<?> runTMP = null;
 
@@ -70,7 +70,7 @@ public class Main {
       } else if (args[0].equals("minicluster")) {
         runTMP = cl.loadClass("org.apache.accumulo.minicluster.MiniAccumuloRunner");
       } else if (args[0].equals("classpath")) {
-        vfsClassLoader.getMethod("printClassPath", new Class[] {}).invoke(vfsClassLoader, new Object[] {});
+        vfsClassLoader.getMethod("printClassPath", new Class<?>[] {}).invoke(vfsClassLoader, new Object[] {});
         return;
       } else if (args[0].equals("version")) {
         runTMP = cl.loadClass("org.apache.accumulo.core.Constants");


[14/16] accumulo git commit: ACCUMULO-4386 Fix trivial compiler warnings

Posted by ct...@apache.org.
ACCUMULO-4386 Fix trivial compiler warnings

Fix extra import and use generic method for emptyMap() instead of
EMPTY_MAP constant.


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

Branch: refs/heads/master
Commit: c587a6f5607b211fa6d7d542f3694cac814956c0
Parents: 4980eec
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:52:24 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:52:24 2016 -0400

----------------------------------------------------------------------
 .../minicluster/impl/MiniAccumuloClusterControl.java     |  2 +-
 .../org/apache/accumulo/master/TabletGroupWatcher.java   | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c587a6f5/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
index 688cb5d..9a433cf 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
@@ -134,7 +134,7 @@ public class MiniAccumuloClusterControl implements ClusterControl {
 
   @Override
   public synchronized void start(ServerType server, String hostname) throws IOException {
-    start(server, hostname, Collections.EMPTY_MAP, Integer.MAX_VALUE);
+    start(server, hostname, Collections.<String,String> emptyMap(), Integer.MAX_VALUE);
   }
 
   public synchronized void start(ServerType server, String hostname, Map<String,String> configOverrides, int limit) throws IOException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c587a6f5/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index 2cf7d9d..76fda21 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@ -16,8 +16,8 @@
  */
 package org.apache.accumulo.master;
 
-import com.google.common.collect.ImmutableSortedSet;
 import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+import static java.lang.Math.min;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -29,6 +29,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.SortedMap;
+import java.util.SortedSet;
 import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.concurrent.TimeUnit;
@@ -43,6 +44,7 @@ import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.RowIterator;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.PartialKey;
@@ -67,6 +69,7 @@ import org.apache.accumulo.master.state.MergeStats;
 import org.apache.accumulo.master.state.TableCounts;
 import org.apache.accumulo.master.state.TableStats;
 import org.apache.accumulo.server.ServerConstants;
+import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.fs.FileRef;
 import org.apache.accumulo.server.fs.VolumeManager.FileType;
 import org.apache.accumulo.server.log.WalStateManager;
@@ -91,12 +94,8 @@ import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 
 import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableSortedSet;
 import com.google.common.collect.Iterators;
-import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.server.conf.TableConfiguration;
-import static java.lang.Math.min;
-import java.util.SortedSet;
-import static java.lang.Math.min;
 
 abstract class TabletGroupWatcher extends Daemon {
   // Constants used to make sure assignment logging isn't excessive in quantity or size


[12/16] accumulo git commit: Merge branch '1.7' into 1.8

Posted by ct...@apache.org.
Merge branch '1.7' into 1.8


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

Branch: refs/heads/master
Commit: 4980eec2fc902e0687728a421e5e38fcfadc0000
Parents: 227bfe8 9822860
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:46:58 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:46:58 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4980eec2/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------


[10/16] accumulo git commit: Merge branch '1.6' into 1.7

Posted by ct...@apache.org.
Merge branch '1.6' into 1.7


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

Branch: refs/heads/1.8
Commit: 98228607909747115fd1c16f1561f153e135913c
Parents: 7109640 dcc5dff
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:32:41 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:32:41 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/98228607/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------


[09/16] accumulo git commit: Merge branch '1.6' into 1.7

Posted by ct...@apache.org.
Merge branch '1.6' into 1.7


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

Branch: refs/heads/1.7
Commit: 98228607909747115fd1c16f1561f153e135913c
Parents: 7109640 dcc5dff
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:32:41 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:32:41 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/98228607/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------


[16/16] accumulo git commit: Merge branch '1.8'

Posted by ct...@apache.org.
Merge branch '1.8'


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

Branch: refs/heads/master
Commit: 2f8c8e7a4ae79aafd0653c420c0a1f3d7f50279b
Parents: faa92c5 c587a6f
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:58:44 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:58:44 2016 -0400

----------------------------------------------------------------------
 .../core/file/blockfile/impl/CachableBlockFile.java      |  2 +-
 .../minicluster/impl/MiniAccumuloClusterControl.java     |  2 +-
 .../org/apache/accumulo/master/TabletGroupWatcher.java   | 11 +++++------
 .../apache/accumulo/shell/commands/TablesCommand.java    |  2 +-
 4 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2f8c8e7a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
----------------------------------------------------------------------
diff --cc server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index fa8087f,76fda21..9d8a1d1
--- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@@ -27,9 -27,9 +27,10 @@@ import java.util.Iterator
  import java.util.List;
  import java.util.Map;
  import java.util.Map.Entry;
 +import java.util.Optional;
  import java.util.Set;
  import java.util.SortedMap;
+ import java.util.SortedSet;
  import java.util.TreeMap;
  import java.util.TreeSet;
  import java.util.concurrent.TimeUnit;
@@@ -91,12 -93,9 +94,8 @@@ import org.apache.hadoop.fs.Path
  import org.apache.hadoop.io.Text;
  import org.apache.thrift.TException;
  
 -import com.google.common.base.Optional;
+ import com.google.common.collect.ImmutableSortedSet;
  import com.google.common.collect.Iterators;
- import org.apache.accumulo.core.conf.Property;
- import org.apache.accumulo.server.conf.TableConfiguration;
- import static java.lang.Math.min;
- import java.util.SortedSet;
- import static java.lang.Math.min;
  
  abstract class TabletGroupWatcher extends Daemon {
    // Constants used to make sure assignment logging isn't excessive in quantity or size

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2f8c8e7a/shell/src/main/java/org/apache/accumulo/shell/commands/TablesCommand.java
----------------------------------------------------------------------
diff --cc shell/src/main/java/org/apache/accumulo/shell/commands/TablesCommand.java
index 0390c4e,397b450..8bf96e7
--- a/shell/src/main/java/org/apache/accumulo/shell/commands/TablesCommand.java
+++ b/shell/src/main/java/org/apache/accumulo/shell/commands/TablesCommand.java
@@@ -51,20 -54,28 +51,20 @@@ public class TablesCommand extends Comm
      Map<String,String> tables = shellState.getConnector().tableOperations().tableIdMap();
  
      // filter only specified namespace
 -    tables = Maps.filterKeys(tables, new Predicate<String>() {
 -      @Override
 -      public boolean apply(String tableName) {
 -        return namespace == null || Tables.qualify(tableName).getFirst().equals(namespace);
 -      }
 -    });
 +    tables = Maps.filterKeys(tables, tableName -> namespace == null || Tables.qualify(tableName).getFirst().equals(namespace));
  
      final boolean sortByTableId = cl.hasOption(sortByTableIdOption.getOpt());
--    tables = new TreeMap<>((sortByTableId ? MapUtils.invertMap(tables) : tables));
++    tables = new TreeMap<String,String>((sortByTableId ? MapUtils.invertMap(tables) : tables));
  
 -    Iterator<String> it = Iterators.transform(tables.entrySet().iterator(), new Function<Entry<String,String>,String>() {
 -      @Override
 -      public String apply(Map.Entry<String,String> entry) {
 -        String tableName = String.valueOf(sortByTableId ? entry.getValue() : entry.getKey());
 -        String tableId = String.valueOf(sortByTableId ? entry.getKey() : entry.getValue());
 -        if (namespace != null)
 -          tableName = Tables.qualify(tableName).getSecond();
 -        if (cl.hasOption(tableIdOption.getOpt()))
 -          return String.format(NAME_AND_ID_FORMAT, tableName, tableId);
 -        else
 -          return tableName;
 -      }
 +    Iterator<String> it = Iterators.transform(tables.entrySet().iterator(), entry -> {
 +      String tableName = String.valueOf(sortByTableId ? entry.getValue() : entry.getKey());
 +      String tableId = String.valueOf(sortByTableId ? entry.getKey() : entry.getValue());
 +      if (namespace != null)
 +        tableName = Tables.qualify(tableName).getSecond();
 +      if (cl.hasOption(tableIdOption.getOpt()))
 +        return String.format(NAME_AND_ID_FORMAT, tableName, tableId);
 +      else
 +        return tableName;
      });
  
      shellState.printLines(it, !cl.hasOption(disablePaginationOpt.getOpt()));


[03/16] accumulo git commit: ACCUMULO-4385 Fix type safety warning

Posted by ct...@apache.org.
ACCUMULO-4385 Fix type safety warning

Suppress unavoidable type safety warning about overriding a generic
method.


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

Branch: refs/heads/1.8
Commit: 775f67cc50ad51c61ae044ab2764d28541ea91dc
Parents: a374616
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 21:51:05 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 21:51:05 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/775f67cc/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
index 7496202..3b12d07 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
@@ -458,10 +458,10 @@ public class CachableBlockFile {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public <T> T getIndex(Class<T> clazz) {
       T bi = null;
       synchronized (cb) {
-        @SuppressWarnings("unchecked")
         SoftReference<T> softRef = (SoftReference<T>) cb.getIndex();
         if (softRef != null)
           bi = softRef.get();


[07/16] accumulo git commit: ACCUMULO-4386 Fix trivial compiler warnings

Posted by ct...@apache.org.
ACCUMULO-4386 Fix trivial compiler warnings

Fixes a few trivial compiler warnings when building with JDK8

* Unnecessary cast
* Misuse of auxillary class (use of wrong class in logger)
* Use explicit casts for generic arrays, to highlight lack of type
  safety in generic parameters, and avoid warning about missing generic
  parameters


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

Branch: refs/heads/1.8
Commit: dcc5dffc8ee9badddac85b714ca28123b528b264
Parents: 775f67c
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:21:32 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:30:06 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/cache/TestLruBlockCache.java    | 2 +-
 .../test/java/org/apache/accumulo/core/util/PartitionerTest.java | 4 ++--
 .../accumulo/examples/simple/filedata/ChunkCombinerTest.java     | 2 +-
 .../apache/accumulo/server/zookeeper/DistributedWorkQueue.java   | 2 +-
 .../org/apache/accumulo/master/tableOps/DeleteNamespace.java     | 4 ++--
 .../src/main/java/org/apache/accumulo/tserver/InMemoryMap.java   | 4 ++--
 .../src/main/java/org/apache/accumulo/tserver/NativeMap.java     | 4 ++--
 start/src/main/java/org/apache/accumulo/start/Main.java          | 4 ++--
 8 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
index 15abbaf..c85164f 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
@@ -460,7 +460,7 @@ public class TestLruBlockCache extends TestCase {
     int numEntries = (int) Math.ceil((1.2) * maxSize / roughBlockSize);
     long totalOverhead = LruBlockCache.CACHE_FIXED_OVERHEAD + ClassSize.CONCURRENT_HASHMAP + (numEntries * ClassSize.CONCURRENT_HASHMAP_ENTRY)
         + (LruBlockCache.DEFAULT_CONCURRENCY_LEVEL * ClassSize.CONCURRENT_HASHMAP_SEGMENT);
-    long negateBlockSize = (long) (totalOverhead / numEntries);
+    long negateBlockSize = totalOverhead / numEntries;
     negateBlockSize += CachedBlock.PER_BLOCK_OVERHEAD;
     return ClassSize.align((long) Math.floor((roughBlockSize - negateBlockSize) * 0.99f));
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java b/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
index c4538ab..b4b7136 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
@@ -39,7 +39,7 @@ public class PartitionerTest {
   public void test1() {
 
     @SuppressWarnings("unchecked")
-    Map<ByteSequence,MutableLong>[] groups = new Map[2];
+    Map<ByteSequence,MutableLong>[] groups = (Map<ByteSequence,MutableLong>[]) new Map<?,?>[2];
 
     groups[0] = new HashMap<ByteSequence,MutableLong>();
     groups[0].put(new ArrayByteSequence("cf1"), new MutableLong(1));
@@ -71,7 +71,7 @@ public class PartitionerTest {
 
     List<Mutation> mutations = Arrays.asList(m1, m2, m3, m4, m5);
     @SuppressWarnings("unchecked")
-    List<Mutation>[] partitioned = new List[3];
+    List<Mutation>[] partitioned = (List<Mutation>[]) new List<?>[3];
 
     for (int i = 0; i < partitioned.length; i++) {
       partitioned[i] = new ArrayList<Mutation>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
----------------------------------------------------------------------
diff --git a/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java b/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
index 6d1467a..5943d2a 100644
--- a/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
+++ b/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
@@ -83,7 +83,7 @@ public class ChunkCombinerTest extends TestCase {
           entry = null;
           continue;
         }
-        if (range.afterEndKey((Key) entry.getKey()))
+        if (range.afterEndKey(entry.getKey()))
           entry = null;
         break;
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
index 769ab86..f359cec 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
@@ -153,7 +153,7 @@ public class DistributedWorkQueue {
 
   public void startProcessing(final Processor processor, ThreadPoolExecutor executorService) throws KeeperException, InterruptedException {
 
-    threadPool = (ThreadPoolExecutor) executorService;
+    threadPool = executorService;
 
     zoo.mkdirs(path);
     zoo.mkdirs(path + "/" + LOCKS_NODE);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
index b6a9578..76dbf2d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
@@ -28,7 +28,7 @@ import org.apache.log4j.Logger;
 
 class NamespaceCleanUp extends MasterRepo {
 
-  final private static Logger log = Logger.getLogger(CleanUp.class);
+  final private static Logger log = Logger.getLogger(NamespaceCleanUp.class);
 
   private static final long serialVersionUID = 1L;
 
@@ -63,7 +63,7 @@ class NamespaceCleanUp extends MasterRepo {
 
     Utils.unreserveNamespace(namespaceId, id, true);
 
-    Logger.getLogger(CleanUp.class).debug("Deleted namespace " + namespaceId);
+    log.debug("Deleted namespace " + namespaceId);
 
     return null;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index 792d35a..8febaf2 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@ -274,9 +274,9 @@ public class InMemoryMap {
 
     @SuppressWarnings("unchecked")
     LocalityGroupMap(Map<String,Set<ByteSequence>> groups, boolean useNativeMap) {
-      this.groupFams = new Map[groups.size()];
+      this.groupFams = (Map<ByteSequence,MutableLong>[]) new Map<?,?>[groups.size()];
       this.maps = new SimpleMap[groups.size() + 1];
-      this.partitioned = new List[groups.size() + 1];
+      this.partitioned = (List<Mutation>[]) new List<?>[groups.size() + 1];
       this.nonDefaultColumnFamilies = new HashSet<ByteSequence>();
 
       for (int i = 0; i < maps.length; i++) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
index 7e1435e..ba5faaa 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
@@ -275,7 +275,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
     @SuppressWarnings("unchecked")
     ConcurrentIterator(Key key) {
       // start off with a small read ahead
-      nextEntries = new Entry[1];
+      nextEntries = (Entry<Key,Value>[]) new Entry<?,?>[1];
 
       rlock.lock();
       try {
@@ -299,7 +299,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
 
       // as we keep filling, increase the read ahead buffer
       if (nextEntries.length < MAX_READ_AHEAD_ENTRIES)
-        nextEntries = new Entry[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)];
+        nextEntries = (Entry<Key,Value>[]) new Entry<?,?>[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)];
 
       while (source.hasNext() && end < nextEntries.length) {
         Entry<Key,Value> ne = source.next();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/start/src/main/java/org/apache/accumulo/start/Main.java
----------------------------------------------------------------------
diff --git a/start/src/main/java/org/apache/accumulo/start/Main.java b/start/src/main/java/org/apache/accumulo/start/Main.java
index b9753bf..ac00ed9 100644
--- a/start/src/main/java/org/apache/accumulo/start/Main.java
+++ b/start/src/main/java/org/apache/accumulo/start/Main.java
@@ -40,7 +40,7 @@ public class Main {
 
       Class<?> vfsClassLoader = AccumuloClassLoader.getClassLoader().loadClass("org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader");
 
-      ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class[] {}).invoke(null, new Object[] {});
+      ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class<?>[] {}).invoke(null, new Object[] {});
 
       Class<?> runTMP = null;
 
@@ -70,7 +70,7 @@ public class Main {
       } else if (args[0].equals("minicluster")) {
         runTMP = cl.loadClass("org.apache.accumulo.minicluster.MiniAccumuloRunner");
       } else if (args[0].equals("classpath")) {
-        vfsClassLoader.getMethod("printClassPath", new Class[] {}).invoke(vfsClassLoader, new Object[] {});
+        vfsClassLoader.getMethod("printClassPath", new Class<?>[] {}).invoke(vfsClassLoader, new Object[] {});
         return;
       } else if (args[0].equals("version")) {
         runTMP = cl.loadClass("org.apache.accumulo.core.Constants");


[06/16] accumulo git commit: ACCUMULO-4386 Fix trivial compiler warnings

Posted by ct...@apache.org.
ACCUMULO-4386 Fix trivial compiler warnings

Fixes a few trivial compiler warnings when building with JDK8

* Unnecessary cast
* Misuse of auxillary class (use of wrong class in logger)
* Use explicit casts for generic arrays, to highlight lack of type
  safety in generic parameters, and avoid warning about missing generic
  parameters


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

Branch: refs/heads/1.6
Commit: dcc5dffc8ee9badddac85b714ca28123b528b264
Parents: 775f67c
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:21:32 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:30:06 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/cache/TestLruBlockCache.java    | 2 +-
 .../test/java/org/apache/accumulo/core/util/PartitionerTest.java | 4 ++--
 .../accumulo/examples/simple/filedata/ChunkCombinerTest.java     | 2 +-
 .../apache/accumulo/server/zookeeper/DistributedWorkQueue.java   | 2 +-
 .../org/apache/accumulo/master/tableOps/DeleteNamespace.java     | 4 ++--
 .../src/main/java/org/apache/accumulo/tserver/InMemoryMap.java   | 4 ++--
 .../src/main/java/org/apache/accumulo/tserver/NativeMap.java     | 4 ++--
 start/src/main/java/org/apache/accumulo/start/Main.java          | 4 ++--
 8 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
index 15abbaf..c85164f 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
@@ -460,7 +460,7 @@ public class TestLruBlockCache extends TestCase {
     int numEntries = (int) Math.ceil((1.2) * maxSize / roughBlockSize);
     long totalOverhead = LruBlockCache.CACHE_FIXED_OVERHEAD + ClassSize.CONCURRENT_HASHMAP + (numEntries * ClassSize.CONCURRENT_HASHMAP_ENTRY)
         + (LruBlockCache.DEFAULT_CONCURRENCY_LEVEL * ClassSize.CONCURRENT_HASHMAP_SEGMENT);
-    long negateBlockSize = (long) (totalOverhead / numEntries);
+    long negateBlockSize = totalOverhead / numEntries;
     negateBlockSize += CachedBlock.PER_BLOCK_OVERHEAD;
     return ClassSize.align((long) Math.floor((roughBlockSize - negateBlockSize) * 0.99f));
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java b/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
index c4538ab..b4b7136 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/PartitionerTest.java
@@ -39,7 +39,7 @@ public class PartitionerTest {
   public void test1() {
 
     @SuppressWarnings("unchecked")
-    Map<ByteSequence,MutableLong>[] groups = new Map[2];
+    Map<ByteSequence,MutableLong>[] groups = (Map<ByteSequence,MutableLong>[]) new Map<?,?>[2];
 
     groups[0] = new HashMap<ByteSequence,MutableLong>();
     groups[0].put(new ArrayByteSequence("cf1"), new MutableLong(1));
@@ -71,7 +71,7 @@ public class PartitionerTest {
 
     List<Mutation> mutations = Arrays.asList(m1, m2, m3, m4, m5);
     @SuppressWarnings("unchecked")
-    List<Mutation>[] partitioned = new List[3];
+    List<Mutation>[] partitioned = (List<Mutation>[]) new List<?>[3];
 
     for (int i = 0; i < partitioned.length; i++) {
       partitioned[i] = new ArrayList<Mutation>();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
----------------------------------------------------------------------
diff --git a/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java b/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
index 6d1467a..5943d2a 100644
--- a/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
+++ b/examples/simple/src/test/java/org/apache/accumulo/examples/simple/filedata/ChunkCombinerTest.java
@@ -83,7 +83,7 @@ public class ChunkCombinerTest extends TestCase {
           entry = null;
           continue;
         }
-        if (range.afterEndKey((Key) entry.getKey()))
+        if (range.afterEndKey(entry.getKey()))
           entry = null;
         break;
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
index 769ab86..f359cec 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
@@ -153,7 +153,7 @@ public class DistributedWorkQueue {
 
   public void startProcessing(final Processor processor, ThreadPoolExecutor executorService) throws KeeperException, InterruptedException {
 
-    threadPool = (ThreadPoolExecutor) executorService;
+    threadPool = executorService;
 
     zoo.mkdirs(path);
     zoo.mkdirs(path + "/" + LOCKS_NODE);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
index b6a9578..76dbf2d 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteNamespace.java
@@ -28,7 +28,7 @@ import org.apache.log4j.Logger;
 
 class NamespaceCleanUp extends MasterRepo {
 
-  final private static Logger log = Logger.getLogger(CleanUp.class);
+  final private static Logger log = Logger.getLogger(NamespaceCleanUp.class);
 
   private static final long serialVersionUID = 1L;
 
@@ -63,7 +63,7 @@ class NamespaceCleanUp extends MasterRepo {
 
     Utils.unreserveNamespace(namespaceId, id, true);
 
-    Logger.getLogger(CleanUp.class).debug("Deleted namespace " + namespaceId);
+    log.debug("Deleted namespace " + namespaceId);
 
     return null;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
index 792d35a..8febaf2 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/InMemoryMap.java
@@ -274,9 +274,9 @@ public class InMemoryMap {
 
     @SuppressWarnings("unchecked")
     LocalityGroupMap(Map<String,Set<ByteSequence>> groups, boolean useNativeMap) {
-      this.groupFams = new Map[groups.size()];
+      this.groupFams = (Map<ByteSequence,MutableLong>[]) new Map<?,?>[groups.size()];
       this.maps = new SimpleMap[groups.size() + 1];
-      this.partitioned = new List[groups.size() + 1];
+      this.partitioned = (List<Mutation>[]) new List<?>[groups.size() + 1];
       this.nonDefaultColumnFamilies = new HashSet<ByteSequence>();
 
       for (int i = 0; i < maps.length; i++) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
index 7e1435e..ba5faaa 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
@@ -275,7 +275,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
     @SuppressWarnings("unchecked")
     ConcurrentIterator(Key key) {
       // start off with a small read ahead
-      nextEntries = new Entry[1];
+      nextEntries = (Entry<Key,Value>[]) new Entry<?,?>[1];
 
       rlock.lock();
       try {
@@ -299,7 +299,7 @@ public class NativeMap implements Iterable<Map.Entry<Key,Value>> {
 
       // as we keep filling, increase the read ahead buffer
       if (nextEntries.length < MAX_READ_AHEAD_ENTRIES)
-        nextEntries = new Entry[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)];
+        nextEntries = (Entry<Key,Value>[]) new Entry<?,?>[Math.min(nextEntries.length * 2, MAX_READ_AHEAD_ENTRIES)];
 
       while (source.hasNext() && end < nextEntries.length) {
         Entry<Key,Value> ne = source.next();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc5dffc/start/src/main/java/org/apache/accumulo/start/Main.java
----------------------------------------------------------------------
diff --git a/start/src/main/java/org/apache/accumulo/start/Main.java b/start/src/main/java/org/apache/accumulo/start/Main.java
index b9753bf..ac00ed9 100644
--- a/start/src/main/java/org/apache/accumulo/start/Main.java
+++ b/start/src/main/java/org/apache/accumulo/start/Main.java
@@ -40,7 +40,7 @@ public class Main {
 
       Class<?> vfsClassLoader = AccumuloClassLoader.getClassLoader().loadClass("org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader");
 
-      ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class[] {}).invoke(null, new Object[] {});
+      ClassLoader cl = (ClassLoader) vfsClassLoader.getMethod("getClassLoader", new Class<?>[] {}).invoke(null, new Object[] {});
 
       Class<?> runTMP = null;
 
@@ -70,7 +70,7 @@ public class Main {
       } else if (args[0].equals("minicluster")) {
         runTMP = cl.loadClass("org.apache.accumulo.minicluster.MiniAccumuloRunner");
       } else if (args[0].equals("classpath")) {
-        vfsClassLoader.getMethod("printClassPath", new Class[] {}).invoke(vfsClassLoader, new Object[] {});
+        vfsClassLoader.getMethod("printClassPath", new Class<?>[] {}).invoke(vfsClassLoader, new Object[] {});
         return;
       } else if (args[0].equals("version")) {
         runTMP = cl.loadClass("org.apache.accumulo.core.Constants");


[15/16] accumulo git commit: ACCUMULO-4386 Fix trivial compiler warnings

Posted by ct...@apache.org.
ACCUMULO-4386 Fix trivial compiler warnings

Fix extra import and use generic method for emptyMap() instead of
EMPTY_MAP constant.


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

Branch: refs/heads/1.8
Commit: c587a6f5607b211fa6d7d542f3694cac814956c0
Parents: 4980eec
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:52:24 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:52:24 2016 -0400

----------------------------------------------------------------------
 .../minicluster/impl/MiniAccumuloClusterControl.java     |  2 +-
 .../org/apache/accumulo/master/TabletGroupWatcher.java   | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c587a6f5/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
index 688cb5d..9a433cf 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterControl.java
@@ -134,7 +134,7 @@ public class MiniAccumuloClusterControl implements ClusterControl {
 
   @Override
   public synchronized void start(ServerType server, String hostname) throws IOException {
-    start(server, hostname, Collections.EMPTY_MAP, Integer.MAX_VALUE);
+    start(server, hostname, Collections.<String,String> emptyMap(), Integer.MAX_VALUE);
   }
 
   public synchronized void start(ServerType server, String hostname, Map<String,String> configOverrides, int limit) throws IOException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c587a6f5/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
index 2cf7d9d..76fda21 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/TabletGroupWatcher.java
@@ -16,8 +16,8 @@
  */
 package org.apache.accumulo.master;
 
-import com.google.common.collect.ImmutableSortedSet;
 import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+import static java.lang.Math.min;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -29,6 +29,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.SortedMap;
+import java.util.SortedSet;
 import java.util.TreeMap;
 import java.util.TreeSet;
 import java.util.concurrent.TimeUnit;
@@ -43,6 +44,7 @@ import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.RowIterator;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.PartialKey;
@@ -67,6 +69,7 @@ import org.apache.accumulo.master.state.MergeStats;
 import org.apache.accumulo.master.state.TableCounts;
 import org.apache.accumulo.master.state.TableStats;
 import org.apache.accumulo.server.ServerConstants;
+import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.fs.FileRef;
 import org.apache.accumulo.server.fs.VolumeManager.FileType;
 import org.apache.accumulo.server.log.WalStateManager;
@@ -91,12 +94,8 @@ import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 
 import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableSortedSet;
 import com.google.common.collect.Iterators;
-import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.server.conf.TableConfiguration;
-import static java.lang.Math.min;
-import java.util.SortedSet;
-import static java.lang.Math.min;
 
 abstract class TabletGroupWatcher extends Daemon {
   // Constants used to make sure assignment logging isn't excessive in quantity or size


[13/16] accumulo git commit: Merge branch '1.7' into 1.8

Posted by ct...@apache.org.
Merge branch '1.7' into 1.8


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

Branch: refs/heads/1.8
Commit: 4980eec2fc902e0687728a421e5e38fcfadc0000
Parents: 227bfe8 9822860
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:46:58 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:46:58 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4980eec2/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------


[04/16] accumulo git commit: ACCUMULO-4385 Fix type safety warning

Posted by ct...@apache.org.
ACCUMULO-4385 Fix type safety warning

Suppress unavoidable type safety warning about overriding a generic
method.


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

Branch: refs/heads/master
Commit: 775f67cc50ad51c61ae044ab2764d28541ea91dc
Parents: a374616
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 21:51:05 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 21:51:05 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/775f67cc/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
index 7496202..3b12d07 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
@@ -458,10 +458,10 @@ public class CachableBlockFile {
     }
 
     @Override
+    @SuppressWarnings("unchecked")
     public <T> T getIndex(Class<T> clazz) {
       T bi = null;
       synchronized (cb) {
-        @SuppressWarnings("unchecked")
         SoftReference<T> softRef = (SoftReference<T>) cb.getIndex();
         if (softRef != null)
           bi = softRef.get();


[11/16] accumulo git commit: Merge branch '1.6' into 1.7

Posted by ct...@apache.org.
Merge branch '1.6' into 1.7


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

Branch: refs/heads/master
Commit: 98228607909747115fd1c16f1561f153e135913c
Parents: 7109640 dcc5dff
Author: Christopher Tubbs <ct...@apache.org>
Authored: Thu Jul 21 22:32:41 2016 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Thu Jul 21 22:32:41 2016 -0400

----------------------------------------------------------------------
 .../accumulo/core/file/blockfile/impl/CachableBlockFile.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/98228607/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
----------------------------------------------------------------------