accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [31/48] accumulo git commit: ACCUMULO-4514 Remove unnecessary code
Date Fri, 04 Nov 2016 22:23:13 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java b/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java
index 2c4783a..2db0848 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/VisibilityIT.java
@@ -94,7 +94,7 @@ public class VisibilityIT extends AccumuloClusterIT {
   }
 
   private static SortedSet<String> nss(String... labels) {
-    TreeSet<String> ts = new TreeSet<String>();
+    TreeSet<String> ts = new TreeSet<>();
 
     for (String s : labels) {
       ts.add(s);
@@ -153,7 +153,7 @@ public class VisibilityIT extends AccumuloClusterIT {
     bw.addMutation(m1);
     bw.close();
 
-    Map<Set<String>,Set<String>> expected = new HashMap<Set<String>,Set<String>>();
+    Map<Set<String>,Set<String>> expected = new HashMap<>();
 
     expected.put(nss("A", "L"), nss("v5"));
     expected.put(nss("A", "M"), nss("v5"));
@@ -184,10 +184,10 @@ public class VisibilityIT extends AccumuloClusterIT {
 
     all.add(prefix);
 
-    TreeSet<String> ss = new TreeSet<String>(suffix);
+    TreeSet<String> ss = new TreeSet<>(suffix);
 
     for (String s : suffix) {
-      TreeSet<String> ps = new TreeSet<String>(prefix);
+      TreeSet<String> ps = new TreeSet<>(prefix);
       ps.add(s);
       ss.remove(s);
 
@@ -196,7 +196,7 @@ public class VisibilityIT extends AccumuloClusterIT {
   }
 
   private void queryData(Connector c, String tableName) throws Exception {
-    Map<Set<String>,Set<String>> expected = new HashMap<Set<String>,Set<String>>();
+    Map<Set<String>,Set<String>> expected = new HashMap<>();
     expected.put(nss(), nss("v1"));
     expected.put(nss("A"), nss("v2"));
     expected.put(nss("A", "L"), nss("v5"));
@@ -227,14 +227,14 @@ public class VisibilityIT extends AccumuloClusterIT {
 
     c.securityOperations().changeUserAuthorizations(getAdminPrincipal(), new Authorizations(nbas(userAuths)));
 
-    ArrayList<Set<String>> combos = new ArrayList<Set<String>>();
+    ArrayList<Set<String>> combos = new ArrayList<>();
     uniqueCombos(combos, nss(), allAuths);
 
     for (Set<String> set1 : combos) {
-      Set<String> e = new TreeSet<String>();
+      Set<String> e = new TreeSet<>();
       for (Set<String> set2 : combos) {
 
-        set2 = new HashSet<String>(set2);
+        set2 = new HashSet<>(set2);
         set2.retainAll(userAuths);
 
         if (set1.containsAll(set2) && expected.containsKey(set2)) {
@@ -300,7 +300,7 @@ public class VisibilityIT extends AccumuloClusterIT {
   }
 
   private void verify(Iterator<Entry<Key,Value>> iter, String... expected) throws
Exception {
-    HashSet<String> valuesSeen = new HashSet<String>();
+    HashSet<String> valuesSeen = new HashSet<>();
 
     while (iter.hasNext()) {
       Entry<Key,Value> entry = iter.next();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/WriteLotsIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/WriteLotsIT.java b/test/src/test/java/org/apache/accumulo/test/functional/WriteLotsIT.java
index d8dba87..86fe872 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/WriteLotsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/WriteLotsIT.java
@@ -42,8 +42,8 @@ public class WriteLotsIT extends AccumuloClusterIT {
     final Connector c = getConnector();
     final String tableName = getUniqueNames(1)[0];
     c.tableOperations().create(tableName);
-    final AtomicReference<Exception> ref = new AtomicReference<Exception>();
-    List<Thread> threads = new ArrayList<Thread>();
+    final AtomicReference<Exception> ref = new AtomicReference<>();
+    List<Thread> threads = new ArrayList<>();
     final ClientConfiguration clientConfig = getCluster().getClientConfig();
     for (int i = 0; i < 10; i++) {
       final int index = i;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java
index 1f424c4..6aa042d 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ZooCacheIT.java
@@ -48,8 +48,8 @@ public class ZooCacheIT extends ConfigurableMacIT {
   @Test
   public void test() throws Exception {
     assertEquals(0, exec(CacheTestClean.class, pathName, testDir.getAbsolutePath()).waitFor());
-    final AtomicReference<Exception> ref = new AtomicReference<Exception>();
-    List<Thread> threads = new ArrayList<Thread>();
+    final AtomicReference<Exception> ref = new AtomicReference<>();
+    List<Thread> threads = new ArrayList<>();
     for (int i = 0; i < 3; i++) {
       Thread reader = new Thread() {
         @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
index fefb9a6..c36c078 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
@@ -44,7 +44,7 @@ public class ZookeeperRestartIT extends ConfigurableMacIT {
 
   @Override
   public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) {
-    Map<String,String> siteConfig = new HashMap<String,String>();
+    Map<String,String> siteConfig = new HashMap<>();
     siteConfig.put(Property.INSTANCE_ZK_TIMEOUT.getKey(), "15s");
     cfg.setSiteConfig(siteConfig);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java b/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java
index 82c89be..3562e51 100644
--- a/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/iterator/RegExTest.java
@@ -50,7 +50,7 @@ public class RegExTest {
     conn.tableOperations().create("ret");
     BatchWriter bw = conn.createBatchWriter("ret", new BatchWriterConfig());
 
-    ArrayList<Character> chars = new ArrayList<Character>();
+    ArrayList<Character> chars = new ArrayList<>();
     for (char c = 'a'; c <= 'z'; c++)
       chars.add(c);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java b/test/src/test/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java
index 609b77f..e7be1c7 100644
--- a/test/src/test/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java
@@ -91,7 +91,7 @@ public class ProxyDurabilityIT extends ConfigurableMacIT {
     while (!proxyServer.isServing())
       UtilWaitThread.sleep(100);
     Client client = new TestProxyClient("localhost", proxyPort, protocol).proxy();
-    Map<String,String> properties = new TreeMap<String,String>();
+    Map<String,String> properties = new TreeMap<>();
     properties.put("password", ROOT_PASSWORD);
     ByteBuffer login = client.login("root", properties);
 
@@ -102,7 +102,7 @@ public class ProxyDurabilityIT extends ConfigurableMacIT {
     WriterOptions options = new WriterOptions();
     options.setDurability(Durability.NONE);
     String writer = client.createWriter(login, tableName, options);
-    Map<ByteBuffer,List<ColumnUpdate>> cells = new TreeMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> cells = new TreeMap<>();
     ColumnUpdate column = new ColumnUpdate(bytes("cf"), bytes("cq"));
     column.setValue("value".getBytes());
     cells.put(bytes("row"), Collections.singletonList(column));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java b/test/src/test/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
index a419e43..cac578e 100644
--- a/test/src/test/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
+++ b/test/src/test/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
@@ -425,7 +425,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
   @Test(expected = AccumuloSecurityException.class, timeout = 5000)
   public void setLocalityGroupsLoginFailure() throws Exception {
-    Map<String,Set<String>> groups = new HashMap<String,Set<String>>();
+    Map<String,Set<String>> groups = new HashMap<>();
     groups.put("group1", Collections.singleton("cf1"));
     groups.put("group2", Collections.singleton("cf2"));
     client.setLocalityGroups(badLogin, table, groups);
@@ -497,7 +497,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
   @Test(expected = AccumuloSecurityException.class, timeout = 5000)
   public void changeUserAuthorizationsLoginFailure() throws Exception {
-    HashSet<ByteBuffer> auths = new HashSet<ByteBuffer>(Arrays.asList(s2bb("A"),
s2bb("B")));
+    HashSet<ByteBuffer> auths = new HashSet<>(Arrays.asList(s2bb("A"), s2bb("B")));
     client.changeUserAuthorizations(badLogin, "stooge", auths);
   }
 
@@ -1020,7 +1020,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     t.start();
 
     // look for the scan many times
-    List<ActiveScan> scans = new ArrayList<ActiveScan>();
+    List<ActiveScan> scans = new ArrayList<>();
     for (int i = 0; i < 100 && scans.isEmpty(); i++) {
       for (String tserver : client.getTabletServers(creds)) {
         List<ActiveScan> scansForServer = client.getActiveScans(creds, tserver);
@@ -1107,7 +1107,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertNotNull(desiredTableId);
 
     // try to catch it in the act
-    List<ActiveCompaction> compactions = new ArrayList<ActiveCompaction>();
+    List<ActiveCompaction> compactions = new ArrayList<>();
     for (int i = 0; i < 100 && compactions.isEmpty(); i++) {
       // Iterate over the tservers
       for (String tserver : client.getTabletServers(creds)) {
@@ -1175,12 +1175,12 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT
{
     client.createLocalUser(creds, user, password);
     // change auths
     Set<String> users = client.listLocalUsers(creds);
-    Set<String> expectedUsers = new HashSet<String>(Arrays.asList(clientPrincipal,
user));
+    Set<String> expectedUsers = new HashSet<>(Arrays.asList(clientPrincipal,
user));
     assertTrue("Did not find all expected users: " + expectedUsers, users.containsAll(expectedUsers));
-    HashSet<ByteBuffer> auths = new HashSet<ByteBuffer>(Arrays.asList(s2bb("A"),
s2bb("B")));
+    HashSet<ByteBuffer> auths = new HashSet<>(Arrays.asList(s2bb("A"), s2bb("B")));
     client.changeUserAuthorizations(creds, user, auths);
     List<ByteBuffer> update = client.getUserAuthorizations(creds, user);
-    assertEquals(auths, new HashSet<ByteBuffer>(update));
+    assertEquals(auths, new HashSet<>(update));
 
     // change password
     if (!isKerberosEnabled()) {
@@ -1540,7 +1540,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
   @Test
   public void tableMergesAndSplits() throws Exception {
     // add some splits
-    client.addSplits(creds, table, new HashSet<ByteBuffer>(Arrays.asList(s2bb("a"),
s2bb("m"), s2bb("z"))));
+    client.addSplits(creds, table, new HashSet<>(Arrays.asList(s2bb("a"), s2bb("m"),
s2bb("z"))));
     List<ByteBuffer> splits = client.listSplits(creds, table, 1);
     assertEquals(Arrays.asList(s2bb("m")), splits);
 
@@ -1561,7 +1561,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
   @Test
   public void iteratorFunctionality() throws Exception {
     // iterators
-    HashMap<String,String> options = new HashMap<String,String>();
+    HashMap<String,String> options = new HashMap<>();
     options.put("type", "STRING");
     options.put("columns", "cf");
     IteratorSetting setting = new IteratorSetting(10, table, SummingCombiner.class.getName(),
options);
@@ -1649,7 +1649,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
     // Clone the table
     client.cloneTable(creds, table, TABLE_TEST2, true, null, null);
-    Set<String> tablesToScan = new HashSet<String>();
+    Set<String> tablesToScan = new HashSet<>();
     tablesToScan.add(table);
     tablesToScan.add(TABLE_TEST2);
     tablesToScan.add("foo");
@@ -1727,7 +1727,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
   @Test
   public void localityGroups() throws Exception {
-    Map<String,Set<String>> groups = new HashMap<String,Set<String>>();
+    Map<String,Set<String>> groups = new HashMap<>();
     groups.put("group1", Collections.singleton("cf1"));
     groups.put("group2", Collections.singleton("cf2"));
     client.setLocalityGroups(creds, table, groups);
@@ -1854,7 +1854,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
     String cwid = client.createConditionalWriter(creds, table, new ConditionalWriterOptions());
 
-    Map<ByteBuffer,ConditionalUpdates> updates = new HashMap<ByteBuffer,ConditionalUpdates>();
+    Map<ByteBuffer,ConditionalUpdates> updates = new HashMap<>();
 
     updates.put(
         s2bb("00345"),
@@ -1951,7 +1951,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
     // following test w/ iterator setup should succeed
     Condition iterCond = newCondition("data", "count", "3");
-    Map<String,String> props = new HashMap<String,String>();
+    Map<String,String> props = new HashMap<>();
     props.put("type", "STRING");
     props.put("columns", "data:count");
     IteratorSetting is = new IteratorSetting(1, "sumc", SummingCombiner.class.getName(),
props);
@@ -2237,7 +2237,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
   }
 
   private Map<String,String> s2pp(String cf) {
-    Map<String,String> toRet = new TreeMap<String,String>();
+    Map<String,String> toRet = new TreeMap<>();
     toRet.put("password", cf);
     return toRet;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyReadWrite.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyReadWrite.java b/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyReadWrite.java
index 5eb9500..4e56b20 100644
--- a/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyReadWrite.java
+++ b/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyReadWrite.java
@@ -105,7 +105,7 @@ public class TestProxyReadWrite {
   @Test
   public void readWriteBatchOneShotWithRange() throws Exception {
     int maxInserts = 100000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$05d";
     for (int i = 0; i < maxInserts; i++) {
       addMutation(mutations, String.format(format, i), "cf" + i, "cq" + i, Util.randString(10));
@@ -141,7 +141,7 @@ public class TestProxyReadWrite {
   @Test
   public void readWriteBatchOneShotWithColumnFamilyOnly() throws Exception {
     int maxInserts = 100000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$05d";
     for (int i = 0; i < maxInserts; i++) {
 
@@ -180,7 +180,7 @@ public class TestProxyReadWrite {
   @Test
   public void readWriteBatchOneShotWithFullColumn() throws Exception {
     int maxInserts = 100000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$05d";
     for (int i = 0; i < maxInserts; i++) {
 
@@ -219,7 +219,7 @@ public class TestProxyReadWrite {
   @Test
   public void readWriteBatchOneShotWithFilterIterator() throws Exception {
     int maxInserts = 10000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$05d";
     for (int i = 0; i < maxInserts; i++) {
       addMutation(mutations, String.format(format, i), "cf" + i, "cq" + i, Util.randString(10));
@@ -259,7 +259,7 @@ public class TestProxyReadWrite {
   @Test
   public void readWriteOneShotWithRange() throws Exception {
     int maxInserts = 100000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$05d";
     for (int i = 0; i < maxInserts; i++) {
       addMutation(mutations, String.format(format, i), "cf" + i, "cq" + i, Util.randString(10));
@@ -294,7 +294,7 @@ public class TestProxyReadWrite {
   @Test
   public void readWriteOneShotWithFilterIterator() throws Exception {
     int maxInserts = 10000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$05d";
     for (int i = 0; i < maxInserts; i++) {
       addMutation(mutations, String.format(format, i), "cf" + i, "cq" + i, Util.randString(10));
@@ -337,7 +337,7 @@ public class TestProxyReadWrite {
   // This test takes kind of a long time. Enable it if you think you may have memory issues.
   public void manyWritesAndReads() throws Exception {
     int maxInserts = 1000000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$06d";
     String writer = tpc.proxy().createWriter(userpass, testtable, null);
     for (int i = 0; i < maxInserts; i++) {
@@ -377,7 +377,7 @@ public class TestProxyReadWrite {
   @Test
   public void asynchReadWrite() throws Exception {
     int maxInserts = 10000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$05d";
     String writer = tpc.proxy().createWriter(userpass, testtable, null);
     for (int i = 0; i < maxInserts; i++) {
@@ -422,12 +422,12 @@ public class TestProxyReadWrite {
   @Test
   public void testVisibility() throws Exception {
 
-    Set<ByteBuffer> auths = new HashSet<ByteBuffer>();
+    Set<ByteBuffer> auths = new HashSet<>();
     auths.add(ByteBuffer.wrap("even".getBytes()));
     tpc.proxy().changeUserAuthorizations(userpass, "root", auths);
 
     int maxInserts = 10000;
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     String format = "%1$05d";
     String writer = tpc.proxy().createWriter(userpass, testtable, null);
     for (int i = 0; i < maxInserts; i++) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/proxy/TestProxySecurityOperations.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/proxy/TestProxySecurityOperations.java
b/test/src/test/java/org/apache/accumulo/test/proxy/TestProxySecurityOperations.java
index ec3ddf3..64e8aa1 100644
--- a/test/src/test/java/org/apache/accumulo/test/proxy/TestProxySecurityOperations.java
+++ b/test/src/test/java/org/apache/accumulo/test/proxy/TestProxySecurityOperations.java
@@ -127,7 +127,7 @@ public class TestProxySecurityOperations {
 
   @Test
   public void auths() throws TException {
-    HashSet<ByteBuffer> newauths = new HashSet<ByteBuffer>();
+    HashSet<ByteBuffer> newauths = new HashSet<>();
     newauths.add(ByteBuffer.wrap("BBR".getBytes()));
     newauths.add(ByteBuffer.wrap("Barney".getBytes()));
     tpc.proxy().changeUserAuthorizations(userpass, testuser, newauths);
@@ -140,7 +140,7 @@ public class TestProxySecurityOperations {
   }
 
   private Map<String,String> bb2pp(ByteBuffer cf) {
-    Map<String,String> toRet = new TreeMap<String,String>();
+    Map<String,String> toRet = new TreeMap<>();
     toRet.put("password", ByteBufferUtil.toString(cf));
     return toRet;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyTableOperations.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyTableOperations.java
b/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyTableOperations.java
index 7da2f63..f19e2f5 100644
--- a/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyTableOperations.java
+++ b/test/src/test/java/org/apache/accumulo/test/proxy/TestProxyTableOperations.java
@@ -105,7 +105,7 @@ public class TestProxyTableOperations {
   // This test does not yet function because the backing Mock instance does not yet support
merging
   @Test
   public void merge() throws TException {
-    Set<ByteBuffer> splits = new HashSet<ByteBuffer>();
+    Set<ByteBuffer> splits = new HashSet<>();
     splits.add(ByteBuffer.wrap("a".getBytes()));
     splits.add(ByteBuffer.wrap("c".getBytes()));
     splits.add(ByteBuffer.wrap("z".getBytes()));
@@ -125,7 +125,7 @@ public class TestProxyTableOperations {
 
   @Test
   public void splits() throws TException {
-    Set<ByteBuffer> splits = new HashSet<ByteBuffer>();
+    Set<ByteBuffer> splits = new HashSet<>();
     splits.add(ByteBuffer.wrap("a".getBytes()));
     splits.add(ByteBuffer.wrap("b".getBytes()));
     splits.add(ByteBuffer.wrap("z".getBytes()));
@@ -150,11 +150,11 @@ public class TestProxyTableOperations {
 
   @Test
   public void localityGroups() throws TException {
-    Map<String,Set<String>> groups = new HashMap<String,Set<String>>();
-    Set<String> group1 = new HashSet<String>();
+    Map<String,Set<String>> groups = new HashMap<>();
+    Set<String> group1 = new HashSet<>();
     group1.add("cf1");
     groups.put("group1", group1);
-    Set<String> group2 = new HashSet<String>();
+    Set<String> group2 = new HashSet<>();
     group2.add("cf2");
     group2.add("cf3");
     groups.put("group2", group2);
@@ -188,7 +188,7 @@ public class TestProxyTableOperations {
 
   @Test
   public void tableOperationsRowMethods() throws TException {
-    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<ByteBuffer,List<ColumnUpdate>>();
+    Map<ByteBuffer,List<ColumnUpdate>> mutations = new HashMap<>();
     for (int i = 0; i < 10; i++) {
       addMutation(mutations, "" + i, "cf", "cq", "");
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
index cbcd447..166c1b3 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/CyclicReplicationIT.java
@@ -114,7 +114,7 @@ public class CyclicReplicationIT {
     // Set the same SSL information from the primary when present
     Map<String,String> primarySiteConfig = primaryCfg.getSiteConfig();
     if ("true".equals(primarySiteConfig.get(Property.INSTANCE_RPC_SSL_ENABLED.getKey())))
{
-      Map<String,String> peerSiteConfig = new HashMap<String,String>();
+      Map<String,String> peerSiteConfig = new HashMap<>();
       peerSiteConfig.put(Property.INSTANCE_RPC_SSL_ENABLED.getKey(), "true");
       String keystorePath = primarySiteConfig.get(Property.RPC_SSL_KEYSTORE_PATH.getKey());
       Assert.assertNotNull("Keystore Path was null", keystorePath);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
index 75f61f1..671f9ae 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/GarbageCollectorCommunicatesWithTServersIT.java
@@ -106,7 +106,7 @@ public class GarbageCollectorCommunicatesWithTServersIT extends ConfigurableMacI
     s.setRange(r);
     s.fetchColumnFamily(MetadataSchema.TabletsSection.LogColumnFamily.NAME);
 
-    Set<String> wals = new HashSet<String>();
+    Set<String> wals = new HashSet<>();
     for (Entry<Key,Value> entry : s) {
       log.debug("Reading WALs: {}={}", entry.getKey().toStringNoTruncate(), entry.getValue());
       // hostname:port/uri://path/to/wal
@@ -135,7 +135,7 @@ public class GarbageCollectorCommunicatesWithTServersIT extends ConfigurableMacI
     s.setRange(r);
     s.fetchColumnFamily(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME);
 
-    Set<String> rfiles = new HashSet<String>();
+    Set<String> rfiles = new HashSet<>();
     for (Entry<Key,Value> entry : s) {
       log.debug("Reading RFiles: {}={}", entry.getKey().toStringNoTruncate(), entry.getValue());
       // uri://path/to/wal
@@ -162,7 +162,7 @@ public class GarbageCollectorCommunicatesWithTServersIT extends ConfigurableMacI
     s.setRange(r);
     s.fetchColumn(MetadataSchema.ReplicationSection.COLF, new Text(tableId));
 
-    Map<String,Status> fileToStatus = new HashMap<String,Status>();
+    Map<String,Status> fileToStatus = new HashMap<>();
     for (Entry<Key,Value> entry : s) {
       Text file = new Text();
       MetadataSchema.ReplicationSection.getFile(entry.getKey(), file);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
index 35bc0fe..058f291 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
@@ -116,7 +116,7 @@ public class MultiInstanceReplicationIT extends ConfigurableMacIT {
     // Set the same SSL information from the primary when present
     Map<String,String> primarySiteConfig = primaryCfg.getSiteConfig();
     if ("true".equals(primarySiteConfig.get(Property.INSTANCE_RPC_SSL_ENABLED.getKey())))
{
-      Map<String,String> peerSiteConfig = new HashMap<String,String>();
+      Map<String,String> peerSiteConfig = new HashMap<>();
       peerSiteConfig.put(Property.INSTANCE_RPC_SSL_ENABLED.getKey(), "true");
       String keystorePath = primarySiteConfig.get(Property.RPC_SSL_KEYSTORE_PATH.getKey());
       Assert.assertNotNull("Keystore Path was null", keystorePath);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
index a15e6b6..dc720e4 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/StatusCombinerMacIT.java
@@ -79,7 +79,7 @@ public class StatusCombinerMacIT extends SharedMiniClusterIT {
     Assert.assertTrue(scopes.contains(IteratorScope.majc));
 
     Iterable<Entry<String,String>> propIter = tops.getProperties(MetadataTable.NAME);
-    HashMap<String,String> properties = new HashMap<String,String>();
+    HashMap<String,String> properties = new HashMap<>();
     for (Entry<String,String> entry : propIter) {
       properties.put(entry.getKey(), entry.getValue());
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
b/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
index 090ac83..650cfc4 100644
--- a/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
@@ -122,7 +122,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacIT
{
     // Set the same SSL information from the primary when present
     Map<String,String> primarySiteConfig = primaryCfg.getSiteConfig();
     if ("true".equals(primarySiteConfig.get(Property.INSTANCE_RPC_SSL_ENABLED.getKey())))
{
-      Map<String,String> peerSiteConfig = new HashMap<String,String>();
+      Map<String,String> peerSiteConfig = new HashMap<>();
       peerSiteConfig.put(Property.INSTANCE_RPC_SSL_ENABLED.getKey(), "true");
       String keystorePath = primarySiteConfig.get(Property.RPC_SSL_KEYSTORE_PATH.getKey());
       Assert.assertNotNull("Keystore Path was null", keystorePath);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/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 2345ea7..95042d2 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
@@ -135,7 +135,7 @@ public class CertUtils {
 
           @Override
           public Iterator<Entry<String,String>> iterator() {
-            TreeMap<String,String> map = new TreeMap<String,String>();
+            TreeMap<String,String> map = new TreeMap<>();
             for (Entry<String,String> props : DefaultConfiguration.getInstance())
               map.put(props.getKey(), props.getValue());
             for (Entry<String,String> props : xml)


Mime
View raw message