Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 32CA6200BB6 for ; Fri, 4 Nov 2016 23:22:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3170E160B04; Fri, 4 Nov 2016 22:22:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0D760160B21 for ; Fri, 4 Nov 2016 23:22:47 +0100 (CET) Received: (qmail 69125 invoked by uid 500); 4 Nov 2016 22:22:47 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 66498 invoked by uid 99); 4 Nov 2016 22:22:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2016 22:22:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 067CFF1728; Fri, 4 Nov 2016 22:22:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ctubbsii@apache.org To: commits@accumulo.apache.org Date: Fri, 04 Nov 2016 22:23:14 -0000 Message-Id: In-Reply-To: <8db15481562846a5947e4d4b91c82ee1@git.apache.org> References: <8db15481562846a5947e4d4b91c82ee1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [32/48] accumulo git commit: ACCUMULO-4514 Remove unnecessary code archived-at: Fri, 04 Nov 2016 22:22:51 -0000 http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/InterruptibleScannersIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/InterruptibleScannersIT.java b/test/src/test/java/org/apache/accumulo/test/InterruptibleScannersIT.java index 35d4048..33d9841 100644 --- a/test/src/test/java/org/apache/accumulo/test/InterruptibleScannersIT.java +++ b/test/src/test/java/org/apache/accumulo/test/InterruptibleScannersIT.java @@ -67,7 +67,7 @@ public class InterruptibleScannersIT extends AccumuloClusterIT { // ensure the scan is running: not perfect, the metadata tables could be scanned, too. String tserver = conn.instanceOperations().getTabletServers().iterator().next(); do { - ArrayList scans = new ArrayList(conn.instanceOperations().getActiveScans(tserver)); + ArrayList scans = new ArrayList<>(conn.instanceOperations().getActiveScans(tserver)); Iterator iter = scans.iterator(); while (iter.hasNext()) { ActiveScan scan = iter.next(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java b/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java index a465955..4f06eb4 100644 --- a/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java +++ b/test/src/test/java/org/apache/accumulo/test/LargeSplitRowIT.java @@ -52,7 +52,7 @@ public class LargeSplitRowIT extends ConfigurableMacIT { public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { cfg.setNumTservers(1); - Map siteConfig = new HashMap(); + Map siteConfig = new HashMap<>(); siteConfig.put(Property.TSERV_MAJC_DELAY.getKey(), "50ms"); cfg.setSiteConfig(siteConfig); } @@ -77,7 +77,7 @@ public class LargeSplitRowIT extends ConfigurableMacIT { batchWriter.close(); // Create a split point that is too large to be an end row and fill it with all 'm' - SortedSet partitionKeys = new TreeSet(); + SortedSet partitionKeys = new TreeSet<>(); byte data[] = new byte[(int) (TableConfiguration.getMemoryInBytes(Property.TABLE_MAX_END_ROW_SIZE.getDefaultValue()) + 2)]; for (int i = 0; i < data.length; i++) { data[i] = 'm'; http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java b/test/src/test/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java index 4d931d8..507760e 100644 --- a/test/src/test/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java +++ b/test/src/test/java/org/apache/accumulo/test/MasterRepairsDualAssignmentIT.java @@ -76,14 +76,14 @@ public class MasterRepairsDualAssignmentIT extends ConfigurableMacIT { c.securityOperations().grantTablePermission("root", MetadataTable.NAME, TablePermission.WRITE); c.securityOperations().grantTablePermission("root", RootTable.NAME, TablePermission.WRITE); c.tableOperations().create(table); - SortedSet partitions = new TreeSet(); + SortedSet partitions = new TreeSet<>(); for (String part : "a b c d e f g h i j k l m n o p q r s t u v w x y z".split(" ")) { partitions.add(new Text(part)); } c.tableOperations().addSplits(table, partitions); // scan the metadata table and get the two table location states - Set states = new HashSet(); - Set oldLocations = new HashSet(); + Set states = new HashSet<>(); + Set oldLocations = new HashSet<>(); MetaDataStateStore store = new MetaDataStateStore(context, null); while (states.size() < 2) { UtilWaitThread.sleep(250); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/MetaSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/MetaSplitIT.java b/test/src/test/java/org/apache/accumulo/test/MetaSplitIT.java index 51b462e..fb212dc 100644 --- a/test/src/test/java/org/apache/accumulo/test/MetaSplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/MetaSplitIT.java @@ -59,7 +59,7 @@ public class MetaSplitIT extends AccumuloClusterIT { log.info("Existing splits on metadata table. Saving them, and applying single original split of '~'"); metadataSplits = splits; conn.tableOperations().merge(MetadataTable.NAME, null, null); - conn.tableOperations().addSplits(MetadataTable.NAME, new TreeSet(Collections.singleton(new Text("~")))); + conn.tableOperations().addSplits(MetadataTable.NAME, new TreeSet<>(Collections.singleton(new Text("~")))); } } } @@ -70,14 +70,14 @@ public class MetaSplitIT extends AccumuloClusterIT { log.info("Restoring split on metadata table"); Connector conn = getConnector(); conn.tableOperations().merge(MetadataTable.NAME, null, null); - conn.tableOperations().addSplits(MetadataTable.NAME, new TreeSet(metadataSplits)); + conn.tableOperations().addSplits(MetadataTable.NAME, new TreeSet<>(metadataSplits)); } } @Test(expected = AccumuloException.class) public void testRootTableSplit() throws Exception { TableOperations opts = getConnector().tableOperations(); - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); splits.add(new Text("5")); opts.addSplits(RootTable.NAME, splits); } @@ -89,7 +89,7 @@ public class MetaSplitIT extends AccumuloClusterIT { } private void addSplits(TableOperations opts, String... points) throws Exception { - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); for (String point : points) { splits.add(new Text(point)); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java b/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java index 5e99f6e..f9720f0 100644 --- a/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java +++ b/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterIT.java @@ -99,16 +99,16 @@ public class MultiTableBatchWriterIT extends AccumuloClusterIT { mtbw.close(); - Map,String> table1Expectations = new HashMap,String>(); + Map,String> table1Expectations = new HashMap<>(); table1Expectations.put(Maps.immutableEntry("bar", "col1"), "val1"); - Map,String> table2Expectations = new HashMap,String>(); + Map,String> table2Expectations = new HashMap<>(); table2Expectations.put(Maps.immutableEntry("foo", "col1"), "val1"); table2Expectations.put(Maps.immutableEntry("bar", "col1"), "val1"); Scanner s = connector.createScanner(table1, new Authorizations()); s.setRange(new Range()); - Map,String> actual = new HashMap,String>(); + Map,String> actual = new HashMap<>(); for (Entry entry : s) { actual.put(Maps.immutableEntry(entry.getKey().getRow().toString(), entry.getKey().getColumnFamily().toString()), entry.getValue().toString()); } @@ -117,7 +117,7 @@ public class MultiTableBatchWriterIT extends AccumuloClusterIT { s = connector.createScanner(table2, new Authorizations()); s.setRange(new Range()); - actual = new HashMap,String>(); + actual = new HashMap<>(); for (Entry entry : s) { actual.put(Maps.immutableEntry(entry.getKey().getRow().toString(), entry.getKey().getColumnFamily().toString()), entry.getValue().toString()); } @@ -164,7 +164,7 @@ public class MultiTableBatchWriterIT extends AccumuloClusterIT { mtbw.close(); - Map,String> expectations = new HashMap,String>(); + Map,String> expectations = new HashMap<>(); expectations.put(Maps.immutableEntry("foo", "col1"), "val1"); expectations.put(Maps.immutableEntry("foo", "col2"), "val2"); expectations.put(Maps.immutableEntry("bar", "col1"), "val1"); @@ -173,7 +173,7 @@ public class MultiTableBatchWriterIT extends AccumuloClusterIT { for (String table : Arrays.asList(newTable1, newTable2)) { Scanner s = connector.createScanner(table, new Authorizations()); s.setRange(new Range()); - Map,String> actual = new HashMap,String>(); + Map,String> actual = new HashMap<>(); for (Entry entry : s) { actual.put(Maps.immutableEntry(entry.getKey().getRow().toString(), entry.getKey().getColumnFamily().toString()), entry.getValue().toString()); } @@ -240,7 +240,7 @@ public class MultiTableBatchWriterIT extends AccumuloClusterIT { mtbw.close(); - Map,String> expectations = new HashMap,String>(); + Map,String> expectations = new HashMap<>(); expectations.put(Maps.immutableEntry("foo", "col1"), "val1"); expectations.put(Maps.immutableEntry("foo", "col2"), "val2"); expectations.put(Maps.immutableEntry("bar", "col1"), "val1"); @@ -249,7 +249,7 @@ public class MultiTableBatchWriterIT extends AccumuloClusterIT { for (String table : Arrays.asList(newTable1, newTable2)) { Scanner s = connector.createScanner(table, new Authorizations()); s.setRange(new Range()); - Map,String> actual = new HashMap,String>(); + Map,String> actual = new HashMap<>(); for (Entry entry : s) { actual.put(Maps.immutableEntry(entry.getKey().getRow().toString(), entry.getKey().getColumnFamily().toString()), entry.getValue().toString()); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java b/test/src/test/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java index 5a19de9..b4d23aa 100644 --- a/test/src/test/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/RewriteTabletDirectoriesIT.java @@ -87,7 +87,7 @@ public class RewriteTabletDirectoriesIT extends ConfigurableMacIT { // Write some data to a table and add some splits BatchWriter bw = c.createBatchWriter(tableName, null); - final SortedSet splits = new TreeSet(); + final SortedSet splits = new TreeSet<>(); for (String split : "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z".split(",")) { splits.add(new Text(split)); Mutation m = new Mutation(new Text(split)); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java index 6925e85..c0c90d6 100644 --- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java +++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java @@ -1340,7 +1340,7 @@ public class ShellServerIT extends SharedMiniClusterIT { }; thread.start(); - List scans = new ArrayList(); + List scans = new ArrayList<>(); // Try to find the active scan for about 15seconds for (int i = 0; i < 50 && scans.isEmpty(); i++) { String currentScans = ts.exec("listscans", true); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/SplitCancelsMajCIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/SplitCancelsMajCIT.java b/test/src/test/java/org/apache/accumulo/test/SplitCancelsMajCIT.java index 431c85d..bb6f57e 100644 --- a/test/src/test/java/org/apache/accumulo/test/SplitCancelsMajCIT.java +++ b/test/src/test/java/org/apache/accumulo/test/SplitCancelsMajCIT.java @@ -73,7 +73,7 @@ public class SplitCancelsMajCIT extends SharedMiniClusterIT { } bw.flush(); // start majc - final AtomicReference ex = new AtomicReference(); + final AtomicReference ex = new AtomicReference<>(); Thread thread = new Thread() { @Override public void run() { @@ -89,7 +89,7 @@ public class SplitCancelsMajCIT extends SharedMiniClusterIT { long now = System.currentTimeMillis(); UtilWaitThread.sleep(10 * 1000); // split the table, interrupts the compaction - SortedSet partitionKeys = new TreeSet(); + SortedSet partitionKeys = new TreeSet<>(); partitionKeys.add(new Text("10")); c.tableOperations().addSplits(tableName, partitionKeys); thread.join(); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java b/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java index c02daea..cfc556f 100644 --- a/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java +++ b/test/src/test/java/org/apache/accumulo/test/TableConfigurationUpdateIT.java @@ -68,7 +68,7 @@ public class TableConfigurationUpdateIT extends AccumuloClusterIT { long start = System.currentTimeMillis(); ExecutorService svc = Executors.newFixedThreadPool(numThreads); CountDownLatch countDown = new CountDownLatch(numThreads); - ArrayList> futures = new ArrayList>(numThreads); + ArrayList> futures = new ArrayList<>(numThreads); for (int i = 0; i < numThreads; i++) { futures.add(svc.submit(new TableConfRunner(randomMax, iterations, tableConf, countDown))); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java b/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java index 852fd608..54cb738 100644 --- a/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java +++ b/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java @@ -140,7 +140,7 @@ public class TableOperationsIT extends AccumuloClusterIT { connector.tableOperations().clone(tableName, newTable, false, null, null); // verify tables are exactly the same - Set tables = new HashSet(); + Set tables = new HashSet<>(); tables.add(tableName); tables.add(newTable); diskUsages = connector.tableOperations().getDiskUsage(tables); @@ -229,7 +229,7 @@ public class TableOperationsIT extends AccumuloClusterIT { } private Map propsToMap(Iterable> props) { - Map map = new HashMap(); + Map map = new HashMap<>(); for (Map.Entry prop : props) { map.put(prop.getKey(), prop.getValue()); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/TransportCachingIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/TransportCachingIT.java b/test/src/test/java/org/apache/accumulo/test/TransportCachingIT.java index 8bfd5fc..0b36787 100644 --- a/test/src/test/java/org/apache/accumulo/test/TransportCachingIT.java +++ b/test/src/test/java/org/apache/accumulo/test/TransportCachingIT.java @@ -60,7 +60,7 @@ public class TransportCachingIT extends AccumuloClusterIT { long rpcTimeout = DefaultConfiguration.getTimeInMillis(Property.GENERAL_RPC_TIMEOUT.getDefaultValue()); // create list of servers - ArrayList servers = new ArrayList(); + ArrayList servers = new ArrayList<>(); // add tservers ZooCache zc = new ZooCacheFactory().getZooCache(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/UserCompactionStrategyIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/UserCompactionStrategyIT.java b/test/src/test/java/org/apache/accumulo/test/UserCompactionStrategyIT.java index fd21cd3..844a4d2 100644 --- a/test/src/test/java/org/apache/accumulo/test/UserCompactionStrategyIT.java +++ b/test/src/test/java/org/apache/accumulo/test/UserCompactionStrategyIT.java @@ -133,7 +133,7 @@ public class UserCompactionStrategyIT extends AccumuloClusterIT { System.getProperty("user.dir") + "/src/test/resources/TestCompactionStrat.jar"); c.tableOperations().setProperty(tableName, Property.TABLE_CLASSPATH.getKey(), "context1"); - c.tableOperations().addSplits(tableName, new TreeSet(Arrays.asList(new Text("efg")))); + c.tableOperations().addSplits(tableName, new TreeSet<>(Arrays.asList(new Text("efg")))); writeFlush(c, tableName, "a"); writeFlush(c, tableName, "b"); @@ -276,7 +276,7 @@ public class UserCompactionStrategyIT extends AccumuloClusterIT { } private Set getRows(Connector c, String tableName) throws TableNotFoundException { - Set rows = new HashSet(); + Set rows = new HashSet<>(); Scanner scanner = c.createScanner(tableName, Authorizations.EMPTY); for (Entry entry : scanner) http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/VerifySerialRecoveryIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/VerifySerialRecoveryIT.java b/test/src/test/java/org/apache/accumulo/test/VerifySerialRecoveryIT.java index c318075..7def5fb 100644 --- a/test/src/test/java/org/apache/accumulo/test/VerifySerialRecoveryIT.java +++ b/test/src/test/java/org/apache/accumulo/test/VerifySerialRecoveryIT.java @@ -58,7 +58,7 @@ public class VerifySerialRecoveryIT extends ConfigurableMacIT { String tableName = getUniqueNames(1)[0]; Connector c = getConnector(); c.tableOperations().create(tableName); - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); for (int i = 0; i < 200; i++) { splits.add(new Text(AssignmentThreadsIT.randomHex(8))); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/VolumeChooserIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/VolumeChooserIT.java b/test/src/test/java/org/apache/accumulo/test/VolumeChooserIT.java index ce07373..7df64c8 100644 --- a/test/src/test/java/org/apache/accumulo/test/VolumeChooserIT.java +++ b/test/src/test/java/org/apache/accumulo/test/VolumeChooserIT.java @@ -80,7 +80,7 @@ public class VolumeChooserIT extends ConfigurableMacIT { namespace2 = "ns_" + getUniqueNames(2)[1]; // Set the general volume chooser to the PerTableVolumeChooser so that different choosers can be specified - Map siteConfig = new HashMap(); + Map siteConfig = new HashMap<>(); siteConfig.put(Property.GENERAL_VOLUME_CHOOSER.getKey(), PerTableVolumeChooser.class.getName()); cfg.setSiteConfig(siteConfig); @@ -108,7 +108,7 @@ public class VolumeChooserIT extends ConfigurableMacIT { public void addSplits(Connector connector, String tableName) throws TableNotFoundException, AccumuloException, AccumuloSecurityException { // Add 10 splits to the table - SortedSet partitions = new TreeSet(); + SortedSet partitions = new TreeSet<>(); for (String s : "b,e,g,j,l,o,q,t,v,y".split(",")) partitions.add(new Text(s)); connector.tableOperations().addSplits(tableName, partitions); @@ -135,7 +135,7 @@ public class VolumeChooserIT extends ConfigurableMacIT { public void verifyVolumes(Connector connector, String tableName, Range tableRange, String vol) throws TableNotFoundException { // Verify the new files are written to the Volumes specified - ArrayList volumes = new ArrayList(); + ArrayList volumes = new ArrayList<>(); for (String s : vol.split(",")) volumes.add(s); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/VolumeIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java index d4b3b61..e34447d 100644 --- a/test/src/test/java/org/apache/accumulo/test/VolumeIT.java +++ b/test/src/test/java/org/apache/accumulo/test/VolumeIT.java @@ -116,7 +116,7 @@ public class VolumeIT extends ConfigurableMacIT { Connector connector = getConnector(); String tableName = getUniqueNames(1)[0]; connector.tableOperations().create(tableName); - SortedSet partitions = new TreeSet(); + SortedSet partitions = new TreeSet<>(); // with some splits for (String s : "d,m,t".split(",")) partitions.add(new Text(s)); @@ -159,7 +159,7 @@ public class VolumeIT extends ConfigurableMacIT { private void verifyData(List expected, Scanner createScanner) { - List actual = new ArrayList(); + List actual = new ArrayList<>(); for (Entry entry : createScanner) { Key k = entry.getKey(); @@ -175,7 +175,7 @@ public class VolumeIT extends ConfigurableMacIT { @Test public void testRelativePaths() throws Exception { - List expected = new ArrayList(); + List expected = new ArrayList<>(); Connector connector = getConnector(); String tableName = getUniqueNames(1)[0]; @@ -183,7 +183,7 @@ public class VolumeIT extends ConfigurableMacIT { String tableId = connector.tableOperations().tableIdMap().get(tableName); - SortedSet partitions = new TreeSet(); + SortedSet partitions = new TreeSet<>(); // with some splits for (String s : "c,g,k,p,s,v".split(",")) partitions.add(new Text(s)); @@ -341,7 +341,7 @@ public class VolumeIT extends ConfigurableMacIT { cluster.start(); // Make sure we can still read the tables (tableNames[0] is very likely to have a file still on v1) - List expected = new ArrayList(); + List expected = new ArrayList<>(); for (int i = 0; i < 100; i++) { String row = String.format("%06d", i * 100 + 3); expected.add(row + ":cf1:cq1:1"); @@ -355,7 +355,7 @@ public class VolumeIT extends ConfigurableMacIT { private void writeData(String tableName, Connector conn) throws AccumuloException, AccumuloSecurityException, TableExistsException, TableNotFoundException, MutationsRejectedException { - TreeSet splits = new TreeSet(); + TreeSet splits = new TreeSet<>(); for (int i = 1; i < 100; i++) { splits.add(new Text(String.format("%06d", i * 100))); } @@ -379,7 +379,7 @@ public class VolumeIT extends ConfigurableMacIT { Connector conn = getConnector(); - List expected = new ArrayList(); + List expected = new ArrayList<>(); for (int i = 0; i < 100; i++) { String row = String.format("%06d", i * 100 + 3); expected.add(row + ":cf1:cq1:1"); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/WaitForBalanceIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/WaitForBalanceIT.java b/test/src/test/java/org/apache/accumulo/test/WaitForBalanceIT.java index 0df236a..11bde4b 100644 --- a/test/src/test/java/org/apache/accumulo/test/WaitForBalanceIT.java +++ b/test/src/test/java/org/apache/accumulo/test/WaitForBalanceIT.java @@ -56,7 +56,7 @@ public class WaitForBalanceIT extends ConfigurableMacIT { final String tableName = getUniqueNames(1)[0]; c.tableOperations().create(tableName); c.instanceOperations().waitForBalance(); - final SortedSet partitionKeys = new TreeSet(); + final SortedSet partitionKeys = new TreeSet<>(); for (int i = 0; i < 1000; i++) { partitionKeys.add(new Text("" + i)); } @@ -67,7 +67,7 @@ public class WaitForBalanceIT extends ConfigurableMacIT { } private boolean isBalanced() throws Exception { - final Map counts = new HashMap(); + final Map counts = new HashMap<>(); int offline = 0; final Connector c = getConnector(); for (String tableName : new String[] {MetadataTable.NAME, RootTable.NAME}) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java b/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java index 054f9a4..4a1fe93 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/AccumuloInputFormatIT.java @@ -104,7 +104,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterIT { AccumuloInputFormat.setConnectorInfo(job, getAdminPrincipal(), getAdminToken()); // split table - TreeSet splitsToAdd = new TreeSet(); + TreeSet splitsToAdd = new TreeSet<>(); for (int i = 0; i < 10000; i += 1000) splitsToAdd.add(new Text(String.format("%09d", i))); conn.tableOperations().addSplits(table, splitsToAdd); @@ -116,7 +116,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterIT { assertEquals(actualSplits.size() + 1, splits.size()); // No ranges set on the job so it'll start with -inf // set ranges and get splits - List ranges = new ArrayList(); + List ranges = new ArrayList<>(); for (Text text : actualSplits) ranges.add(new Range(text)); AccumuloInputFormat.setRanges(job, ranges); @@ -135,7 +135,7 @@ public class AccumuloInputFormatIT extends AccumuloClusterIT { assertEquals(actualSplits.size(), splits.size()); // auto adjust ranges - ranges = new ArrayList(); + ranges = new ArrayList<>(); for (int i = 0; i < 5; i++) // overlapping ranges ranges.add(new Range(String.format("%09d", i), String.format("%09d", i + 2))); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java index 5b32b94..e2cbacc 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/AddSplitIT.java @@ -55,7 +55,7 @@ public class AddSplitIT extends AccumuloClusterIT { insertData(tableName, 1l); - TreeSet splits = new TreeSet(); + TreeSet splits = new TreeSet<>(); splits.add(new Text(String.format("%09d", 333))); splits.add(new Text(String.format("%09d", 666))); @@ -65,7 +65,7 @@ public class AddSplitIT extends AccumuloClusterIT { Collection actualSplits = c.tableOperations().listSplits(tableName); - if (!splits.equals(new TreeSet(actualSplits))) { + if (!splits.equals(new TreeSet<>(actualSplits))) { throw new Exception(splits + " != " + actualSplits); } @@ -85,7 +85,7 @@ public class AddSplitIT extends AccumuloClusterIT { actualSplits = c.tableOperations().listSplits(tableName); - if (!splits.equals(new TreeSet(actualSplits))) { + if (!splits.equals(new TreeSet<>(actualSplits))) { throw new Exception(splits + " != " + actualSplits); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/BalanceAfterCommsFailureIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BalanceAfterCommsFailureIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BalanceAfterCommsFailureIT.java index 7b35db4..2116eda 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BalanceAfterCommsFailureIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BalanceAfterCommsFailureIT.java @@ -65,7 +65,7 @@ public class BalanceAfterCommsFailureIT extends ConfigurableMacIT { Connector c = this.getConnector(); c.tableOperations().create("test"); Collection tservers = getCluster().getProcesses().get(ServerType.TABLET_SERVER); - ArrayList tserverPids = new ArrayList(tservers.size()); + ArrayList tserverPids = new ArrayList<>(tservers.size()); for (ProcessReference tserver : tservers) { Process p = tserver.getProcess(); if (!p.getClass().getName().equals("java.lang.UNIXProcess")) { @@ -85,7 +85,7 @@ public class BalanceAfterCommsFailureIT extends ConfigurableMacIT { for (int pid : tserverPids) { assertEquals(0, Runtime.getRuntime().exec(new String[] {"kill", "-SIGCONT", Integer.toString(pid)}).waitFor()); } - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); for (String split : "a b c d e f g h i j k l m n o p q r s t u v w x y z".split(" ")) { splits.add(new Text(split)); } @@ -120,7 +120,7 @@ public class BalanceAfterCommsFailureIT extends ConfigurableMacIT { assertEquals("Unassigned tablets were not assigned within 30 seconds", 0, unassignedTablets); - List counts = new ArrayList(); + List counts = new ArrayList<>(); for (TabletServerStatus server : stats.tServerInfo) { int count = 0; for (TableInfo table : server.tableMap.values()) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java index b77ce1c..dfdd401 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BalanceInPresenceOfOfflineTableIT.java @@ -93,7 +93,7 @@ public class BalanceInPresenceOfOfflineTableIT extends AccumuloClusterIT { Assume.assumeTrue("Not enough tservers to run test", conn.instanceOperations().getTabletServers().size() >= 2); // set up splits - final SortedSet splits = new TreeSet(); + final SortedSet splits = new TreeSet<>(); for (int i = 0; i < NUM_SPLITS; i++) { splits.add(new Text(String.format("%08x", i * 1000))); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java index fb52c05..016038c 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BatchScanSplitIT.java @@ -87,8 +87,8 @@ public class BatchScanSplitIT extends AccumuloClusterIT { System.out.println("splits : " + splits); Random random = new Random(19011230); - HashMap expected = new HashMap(); - ArrayList ranges = new ArrayList(); + HashMap expected = new HashMap<>(); + ArrayList ranges = new ArrayList<>(); for (int i = 0; i < 100; i++) { int r = random.nextInt(numRows); Text row = new Text(String.format("%09x", r)); @@ -98,7 +98,7 @@ public class BatchScanSplitIT extends AccumuloClusterIT { // logger.setLevel(Level.TRACE); - HashMap found = new HashMap(); + HashMap found = new HashMap<>(); for (int i = 0; i < 20; i++) { BatchScanner bs = getConnector().createBatchScanner(tableName, Authorizations.EMPTY, 4); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java index 63bee16..fcee26e 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BatchWriterFlushIT.java @@ -181,12 +181,12 @@ public class BatchWriterFlushIT extends AccumuloClusterIT { String tableName = tableNames[0]; c.tableOperations().create(tableName); for (int x = 0; x < NUM_THREADS; x++) { - c.tableOperations().addSplits(tableName, new TreeSet(Collections.singleton(new Text(Integer.toString(x * NUM_TO_FLUSH))))); + c.tableOperations().addSplits(tableName, new TreeSet<>(Collections.singleton(new Text(Integer.toString(x * NUM_TO_FLUSH))))); } // Logger.getLogger(TabletServerBatchWriter.class).setLevel(Level.TRACE); - final List> allMuts = new LinkedList>(); - List data = new ArrayList(); + final List> allMuts = new LinkedList<>(); + List data = new ArrayList<>(); for (int i = 0; i < NUM_THREADS; i++) { final int thread = i; for (int j = 0; j < NUM_TO_FLUSH; j++) { @@ -199,7 +199,7 @@ public class BatchWriterFlushIT extends AccumuloClusterIT { Assert.assertEquals(NUM_THREADS * NUM_TO_FLUSH, data.size()); Collections.shuffle(data); for (int n = 0; n < (NUM_THREADS * NUM_TO_FLUSH); n += NUM_TO_FLUSH) { - Set muts = new HashSet(data.subList(n, n + NUM_TO_FLUSH)); + Set muts = new HashSet<>(data.subList(n, n + NUM_TO_FLUSH)); allMuts.add(muts); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/BinaryIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BinaryIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BinaryIT.java index e524fa8..b58702e 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BinaryIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BinaryIT.java @@ -47,7 +47,7 @@ public class BinaryIT extends AccumuloClusterIT { String tableName = getUniqueNames(1)[0]; Connector c = getConnector(); c.tableOperations().create(tableName); - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); splits.add(new Text("8")); splits.add(new Text("256")); c.tableOperations().addSplits(tableName, splits); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java index 67a556c..4f7a1bb 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BloomFilterIT.java @@ -169,8 +169,8 @@ public class BloomFilterIT extends AccumuloClusterIT { private long query(Connector c, String table, int depth, long start, long end, int num, int step) throws Exception { Random r = new Random(42); - HashSet expected = new HashSet(); - List ranges = new ArrayList(num); + HashSet expected = new HashSet<>(); + List ranges = new ArrayList<>(num); Text key = new Text(); Text row = new Text("row"), cq = new Text("cq"), cf = new Text("cf"); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java b/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java index 6683d73..f07997e 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkFileIT.java @@ -60,7 +60,7 @@ public class BulkFileIT extends AccumuloClusterIT { Connector c = getConnector(); String tableName = getUniqueNames(1)[0]; c.tableOperations().create(tableName); - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); for (String split : "0333 0666 0999 1333 1666".split(" ")) splits.add(new Text(split)); c.tableOperations().addSplits(tableName, splits); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java index a2d5971..635eec6 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ChaoticBalancerIT.java @@ -58,7 +58,7 @@ public class ChaoticBalancerIT extends AccumuloClusterIT { c.tableOperations().create(tableName); c.tableOperations().setProperty(tableName, Property.TABLE_LOAD_BALANCER.getKey(), ChaoticLoadBalancer.class.getName()); c.tableOperations().setProperty(tableName, Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K"); - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); for (int i = 0; i < 100; i++) { splits.add(new Text(String.format("%03d", i))); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java index 4fad30b..459c2fc 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/CloneTestIT.java @@ -84,10 +84,10 @@ public class CloneTestIT extends AccumuloClusterIT { BatchWriter bw = writeData(table1, c); - Map props = new HashMap(); + Map props = new HashMap<>(); props.put(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE.getKey(), "500K"); - Set exclude = new HashSet(); + Set exclude = new HashSet<>(); exclude.add(Property.TABLE_FILE_MAX.getKey()); c.tableOperations().clone(table1, table2, true, props, exclude); @@ -102,7 +102,7 @@ public class CloneTestIT extends AccumuloClusterIT { checkMetadata(table2, c); - HashMap tableProps = new HashMap(); + HashMap tableProps = new HashMap<>(); for (Entry prop : c.tableOperations().getProperties(table2)) { tableProps.put(prop.getKey(), prop.getValue()); } @@ -119,13 +119,13 @@ public class CloneTestIT extends AccumuloClusterIT { private void checkData(String table2, Connector c) throws TableNotFoundException { Scanner scanner = c.createScanner(table2, Authorizations.EMPTY); - HashMap expected = new HashMap(); + HashMap expected = new HashMap<>(); expected.put("001:x", "9"); expected.put("001:y", "7"); expected.put("008:x", "3"); expected.put("008:y", "4"); - HashMap actual = new HashMap(); + HashMap actual = new HashMap<>(); for (Entry entry : scanner) actual.put(entry.getKey().getRowData().toString() + ":" + entry.getKey().getColumnQualifierData().toString(), entry.getValue().toString()); @@ -230,10 +230,10 @@ public class CloneTestIT extends AccumuloClusterIT { BatchWriter bw = writeData(table1, c); - Map props = new HashMap(); + Map props = new HashMap<>(); props.put(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE.getKey(), "500K"); - Set exclude = new HashSet(); + Set exclude = new HashSet<>(); exclude.add(Property.TABLE_FILE_MAX.getKey()); c.tableOperations().clone(table1, table2, true, props, exclude); @@ -261,8 +261,8 @@ public class CloneTestIT extends AccumuloClusterIT { public void testCloneWithSplits() throws Exception { Connector conn = getConnector(); - List mutations = new ArrayList(); - TreeSet splits = new TreeSet(); + List mutations = new ArrayList<>(); + TreeSet splits = new TreeSet<>(); for (int i = 0; i < 10; i++) { splits.add(new Text(Integer.toString(i))); Mutation m = new Mutation(Integer.toString(i)); @@ -285,7 +285,7 @@ public class CloneTestIT extends AccumuloClusterIT { conn.tableOperations().deleteRows(tables[1], new Text("4"), new Text("8")); List rows = Arrays.asList("0", "1", "2", "3", "4", "9"); - List actualRows = new ArrayList(); + List actualRows = new ArrayList<>(); for (Entry entry : conn.createScanner(tables[1], Authorizations.EMPTY)) { actualRows.add(entry.getKey().getRow().toString()); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/CompactionIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CompactionIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CompactionIT.java index 818dbc4..cc0b087 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/CompactionIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/CompactionIT.java @@ -123,7 +123,7 @@ public class CompactionIT extends AccumuloClusterIT { final AtomicBoolean fail = new AtomicBoolean(false); final ClientConfiguration clientConf = cluster.getClientConfig(); for (int count = 0; count < 5; count++) { - List threads = new ArrayList(); + List threads = new ArrayList<>(); final int span = 500000 / 59; for (int i = 0; i < 500000; i += 500000 / 59) { final int finalI = i; http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java index a33322c..89213a4 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableCompactionIT.java @@ -107,7 +107,7 @@ public class ConfigurableCompactionIT extends ConfigurableMacIT { // EfgCompactionStrat will only compact a tablet w/ end row of 'efg'. No other tablets are compacted. c.tableOperations().setProperty(tableName, Property.TABLE_COMPACTION_STRATEGY.getKey(), "org.apache.accumulo.test.EfgCompactionStrat"); - c.tableOperations().addSplits(tableName, new TreeSet(Arrays.asList(new Text("efg")))); + c.tableOperations().addSplits(tableName, new TreeSet<>(Arrays.asList(new Text("efg")))); for (char ch = 'a'; ch < 'l'; ch++) writeFlush(c, tableName, ch + ""); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java index c694143..8c09c2b 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ConstraintIT.java @@ -291,7 +291,7 @@ public class ConstraintIT extends AccumuloClusterIT { throw new Exception("Unexpected constraints"); } - HashMap expected = new HashMap(); + HashMap expected = new HashMap<>(); expected.put("org.apache.accumulo.examples.simple.constraints.NumericValueConstraint", numericErrors); expected.put("org.apache.accumulo.examples.simple.constraints.AlphaNumKeyConstraint", 1); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java index 6ad3d4d..cffd848 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/CreateAndUseIT.java @@ -52,7 +52,7 @@ public class CreateAndUseIT extends AccumuloClusterIT { @BeforeClass public static void createData() throws Exception { - splits = new TreeSet(); + splits = new TreeSet<>(); for (int i = 1; i < 256; i++) { splits.add(new Text(String.format("%08x", i << 8))); @@ -110,7 +110,7 @@ public class CreateAndUseIT extends AccumuloClusterIT { @Test public void createTableAndBatchScan() throws Exception { - ArrayList ranges = new ArrayList(); + ArrayList ranges = new ArrayList<>(); for (int i = 1; i < 257; i++) { ranges.add(new Range(new Text(String.format("%08x", (i << 8) - 16)))); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java index 6e67f9b..71f068a 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsIT.java @@ -54,13 +54,13 @@ public class DeleteRowsIT extends AccumuloClusterIT { private static final int ROWS_PER_TABLET = 10; private static final String[] LETTERS = new String[] {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}; - static final SortedSet SPLITS = new TreeSet(); + static final SortedSet SPLITS = new TreeSet<>(); static { for (String alpha : LETTERS) { SPLITS.add(new Text(alpha)); } } - static final List ROWS = new ArrayList(Arrays.asList(LETTERS)); + static final List ROWS = new ArrayList<>(Arrays.asList(LETTERS)); static { // put data on first and last tablet ROWS.add("A"); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java index 1330779..4e0c6c4 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java @@ -52,8 +52,8 @@ public class DeleteRowsSplitIT extends AccumuloClusterIT { private static final Logger log = LoggerFactory.getLogger(DeleteRowsSplitIT.class); private static final String LETTERS = "abcdefghijklmnopqrstuvwxyz"; - static final SortedSet SPLITS = new TreeSet(); - static final List ROWS = new ArrayList(); + static final SortedSet SPLITS = new TreeSet<>(); + static final List ROWS = new ArrayList<>(); static { for (byte b : LETTERS.getBytes(UTF_8)) { SPLITS.add(new Text(new byte[] {b})); @@ -123,7 +123,7 @@ public class DeleteRowsSplitIT extends AccumuloClusterIT { } private void generateRandomRange(Text start, Text end) { - List bunch = new ArrayList(ROWS); + List bunch = new ArrayList<>(ROWS); Collections.shuffle(bunch); if (bunch.get(0).compareTo((bunch.get(1))) < 0) { start.set(bunch.get(0)); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java index e645c03..68ec9e0 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java @@ -50,13 +50,13 @@ public class DeleteTableDuringSplitIT extends AccumuloClusterIT { for (String tableName : tableNames) { getConnector().tableOperations().create(tableName); } - final SortedSet splits = new TreeSet(); + final SortedSet splits = new TreeSet<>(); for (byte i = 0; i < 100; i++) { splits.add(new Text(new byte[] {0, 0, i})); } - List> results = new ArrayList>(); - List tasks = new ArrayList(); + List> results = new ArrayList<>(); + List tasks = new ArrayList<>(); SimpleThreadPool es = new SimpleThreadPool(batchSize * 2, "concurrent-api-requests"); for (String tableName : tableNames) { final String finalName = tableName; http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java b/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java index 819347e..dcd1197 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/DurabilityIT.java @@ -163,7 +163,7 @@ public class DurabilityIT extends ConfigurableMacIT { } private static Map map(Iterable> entries) { - Map result = new HashMap(); + Map result = new HashMap<>(); for (Entry entry : entries) { result.put(entry.getKey(), entry.getValue()); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/FateStarvationIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/FateStarvationIT.java b/test/src/test/java/org/apache/accumulo/test/functional/FateStarvationIT.java index ebbef7c..7eb7b89 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/FateStarvationIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/FateStarvationIT.java @@ -64,7 +64,7 @@ public class FateStarvationIT extends AccumuloClusterIT { c.tableOperations().flush(tableName, null, null, true); - List splits = new ArrayList(TestIngest.getSplitPoints(0, 100000, 67)); + List splits = new ArrayList<>(TestIngest.getSplitPoints(0, 100000, 67)); Random rand = new Random(); for (int i = 0; i < 100; i++) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java b/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java index efdc1b0..c548f2f 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/FunctionalTestUtils.java @@ -71,7 +71,7 @@ public class FunctionalTestUtils { scanner.fetchColumnFamily(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME); MetadataSchema.TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(scanner); - HashMap tabletFileCounts = new HashMap(); + HashMap tabletFileCounts = new HashMap<>(); for (Entry entry : scanner) { @@ -183,7 +183,7 @@ public class FunctionalTestUtils { } public static SortedSet splits(String[] splits) { - SortedSet result = new TreeSet(); + SortedSet result = new TreeSet<>(); for (String split : splits) result.add(new Text(split)); return result; http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java b/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java index ee790be..36746c1 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java @@ -337,7 +337,7 @@ public class GarbageCollectorIT extends ConfigurableMacIT { Scanner scanner = getConnector().createScanner("accumulo.metadata", Authorizations.EMPTY); scanner.setRange(Range.prefix(new Text(tableId))); scanner.fetchColumnFamily(new Text("log")); - List walsList = new ArrayList(); + List walsList = new ArrayList<>(); for (Entry e : scanner) { walsList.add(e.getValue().toString()); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java b/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java index a29defd..9132373 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java @@ -121,7 +121,7 @@ public class HalfDeadTServerIT extends ConfigurableMacIT { String classpath = System.getProperty("java.class.path"); classpath = new File(cluster.getConfig().getDir(), "conf") + File.pathSeparator + classpath; String className = TabletServer.class.getName(); - ArrayList argList = new ArrayList(); + ArrayList argList = new ArrayList<>(); argList.addAll(Arrays.asList(javaBin, "-cp", classpath)); argList.addAll(Arrays.asList(Main.class.getName(), className)); ProcessBuilder builder = new ProcessBuilder(argList); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java b/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java index 027f1e6..06dcfe0 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/LargeRowIT.java @@ -107,7 +107,7 @@ public class LargeRowIT extends AccumuloClusterIT { Random r = new Random(); byte rowData[] = new byte[ROW_SIZE]; r.setSeed(SEED + 1); - TreeSet splitPoints = new TreeSet(); + TreeSet splitPoints = new TreeSet<>(); for (int i = 0; i < NUM_PRE_SPLITS; i++) { r.nextBytes(rowData); TestIngest.toPrintableChars(rowData); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java b/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java index a20291b..627c5b6 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/LogicalTimeIT.java @@ -74,7 +74,7 @@ public class LogicalTimeIT extends AccumuloClusterIT { throws Exception { log.info("table " + table); conn.tableOperations().create(table, new NewTableConfiguration().setTimeType(TimeType.LOGICAL)); - TreeSet splitSet = new TreeSet(); + TreeSet splitSet = new TreeSet<>(); for (String split : splits) { splitSet.add(new Text(split)); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/MaxOpenIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MaxOpenIT.java b/test/src/test/java/org/apache/accumulo/test/functional/MaxOpenIT.java index 2b05947..990da50 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/MaxOpenIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/MaxOpenIT.java @@ -118,7 +118,7 @@ public class MaxOpenIT extends AccumuloClusterIT { FunctionalTestUtils.checkRFiles(c, tableName, NUM_TABLETS, NUM_TABLETS, i + 1, i + 1); } - List ranges = new ArrayList(NUM_TO_INGEST); + List ranges = new ArrayList<>(NUM_TO_INGEST); for (int i = 0; i < NUM_TO_INGEST; i++) { ranges.add(new Range(TestIngest.generateRow(i, 0))); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/MergeIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MergeIT.java b/test/src/test/java/org/apache/accumulo/test/functional/MergeIT.java index 998feaf..14d9101 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/MergeIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/MergeIT.java @@ -48,7 +48,7 @@ public class MergeIT extends AccumuloClusterIT { } SortedSet splits(String[] points) { - SortedSet result = new TreeSet(); + SortedSet result = new TreeSet<>(); for (String point : points) result.add(new Text(point)); return result; @@ -146,14 +146,14 @@ public class MergeIT extends AccumuloClusterIT { System.out.println("Running merge test " + table + " " + Arrays.asList(splits) + " " + start + " " + end); conn.tableOperations().create(table, new NewTableConfiguration().setTimeType(TimeType.LOGICAL)); - TreeSet splitSet = new TreeSet(); + TreeSet splitSet = new TreeSet<>(); for (String split : splits) { splitSet.add(new Text(split)); } conn.tableOperations().addSplits(table, splitSet); BatchWriter bw = conn.createBatchWriter(table, null); - HashSet expected = new HashSet(); + HashSet expected = new HashSet<>(); for (String row : inserts) { Mutation m = new Mutation(row); m.put("cf", "cq", row); @@ -167,7 +167,7 @@ public class MergeIT extends AccumuloClusterIT { Scanner scanner = conn.createScanner(table, Authorizations.EMPTY); - HashSet observed = new HashSet(); + HashSet observed = new HashSet<>(); for (Entry entry : scanner) { String row = entry.getKey().getRowData().toString(); if (!observed.add(row)) { @@ -179,8 +179,8 @@ public class MergeIT extends AccumuloClusterIT { throw new Exception("data inconsistency " + table + " " + observed + " != " + expected); } - HashSet currentSplits = new HashSet(conn.tableOperations().listSplits(table)); - HashSet ess = new HashSet(); + HashSet currentSplits = new HashSet<>(conn.tableOperations().listSplits(table)); + HashSet ess = new HashSet<>(); for (String es : expectedSplits) { ess.add(new Text(es)); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java b/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java index 09e6ecc..e3dea5a 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/MetadataIT.java @@ -70,14 +70,14 @@ public class MetadataIT extends AccumuloClusterIT { rootScanner.setRange(MetadataSchema.TabletsSection.getRange()); rootScanner.fetchColumnFamily(MetadataSchema.TabletsSection.DataFileColumnFamily.NAME); - Set files1 = new HashSet(); + Set files1 = new HashSet<>(); for (Entry entry : rootScanner) files1.add(entry.getKey().getColumnQualifier().toString()); c.tableOperations().create(tableNames[1]); c.tableOperations().flush(MetadataTable.NAME, null, null, true); - Set files2 = new HashSet(); + Set files2 = new HashSet<>(); for (Entry entry : rootScanner) files2.add(entry.getKey().getColumnQualifier().toString()); @@ -87,7 +87,7 @@ public class MetadataIT extends AccumuloClusterIT { c.tableOperations().compact(MetadataTable.NAME, null, null, false, true); - Set files3 = new HashSet(); + Set files3 = new HashSet<>(); for (Entry entry : rootScanner) files3.add(entry.getKey().getColumnQualifier().toString()); @@ -99,7 +99,7 @@ public class MetadataIT extends AccumuloClusterIT { public void mergeMeta() throws Exception { Connector c = getConnector(); String[] names = getUniqueNames(5); - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); for (String id : "1 2 3 4 5".split(" ")) { splits.add(new Text(id)); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java b/test/src/test/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java index e6c9a0e..ddd5609 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java @@ -49,7 +49,7 @@ public class MetadataMaxFilesIT extends ConfigurableMacIT { @Override public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite) { - Map siteConfig = new HashMap(); + Map siteConfig = new HashMap<>(); siteConfig.put(Property.TSERV_MAJC_DELAY.getKey(), "1"); siteConfig.put(Property.TSERV_SCAN_MAX_OPENFILES.getKey(), "10"); cfg.setSiteConfig(siteConfig); @@ -64,7 +64,7 @@ public class MetadataMaxFilesIT extends ConfigurableMacIT { @Test public void test() throws Exception { Connector c = getConnector(); - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); for (int i = 0; i < 1000; i++) { splits.add(new Text(String.format("%03d", i))); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java b/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java index a690a68..ea3ba66 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java @@ -316,7 +316,7 @@ public class NativeMapIT { NativeMap nm = new NativeMap(); - TreeMap tm = new TreeMap(); + TreeMap tm = new TreeMap<>(); tm.put(new Key(new Text("fo")), new Value(new byte[] {'0'})); tm.put(new Key(new Text("foo")), new Value(new byte[] {'1'})); @@ -454,14 +454,14 @@ public class NativeMapIT { // generate random data Random r = new Random(75); - ArrayList> testData = new ArrayList>(); + ArrayList> testData = new ArrayList<>(); for (int i = 0; i < 100000; i++) { Key k = new Key(rlrf(r, 97), rlrf(r, 13), rlrf(r, 31), rlrf(r, 11), (r.nextLong() & 0x7fffffffffffffffl), false, false); Value v = new Value(rlrf(r, 511)); - testData.add(new Pair(k, v)); + testData.add(new Pair<>(k, v)); } // insert unsorted data http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java b/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java index 30ac069..533e722 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java @@ -129,7 +129,7 @@ public class PermissionsIT extends AccumuloClusterIT { } static Map map(Iterable> i) { - Map result = new HashMap(); + Map result = new HashMap<>(); for (Entry e : i) { result.put(e.getKey(), e.getValue()); } @@ -612,8 +612,8 @@ public class PermissionsIT extends AccumuloClusterIT { // test for bulk import permission would go here break; case ALTER_TABLE: - Map> groups = new HashMap>(); - groups.put("tgroup", new HashSet(Arrays.asList(new Text("t1"), new Text("t2")))); + Map> groups = new HashMap<>(); + groups.put("tgroup", new HashSet<>(Arrays.asList(new Text("t1"), new Text("t2")))); try { test_user_conn.tableOperations().setLocalityGroups(tableName, groups); throw new IllegalStateException("User should not be able to set locality groups"); @@ -671,8 +671,8 @@ public class PermissionsIT extends AccumuloClusterIT { // test for bulk import permission would go here break; case ALTER_TABLE: - Map> groups = new HashMap>(); - groups.put("tgroup", new HashSet(Arrays.asList(new Text("t1"), new Text("t2")))); + Map> groups = new HashMap<>(); + groups.put("tgroup", new HashSet<>(Arrays.asList(new Text("t1"), new Text("t2")))); break; case DROP_TABLE: test_user_conn.tableOperations().delete(tableName); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java index a6b7305..ecf7b1c 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java @@ -397,7 +397,7 @@ public class ReadWriteIT extends AccumuloClusterIT { final Connector connector = getConnector(); final String tableName = getUniqueNames(1)[0]; connector.tableOperations().create(tableName); - Map> groups = new TreeMap>(); + Map> groups = new TreeMap<>(); groups.put("g1", Collections.singleton(t("colf"))); connector.tableOperations().setLocalityGroups(tableName, groups); ingest(connector, getCluster().getClientConfig(), getAdminPrincipal(), 2000, 1, 50, 0, tableName); @@ -471,11 +471,11 @@ public class ReadWriteIT extends AccumuloClusterIT { } private Map> getGroups(String cfg) { - Map> groups = new TreeMap>(); + Map> groups = new TreeMap<>(); if (cfg != null) { for (String group : cfg.split(";")) { String[] parts = group.split(":"); - Set cols = new HashSet(); + Set cols = new HashSet<>(); for (String col : parts[1].split(",")) { cols.add(t(col)); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/RowDeleteIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/RowDeleteIT.java b/test/src/test/java/org/apache/accumulo/test/functional/RowDeleteIT.java index 06039af..285c201 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/RowDeleteIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/RowDeleteIT.java @@ -62,7 +62,7 @@ public class RowDeleteIT extends AccumuloClusterIT { Connector c = getConnector(); String tableName = getUniqueNames(1)[0]; c.tableOperations().create(tableName); - Map> groups = new HashMap>(); + Map> groups = new HashMap<>(); groups.put("lg1", Collections.singleton(new Text("foo"))); groups.put("dg", Collections. emptySet()); c.tableOperations().setLocalityGroups(tableName, groups); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java index b54d41a..9fa4d1a 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ScanIdIT.java @@ -87,7 +87,7 @@ public class ScanIdIT extends AccumuloClusterIT { private static final AtomicBoolean testInProgress = new AtomicBoolean(true); - private static final Map resultsByWorker = new ConcurrentHashMap(); + private static final Map resultsByWorker = new ConcurrentHashMap<>(); @Override protected int defaultTimeoutSeconds() { @@ -141,7 +141,7 @@ public class ScanIdIT extends AccumuloClusterIT { } // all scanner have reported at least 1 result, so check for unique scan ids. - Set scanIds = new HashSet(); + Set scanIds = new HashSet<>(); List tservers = conn.instanceOperations().getTabletServers(); @@ -309,7 +309,7 @@ public class ScanIdIT extends AccumuloClusterIT { */ private SortedSet createSplits() { - SortedSet splits = new TreeSet(); + SortedSet splits = new TreeSet<>(); for (int split = 0; split < 10; split++) { splits.add(new Text(Integer.toString(split))); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java index 74c4fd4..ae152b5 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ScanIteratorIT.java @@ -135,7 +135,7 @@ public class ScanIteratorIT extends AccumuloClusterIT { setupIter(bscanner); verify(bscanner, 1, 999); - ArrayList ranges = new ArrayList(); + ArrayList ranges = new ArrayList<>(); ranges.add(new Range(new Text(String.format("%06d", 1)))); ranges.add(new Range(new Text(String.format("%06d", 6)), new Text(String.format("%06d", 16)))); ranges.add(new Range(new Text(String.format("%06d", 20)))); @@ -144,8 +144,8 @@ public class ScanIteratorIT extends AccumuloClusterIT { ranges.add(new Range(new Text(String.format("%06d", 501)), new Text(String.format("%06d", 504)))); ranges.add(new Range(new Text(String.format("%06d", 998)), new Text(String.format("%06d", 1000)))); - HashSet got = new HashSet(); - HashSet expected = new HashSet(); + HashSet got = new HashSet<>(); + HashSet expected = new HashSet<>(); for (int i : new int[] {1, 7, 9, 11, 13, 15, 23, 57, 59, 61, 501, 503, 999}) { expected.add(i); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java index 3ce1eb1..ededda8 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ScanRangeIT.java @@ -54,7 +54,7 @@ public class ScanRangeIT extends AccumuloClusterIT { c.tableOperations().create(table1); String table2 = tableNames[1]; c.tableOperations().create(table2); - TreeSet splitRows = new TreeSet(); + TreeSet splitRows = new TreeSet<>(); int splits = 3; for (int i = (ROW_LIMIT / splits); i < ROW_LIMIT; i += (ROW_LIMIT / splits)) splitRows.add(createRow(i)); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java index 05f304b..ca59041 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/SessionBlockVerifyIT.java @@ -110,7 +110,7 @@ public class SessionBlockVerifyIT extends ScanSessionTimeOutIT { final Iterator> slow = scanner.iterator(); - final List> callables = new ArrayList>(); + final List> callables = new ArrayList<>(); final CountDownLatch latch = new CountDownLatch(10); for (int i = 0; i < 10; i++) { Future callable = service.submit(new Callable() { http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java index ac38f19..9c9652d 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/ShutdownIT.java @@ -76,7 +76,7 @@ public class ShutdownIT extends ConfigurableMacIT { for (int i = 0; i < 10; i++) { c.tableOperations().create("table" + i); } - final AtomicReference ref = new AtomicReference(); + final AtomicReference ref = new AtomicReference<>(); Thread async = new Thread() { @Override public void run() { http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java index 1ad363b..5796445 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java @@ -98,7 +98,7 @@ public class SimpleBalancerFairnessIT extends ConfigurableMacIT { assertEquals("Unassigned tablets were not assigned within 30 seconds", 0, unassignedTablets); // Compute online tablets per tserver - List counts = new ArrayList(); + List counts = new ArrayList<>(); for (TabletServerStatus server : stats.tServerInfo) { int count = 0; for (TableInfo table : server.tableMap.values()) { http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java b/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java index 0b0e330..5663751 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/SplitRecoveryIT.java @@ -139,7 +139,7 @@ public class SplitRecoveryIT extends ConfigurableMacIT { String tdir = ServerConstants.getTablesDirs()[0] + "/" + extent.getTableId().toString() + "/dir_" + i; MetadataTableUtil.addTablet(extent, tdir, context, TabletTime.LOGICAL_TIME_ID, zl); - SortedMap mapFiles = new TreeMap(); + SortedMap mapFiles = new TreeMap<>(); mapFiles.put(new FileRef(tdir + "/" + RFile.EXTENSION + "_000_000"), new DataFileValue(1000017 + i, 10000 + i)); if (i == extentToSplit) { @@ -161,9 +161,9 @@ public class SplitRecoveryIT extends ConfigurableMacIT { private void splitPartiallyAndRecover(AccumuloServerContext context, KeyExtent extent, KeyExtent high, KeyExtent low, double splitRatio, SortedMap mapFiles, Text midRow, String location, int steps, ZooLock zl) throws Exception { - SortedMap lowDatafileSizes = new TreeMap(); - SortedMap highDatafileSizes = new TreeMap(); - List highDatafilesToRemove = new ArrayList(); + SortedMap lowDatafileSizes = new TreeMap<>(); + SortedMap highDatafileSizes = new TreeMap<>(); + List highDatafilesToRemove = new ArrayList<>(); MetadataTableUtil.splitDatafiles(extent.getTableId(), midRow, splitRatio, new HashMap(), mapFiles, lowDatafileSizes, highDatafileSizes, highDatafilesToRemove); @@ -209,13 +209,13 @@ public class SplitRecoveryIT extends ConfigurableMacIT { Scanner scanner = new ScannerImpl(context, MetadataTable.ID, Authorizations.EMPTY); scanner.setRange(extent.toMetadataRange()); - HashSet expectedColumns = new HashSet(); + HashSet expectedColumns = new HashSet<>(); expectedColumns.add(TabletsSection.ServerColumnFamily.DIRECTORY_COLUMN); expectedColumns.add(TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN); expectedColumns.add(TabletsSection.ServerColumnFamily.TIME_COLUMN); expectedColumns.add(TabletsSection.ServerColumnFamily.LOCK_COLUMN); - HashSet expectedColumnFamilies = new HashSet(); + HashSet expectedColumnFamilies = new HashSet<>(); expectedColumnFamilies.add(DataFileColumnFamily.NAME); expectedColumnFamilies.add(TabletsSection.FutureLocationColumnFamily.NAME); expectedColumnFamilies.add(TabletsSection.CurrentLocationColumnFamily.NAME); http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java b/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java index 8aa6cf2..fc59e66 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/TabletIT.java @@ -68,7 +68,7 @@ public class TabletIT extends AccumuloClusterIT { Connector connector = getConnector(); if (!readOnly) { - TreeSet keys = new TreeSet(); + TreeSet keys = new TreeSet<>(); for (int i = N / 100; i < N; i += N / 100) { keys.add(new Text(String.format("%05d", i))); } http://git-wip-us.apache.org/repos/asf/accumulo/blob/95f42858/test/src/test/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java ---------------------------------------------------------------------- diff --git a/test/src/test/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java b/test/src/test/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java index 02eb419..0c275bc 100644 --- a/test/src/test/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java +++ b/test/src/test/java/org/apache/accumulo/test/functional/TabletStateChangeIteratorIT.java @@ -155,7 +155,7 @@ public class TabletStateChangeIteratorIT extends SharedMiniClusterIT { @Override public Set onlineTabletServers() { - HashSet tservers = new HashSet(); + HashSet tservers = new HashSet<>(); for (String tserver : getConnector().instanceOperations().getTabletServers()) { try { String zPath = ZooUtil.getRoot(getConnector().getInstance()) + Constants.ZTSERVERS + "/" + tserver; @@ -170,7 +170,7 @@ public class TabletStateChangeIteratorIT extends SharedMiniClusterIT { @Override public Set onlineTables() { - HashSet onlineTables = new HashSet(getConnector().tableOperations().tableIdMap().values()); + HashSet onlineTables = new HashSet<>(getConnector().tableOperations().tableIdMap().values()); return Sets.filter(onlineTables, new Predicate() { @Override public boolean apply(String tableId) {