hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [09/22] hbase git commit: HBASE-17532 Replaced explicit type with diamond operator
Date Tue, 07 Mar 2017 19:23:22 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java
index 5e2a70f..7740e66 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/MockRegionServerServices.java
@@ -63,9 +63,9 @@ import com.google.protobuf.Service;
  */
 public class MockRegionServerServices implements RegionServerServices {
   protected static final Log LOG = LogFactory.getLog(MockRegionServerServices.class);
-  private final Map<String, Region> regions = new HashMap<String, Region>();
+  private final Map<String, Region> regions = new HashMap<>();
   private final ConcurrentSkipListMap<byte[], Boolean> rit =
-    new ConcurrentSkipListMap<byte[], Boolean>(Bytes.BYTES_COMPARATOR);
+    new ConcurrentSkipListMap<>(Bytes.BYTES_COMPARATOR);
   private HFileSystem hfs = null;
   private final Configuration conf;
   private ZooKeeperWatcher zkw = null;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java
index 7e251e7..cf07b42 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java
@@ -39,7 +39,7 @@ public abstract class MultithreadedTestUtil {
     private Throwable err = null;
     private boolean stopped = false;
     private int threadDoneCount = 0;
-    private Set<TestThread> testThreads = new HashSet<TestThread>();
+    private Set<TestThread> testThreads = new HashSet<>();
 
     public TestContext(Configuration configuration) {
       this.conf = configuration;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
index b7e4a71..f8345b1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
@@ -146,7 +146,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
   private static final BigDecimal BYTES_PER_MB = BigDecimal.valueOf(1024 * 1024);
   private static final TestOptions DEFAULT_OPTS = new TestOptions();
 
-  private static Map<String, CmdDescriptor> COMMANDS = new TreeMap<String, CmdDescriptor>();
+  private static Map<String, CmdDescriptor> COMMANDS = new TreeMap<>();
   private static final Path PERF_EVAL_DIR = new Path("performance_evaluation");
 
   static {
@@ -536,7 +536,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
     Path inputFile = new Path(inputDir, JOB_INPUT_FILENAME);
     PrintStream out = new PrintStream(fs.create(inputFile));
     // Make input random.
-    Map<Integer, String> m = new TreeMap<Integer, String>();
+    Map<Integer, String> m = new TreeMap<>();
     Hash h = MurmurHash.getInstance();
     int perClientRows = (opts.totalRows / opts.numClientThreads);
     try {
@@ -1311,7 +1311,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
     protected Pair<byte[], byte[]> generateStartAndStopRows(int maxRange) {
       int start = this.rand.nextInt(Integer.MAX_VALUE) % opts.totalRows;
       int stop = start + maxRange;
-      return new Pair<byte[],byte[]>(format(start), format(stop));
+      return new Pair<>(format(start), format(stop));
     }
 
     @Override
@@ -1375,7 +1375,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
       consistency = options.replicas == DEFAULT_OPTS.replicas ? null : Consistency.TIMELINE;
       if (opts.multiGet > 0) {
         LOG.info("MultiGet enabled. Sending GETs in batches of " + opts.multiGet + ".");
-        this.gets = new ArrayList<Get>(opts.multiGet);
+        this.gets = new ArrayList<>(opts.multiGet);
       }
     }
 
@@ -2207,7 +2207,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
     }
 
     try {
-      LinkedList<String> argv = new LinkedList<String>();
+      LinkedList<String> argv = new LinkedList<>();
       argv.addAll(Arrays.asList(args));
       TestOptions opts = parseOpts(argv);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
index 3809a13..e2350e8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluationCommons.java
@@ -67,7 +67,7 @@ public class PerformanceEvaluationCommons {
   public static void concurrentReads(final Runnable r) {
     final int count = 1;
     long now = System.currentTimeMillis();
-    List<Thread> threads = new ArrayList<Thread>(count);
+    List<Thread> threads = new ArrayList<>(count);
     for (int i = 0; i < count; i++) {
       threads.add(new Thread(r, "concurrentRead-" + i));
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/TestCheckTestClasses.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestCheckTestClasses.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestCheckTestClasses.java
index 06b98f7..23ca57f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestCheckTestClasses.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestCheckTestClasses.java
@@ -39,7 +39,7 @@ public class TestCheckTestClasses {
    */
   @Test
   public void checkClasses() throws Exception {
-    List<Class<?>> badClasses = new java.util.ArrayList<Class<?>>();
+    List<Class<?>> badClasses = new java.util.ArrayList<>();
     ClassTestFinder classFinder = new ClassTestFinder();
     for (Class<?> c : classFinder.findClasses(false)) {
       if (ClassTestFinder.getCategoryAnnotations(c).length == 0) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/TestGlobalMemStoreSize.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestGlobalMemStoreSize.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestGlobalMemStoreSize.java
index 5cc7ed9..8d19c1b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestGlobalMemStoreSize.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestGlobalMemStoreSize.java
@@ -158,7 +158,7 @@ public class TestGlobalMemStoreSize {
   }
 
   private List<HRegionServer> getOnlineRegionServers() {
-    List<HRegionServer> list = new ArrayList<HRegionServer>();
+    List<HRegionServer> list = new ArrayList<>();
     for (JVMClusterUtil.RegionServerThread rst :
           cluster.getRegionServerThreads()) {
       if (rst.getRegionServer().isOnline()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHDFSBlocksDistribution.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHDFSBlocksDistribution.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHDFSBlocksDistribution.java
index 2329fc2..06cfdcf 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHDFSBlocksDistribution.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHDFSBlocksDistribution.java
@@ -50,7 +50,7 @@ public class TestHDFSBlocksDistribution {
 
   public class MockHDFSBlocksDistribution extends HDFSBlocksDistribution {
     public Map<String,HostAndWeight> getHostAndWeights() {
-      HashMap<String, HostAndWeight> map = new HashMap<String, HostAndWeight>();
+      HashMap<String, HostAndWeight> map = new HashMap<>();
       map.put("test", new HostAndWeight(null, 100));
       return map;
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java
index 870ebb3..9915f99 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestMetaTableAccessorNoCluster.java
@@ -87,7 +87,7 @@ public class TestMetaTableAccessorNoCluster {
   public void testGetHRegionInfo() throws IOException {
     assertNull(MetaTableAccessor.getHRegionInfo(new Result()));
 
-    List<Cell> kvs = new ArrayList<Cell>();
+    List<Cell> kvs = new ArrayList<>();
     Result r = Result.create(kvs);
     assertNull(MetaTableAccessor.getHRegionInfo(r));
 
@@ -141,7 +141,7 @@ public class TestMetaTableAccessorNoCluster {
       // show.  We will know if they happened or not because we will ask
       // mockito at the end of this test to verify that scan was indeed
       // called the wanted number of times.
-      List<Cell> kvs = new ArrayList<Cell>();
+      List<Cell> kvs = new ArrayList<>();
       final byte [] rowToVerify = Bytes.toBytes("rowToVerify");
       kvs.add(new KeyValue(rowToVerify,
         HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
@@ -152,7 +152,7 @@ public class TestMetaTableAccessorNoCluster {
       kvs.add(new KeyValue(rowToVerify,
         HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER,
         Bytes.toBytes(sn.getStartcode())));
-      final List<CellScannable> cellScannables = new ArrayList<CellScannable>(1);
+      final List<CellScannable> cellScannables = new ArrayList<>(1);
       cellScannables.add(Result.create(kvs));
       final ScanResponse.Builder builder = ScanResponse.newBuilder();
       for (CellScannable result : cellScannables) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
index 57248b6..f3ea814 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestPartialResultsFromClientSide.java
@@ -274,7 +274,7 @@ public class TestPartialResultsFromClientSide {
     int iterationCount = 0;
 
     while (oneShotResult != null && oneShotResult.rawCells() != null) {
-      List<Cell> aggregatePartialCells = new ArrayList<Cell>();
+      List<Cell> aggregatePartialCells = new ArrayList<>();
       do {
         partialResult = partialScanner.next();
         assertTrue("Partial Result is null. iteration: " + iterationCount, partialResult != null);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
index 03c5524..283d79d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
@@ -231,7 +231,7 @@ public class TestRegionRebalancing {
   }
 
   private List<HRegionServer> getOnlineRegionServers() {
-    List<HRegionServer> list = new ArrayList<HRegionServer>();
+    List<HRegionServer> list = new ArrayList<>();
     for (JVMClusterUtil.RegionServerThread rst :
         UTIL.getHBaseCluster().getRegionServerThreads()) {
       if (rst.getRegionServer().isOnline()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java
index 953756e..ad63cc8 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerSideScanMetricsFromClientSide.java
@@ -280,7 +280,7 @@ public class TestServerSideScanMetricsFromClientSide {
     filter = new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS[0], CompareOp.NOT_EQUAL, VALUE);
     testRowsFilteredMetric(baseScan, filter, ROWS.length);
 
-    List<Filter> filters = new ArrayList<Filter>();
+    List<Filter> filters = new ArrayList<>();
     filters.add(new RowFilter(CompareOp.EQUAL, new BinaryComparator(ROWS[0])));
     filters.add(new RowFilter(CompareOp.EQUAL, new BinaryComparator(ROWS[3])));
     int numberOfMatchingRowFilters = filters.size();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java
index d4f7cdd..c4abd89 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java
@@ -222,7 +222,7 @@ public class TestStochasticBalancerJmxMetrics extends BalancerTestBase {
       target = new ObjectName("Hadoop", pairs);
       MBeanInfo beanInfo = mb.getMBeanInfo(target);
 
-      Set<String> existingAttrs = new HashSet<String>();
+      Set<String> existingAttrs = new HashSet<>();
       for (MBeanAttributeInfo attrInfo : beanInfo.getAttributes()) {
         existingAttrs.add(attrInfo.getName());
       }
@@ -255,7 +255,7 @@ public class TestStochasticBalancerJmxMetrics extends BalancerTestBase {
    * Given the tables and functions, return metrics names that should exist in JMX
    */
   private Set<String> getExpectedJmxMetrics(String[] tableNames, String[] functionNames) {
-    Set<String> ret = new HashSet<String>();
+    Set<String> ret = new HashSet<>();
 
     for (String tableName : tableNames) {
       ret.add(StochasticLoadBalancer.composeAttributeName(tableName, "Overall"));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
index 284251f..1acb842 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
@@ -193,7 +193,7 @@ public class TestHFileArchiving {
     FileStatus[] regionFiles = FSUtils.listStatus(fs, regionDir, null);
     Assert.assertNotNull("No files in the region directory", regionFiles);
     if (LOG.isDebugEnabled()) {
-      List<Path> files = new ArrayList<Path>();
+      List<Path> files = new ArrayList<>();
       for (FileStatus file : regionFiles) {
         files.add(file.getPath());
       }
@@ -269,7 +269,7 @@ public class TestHFileArchiving {
   private void assertArchiveFiles(FileSystem fs, List<String> storeFiles, long timeout) throws IOException {
     long end = System.currentTimeMillis() + timeout;
     Path archiveDir = HFileArchiveUtil.getArchivePath(UTIL.getConfiguration());
-    List<String> archivedFiles = new ArrayList<String>();
+    List<String> archivedFiles = new ArrayList<>();
 
     // We have to ensure that the DeleteTableHandler is finished. HBaseAdmin.deleteXXX() can return before all files
     // are archived. We should fix HBASE-5487 and fix synchronous operations from admin.
@@ -434,7 +434,7 @@ public class TestHFileArchiving {
         return true;
       }
     });
-    return recurseOnFiles(fs, files, new ArrayList<String>());
+    return recurseOnFiles(fs, files, new ArrayList<>());
   }
 
   /** Recursively lookup all the file names under the file[] array **/

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java
index 64139ee..fc56ebd 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java
@@ -80,7 +80,7 @@ public class TestZooKeeperTableArchiveClient {
   private static final byte[] TEST_FAM = Bytes.toBytes("fam");
   private static final byte[] TABLE_NAME = Bytes.toBytes(STRING_TABLE_NAME);
   private static ZKTableArchiveClient archivingClient;
-  private final List<Path> toCleanup = new ArrayList<Path>();
+  private final List<Path> toCleanup = new ArrayList<>();
   private static ClusterConnection CONNECTION;
   private static RegionServerServices rss;
 
@@ -178,7 +178,7 @@ public class TestZooKeeperTableArchiveClient {
     // create the region
     HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAM);
     HRegion region = UTIL.createTestRegion(STRING_TABLE_NAME, hcd);
-    List<Region> regions = new ArrayList<Region>();
+    List<Region> regions = new ArrayList<>();
     regions.add(region);
     when(rss.getOnlineRegions()).thenReturn(regions);
     final CompactedHFilesDischarger compactionCleaner =
@@ -231,7 +231,7 @@ public class TestZooKeeperTableArchiveClient {
     // create the region
     HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAM);
     HRegion region = UTIL.createTestRegion(STRING_TABLE_NAME, hcd);
-    List<Region> regions = new ArrayList<Region>();
+    List<Region> regions = new ArrayList<>();
     regions.add(region);
     when(rss.getOnlineRegions()).thenReturn(regions);
     final CompactedHFilesDischarger compactionCleaner =
@@ -241,7 +241,7 @@ public class TestZooKeeperTableArchiveClient {
     // create the another table that we don't archive
     hcd = new HColumnDescriptor(TEST_FAM);
     HRegion otherRegion = UTIL.createTestRegion(otherTable, hcd);
-    regions = new ArrayList<Region>();
+    regions = new ArrayList<>();
     regions.add(otherRegion);
     when(rss.getOnlineRegions()).thenReturn(regions);
     final CompactedHFilesDischarger compactionCleaner1 = new CompactedHFilesDischarger(100, stop,
@@ -388,7 +388,7 @@ public class TestZooKeeperTableArchiveClient {
       return null;
     }
 
-    List<Path> allFiles = new ArrayList<Path>();
+    List<Path> allFiles = new ArrayList<>();
     for (FileStatus file : files) {
       if (file.isDirectory()) {
         List<Path> subFiles = getAllFiles(fs, file.getPath());

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java
index f694210..7b69db4 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java
@@ -1002,7 +1002,7 @@ public class TestAdmin1 {
       // insert rows into column families. The number of rows that have values
       // in a specific column family is decided by rowCounts[familyIndex]
       for (int index = 0; index < familyNames.length; index++) {
-        ArrayList<Put> puts = new ArrayList<Put>(rowCounts[index]);
+        ArrayList<Put> puts = new ArrayList<>(rowCounts[index]);
         for (int i = 0; i < rowCounts[index]; i++) {
           byte[] k = Bytes.toBytes(i);
           Put put = new Put(k);
@@ -1143,7 +1143,7 @@ public class TestAdmin1 {
     } while (oldRegions.size() != 9); //3 regions * 3 replicas
     // write some data to the table
     Table ht = TEST_UTIL.getConnection().getTable(tableName);
-    List<Put> puts = new ArrayList<Put>();
+    List<Put> puts = new ArrayList<>();
     byte[] qualifier = "c".getBytes();
     Put put = new Put(new byte[]{(byte)'1'});
     put.addColumn(cf, qualifier, "100".getBytes());
@@ -1295,7 +1295,7 @@ public class TestAdmin1 {
     byte[] q1 = Bytes.toBytes("q1");
     byte[] v1 = Bytes.toBytes("v1");
     p.addColumn(Bytes.toBytes(fn), q1, v1);
-    List<Put> puts = new ArrayList<Put>(2);
+    List<Put> puts = new ArrayList<>(2);
     puts.add(p);
     p = new Put(Bytes.toBytes("rep1_rk"));
     p.addColumn(Bytes.toBytes(fn1), q1, v1);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java
index eb15d91..0014401 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java
@@ -776,7 +776,7 @@ public class TestAdmin2 {
 
     // Drain all region servers.
     Collection<ServerName> clusterServers = admin.getClusterStatus().getServers();
-    drainingServers = new ArrayList<ServerName>();
+    drainingServers = new ArrayList<>();
     for (ServerName server : clusterServers) {
       drainingServers.add(server);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAvoidCellReferencesIntoShippedBlocks.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAvoidCellReferencesIntoShippedBlocks.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAvoidCellReferencesIntoShippedBlocks.java
index ab09c5e..e7d7f0a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAvoidCellReferencesIntoShippedBlocks.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAvoidCellReferencesIntoShippedBlocks.java
@@ -231,7 +231,7 @@ public class TestAvoidCellReferencesIntoShippedBlocks {
           } catch (InterruptedException e) {
           }
         }
-        List<BlockCacheKey> cacheList = new ArrayList<BlockCacheKey>();
+        List<BlockCacheKey> cacheList = new ArrayList<>();
         Iterator<CachedBlock> iterator = cache.iterator();
         // evict all the blocks
         while (iterator.hasNext()) {
@@ -379,7 +379,7 @@ public class TestAvoidCellReferencesIntoShippedBlocks {
       Thread evictorThread = new Thread() {
         @Override
         public void run() {
-          List<BlockCacheKey> cacheList = new ArrayList<BlockCacheKey>();
+          List<BlockCacheKey> cacheList = new ArrayList<>();
           Iterator<CachedBlock> iterator = cache.iterator();
           // evict all the blocks
           while (iterator.hasNext()) {
@@ -416,7 +416,7 @@ public class TestAvoidCellReferencesIntoShippedBlocks {
             }
             assertEquals("Count the rows", count, 2);
             iterator = cache.iterator();
-            List<BlockCacheKey> newCacheList = new ArrayList<BlockCacheKey>();
+            List<BlockCacheKey> newCacheList = new ArrayList<>();
             while (iterator.hasNext()) {
               CachedBlock next = iterator.next();
               BlockCacheKey cacheKey = new BlockCacheKey(next.getFilename(), next.getOffset());

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
index f453662..023095f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestBlockEvictionFromClient.java
@@ -1329,7 +1329,7 @@ public class TestBlockEvictionFromClient {
 
   private static class MultiGetThread extends Thread {
     private final Table table;
-    private final List<Get> gets = new ArrayList<Get>();
+    private final List<Get> gets = new ArrayList<>();
     public MultiGetThread(Table table) {
       this.table = table;
     }
@@ -1565,7 +1565,7 @@ public class TestBlockEvictionFromClient {
     static final AtomicInteger countOfGets = new AtomicInteger(0);
     static final AtomicBoolean waitForGets = new AtomicBoolean(false);
     static final AtomicBoolean throwException = new AtomicBoolean(false);
-    private static final AtomicReference<CountDownLatch> cdl = new AtomicReference<CountDownLatch>(
+    private static final AtomicReference<CountDownLatch> cdl = new AtomicReference<>(
         new CountDownLatch(0));
 
     @Override

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientOperationInterrupt.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientOperationInterrupt.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientOperationInterrupt.java
index c1cb0a6..62ceca3 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientOperationInterrupt.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientOperationInterrupt.java
@@ -96,7 +96,7 @@ public class TestClientOperationInterrupt {
     final AtomicInteger badEx = new AtomicInteger(0);
     final AtomicInteger noInt = new AtomicInteger(0);
     final AtomicInteger done = new AtomicInteger(0);
-    List<Thread> threads = new ArrayList<Thread>();
+    List<Thread> threads = new ArrayList<>();
 
     final int nbThread = 100;
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestConnectionUtils.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestConnectionUtils.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestConnectionUtils.java
index 69729f0..c3e4a28 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestConnectionUtils.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestConnectionUtils.java
@@ -42,7 +42,7 @@ public class TestConnectionUtils {
       retries[i] = ConnectionUtils.getPauseTime(baseTime, 0);
     }
 
-    Set<Long> retyTimeSet = new TreeSet<Long>();
+    Set<Long> retyTimeSet = new TreeSet<>();
     for (long l : retries) {
       /*make sure that there is some jitter but only 1%*/
       assertTrue(l >= baseTime);
@@ -62,7 +62,7 @@ public class TestConnectionUtils {
     long minTimeExpected = (long) (basePause * 0.75f);
     int testTries = 100;
 
-    Set<Long> timeSet = new TreeSet<Long>();
+    Set<Long> timeSet = new TreeSet<>();
     for (int i = 0; i < testTries; i++) {
       long withJitter = ConnectionUtils.addJitter(basePause, 0.5f);
       assertTrue(withJitter >= minTimeExpected);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
index 2aed0ff..465bdfb 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java
@@ -163,7 +163,7 @@ public class TestFastFail {
     final AtomicInteger numBlockedWorkers = new AtomicInteger(0);
     final AtomicInteger numPreemptiveFastFailExceptions = new AtomicInteger(0);
 
-    List<Future<Boolean>> futures = new ArrayList<Future<Boolean>>();
+    List<Future<Boolean>> futures = new ArrayList<>();
     for (int i = 0; i < nThreads; i++) {
       futures.add(service.submit(new Callable<Boolean>() {
         /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
index aab586d..b1a0d3c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
@@ -190,7 +190,7 @@ public class TestFromClientSide {
   @Test
   public void testDuplicateAppend() throws Exception {
     HTableDescriptor hdt = TEST_UTIL.createTableDescriptor(name.getMethodName());
-    Map<String, String> kvs = new HashMap<String, String>();
+    Map<String, String> kvs = new HashMap<>();
     kvs.put(HConnectionTestingUtility.SleepAtFirstRpcCall.SLEEP_TIME_CONF_KEY, "2000");
     hdt.addCoprocessor(HConnectionTestingUtility.SleepAtFirstRpcCall.class.getName(), null, 1, kvs);
     TEST_UTIL.createTable(hdt, new byte[][] { ROW }).close();
@@ -2299,7 +2299,7 @@ public class TestFromClientSide {
       result = ht.get(get);
       assertTrue(result.size() == 1);
     }
-    ArrayList<Delete> deletes = new ArrayList<Delete>();
+    ArrayList<Delete> deletes = new ArrayList<>();
     for (int i = 0; i < 10; i++) {
       byte [] bytes = Bytes.toBytes(i);
       delete = new Delete(bytes);
@@ -4707,7 +4707,7 @@ public class TestFromClientSide {
 
     final Object waitLock = new Object();
     ExecutorService executorService = Executors.newFixedThreadPool(numVersions);
-    final AtomicReference<AssertionError> error = new AtomicReference<AssertionError>(null);
+    final AtomicReference<AssertionError> error = new AtomicReference<>(null);
     for (int versions = numVersions; versions < numVersions * 2; versions++) {
       final int versionsCopy = versions;
       executorService.submit(new Callable<Void>() {
@@ -5315,7 +5315,7 @@ public class TestFromClientSide {
 
   private List<HRegionLocation> getRegionsInRange(TableName tableName, byte[] startKey,
       byte[] endKey) throws IOException {
-    List<HRegionLocation> regionsInRange = new ArrayList<HRegionLocation>();
+    List<HRegionLocation> regionsInRange = new ArrayList<>();
     byte[] currentKey = startKey;
     final boolean endKeyIsEndOfTable = Bytes.equals(endKey, HConstants.EMPTY_END_ROW);
     try (RegionLocator r = TEST_UTIL.getConnection().getRegionLocator(tableName);) {
@@ -6237,7 +6237,7 @@ public class TestFromClientSide {
     HRegionLocator locator =
         (HRegionLocator) admin.getConnection().getRegionLocator(htd.getTableName());
     for (int regionReplication = 1; regionReplication < 4; regionReplication++) {
-      List<RegionLocations> regionLocations = new ArrayList<RegionLocations>();
+      List<RegionLocations> regionLocations = new ArrayList<>();
 
       // mock region locations coming from meta with multiple replicas
       for (HRegionInfo region : regions) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java
index 3680822..7f44a2a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java
@@ -338,7 +338,7 @@ public class TestFromClientSide3 {
     put.addColumn(FAMILY, QUALIFIER, VALUE);
     table.put(put);
 
-    List<Get> gets = new ArrayList<Get>();
+    List<Get> gets = new ArrayList<>();
     gets.add(new Get(ROW));
     gets.add(null);
     gets.add(new Get(ANOTHERROW));
@@ -432,7 +432,7 @@ public class TestFromClientSide3 {
     put.addColumn(FAMILY, QUALIFIER, VALUE);
     table.put (put);
 
-    List<Get> gets = new ArrayList<Get>();
+    List<Get> gets = new ArrayList<>();
     gets.add(new Get(ANOTHERROW));
     gets.add(new Get(Bytes.add(ROW, new byte[] { 0x00 })));
     gets.add(new Get(ROW));
@@ -450,7 +450,7 @@ public class TestFromClientSide3 {
     put.addColumn(FAMILY, QUALIFIER, VALUE);
     table.put(put);
 
-    gets = new ArrayList<Get>();
+    gets = new ArrayList<>();
     gets.add(new Get(new byte[] { 0x00 }));
     gets.add(new Get(new byte[] { 0x00, 0x00 }));
     results = table.existsAll(gets);
@@ -462,7 +462,7 @@ public class TestFromClientSide3 {
     put.addColumn(FAMILY, QUALIFIER, VALUE);
     table.put(put);
 
-    gets = new ArrayList<Get>();
+    gets = new ArrayList<>();
     gets.add(new Get(new byte[] { (byte) 0xff }));
     gets.add(new Get(new byte[] { (byte) 0xff, (byte) 0xff }));
     gets.add(new Get(new byte[] { (byte) 0xff, (byte) 0xff, (byte) 0xff }));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHBaseAdminNoCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHBaseAdminNoCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHBaseAdminNoCluster.java
index 8d93a0a..1eb83d9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHBaseAdminNoCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHBaseAdminNoCluster.java
@@ -170,7 +170,7 @@ public class TestHBaseAdminNoCluster {
     testMasterOperationIsRetried(new MethodCaller() {
       @Override
       public void call(Admin admin) throws Exception {
-        admin.getTableDescriptorsByTableName(new ArrayList<TableName>());
+        admin.getTableDescriptorsByTableName(new ArrayList<>());
       }
       @Override
       public void verify(MasterKeepAliveConnection masterAdmin, int count) throws Exception {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
index 8475828..70be7fa 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHCM.java
@@ -244,7 +244,7 @@ public class TestHCM {
   public void testClusterConnection() throws IOException {
     ThreadPoolExecutor otherPool = new ThreadPoolExecutor(1, 1,
         5, TimeUnit.SECONDS,
-        new SynchronousQueue<Runnable>(),
+        new SynchronousQueue<>(),
         Threads.newDaemonThreadFactory("test-hcm"));
 
     Connection con1 = ConnectionFactory.createConnection(TEST_UTIL.getConfiguration());
@@ -748,7 +748,7 @@ public class TestHCM {
     // 4 steps: ready=0; doGets=1; mustStop=2; stopped=3
     final AtomicInteger step = new AtomicInteger(0);
 
-    final AtomicReference<Throwable> failed = new AtomicReference<Throwable>(null);
+    final AtomicReference<Throwable> failed = new AtomicReference<>(null);
     Thread t = new Thread("testConnectionCloseThread") {
       @Override
       public void run() {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexer.java
index 26764d3..5c47de0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexer.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestHTableMultiplexer.java
@@ -131,7 +131,7 @@ public class TestHTableMultiplexer {
       }
 
       // MultiPut case
-      List<Put> multiput = new ArrayList<Put>();
+      List<Put> multiput = new ArrayList<>();
       for (int i = 0; i < NUM_REGIONS; i++) {
         byte [] row = endRows[i];
         if (row == null || row.length <= 0) continue;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java
index 9a2aa3d..999760d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIllegalTableDescriptor.java
@@ -200,7 +200,7 @@ public class TestIllegalTableDescriptor {
   }
 
   private static class ListAppender extends AppenderSkeleton {
-    private final List<String> messages = new ArrayList<String>();
+    private final List<String> messages = new ArrayList<>();
 
     @Override
     protected void append(LoggingEvent event) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java
index 3d7e1dc..4406812 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIncrementsFromClientSide.java
@@ -94,7 +94,7 @@ public class TestIncrementsFromClientSide {
   @Test
   public void testDuplicateIncrement() throws Exception {
     HTableDescriptor hdt = TEST_UTIL.createTableDescriptor(TableName.valueOf(name.getMethodName()));
-    Map<String, String> kvs = new HashMap<String, String>();
+    Map<String, String> kvs = new HashMap<>();
     kvs.put(HConnectionTestingUtility.SleepAtFirstRpcCall.SLEEP_TIME_CONF_KEY, "2000");
     hdt.addCoprocessor(HConnectionTestingUtility.SleepAtFirstRpcCall.class.getName(), null, 1, kvs);
     TEST_UTIL.createTable(hdt, new byte[][] { ROW }).close();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java
index 1f6dc98..43a2e77 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java
@@ -68,7 +68,7 @@ public class TestIntraRowPagination {
       Result result;
       boolean toLog = true;
 
-      List<Cell> kvListExp = new ArrayList<Cell>();
+      List<Cell> kvListExp = new ArrayList<>();
 
       int storeOffset = 1;
       int storeLimit = 3;
@@ -91,8 +91,8 @@ public class TestIntraRowPagination {
       scan.setRowOffsetPerColumnFamily(storeOffset);
       scan.setMaxResultsPerColumnFamily(storeLimit);
       RegionScanner scanner = region.getScanner(scan);
-      List<Cell> kvListScan = new ArrayList<Cell>();
-      List<Cell> results = new ArrayList<Cell>();
+      List<Cell> kvListScan = new ArrayList<>();
+      List<Cell> results = new ArrayList<>();
       while (scanner.next(results) || !results.isEmpty()) {
         kvListScan.addAll(results);
         results.clear();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
index 1209d25..a3bcc76 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java
@@ -110,7 +110,7 @@ public class TestMultiParallel {
     // not a multiple of the number of regions
     int numKeys = (int) ((float) starterKeys.length * 10.33F);
 
-    List<byte[]> keys = new ArrayList<byte[]>();
+    List<byte[]> keys = new ArrayList<>();
     for (int i = 0; i < numKeys; i++) {
       int kIdx = i % starterKeys.length;
       byte[] k = starterKeys[kIdx];
@@ -155,7 +155,7 @@ public class TestMultiParallel {
         try (Table t = connection.getTable(TEST_TABLE, executor)) {
           List<Put> puts = constructPutRequests(); // creates a Put for every region
           t.batch(puts, null);
-          HashSet<ServerName> regionservers = new HashSet<ServerName>();
+          HashSet<ServerName> regionservers = new HashSet<>();
           try (RegionLocator locator = connection.getRegionLocator(TEST_TABLE)) {
             for (Row r : puts) {
               HRegionLocation location = locator.getRegionLocation(r.getRow());
@@ -180,7 +180,7 @@ public class TestMultiParallel {
     table.batch(puts, null);
 
     // create a list of gets and run it
-    List<Row> gets = new ArrayList<Row>();
+    List<Row> gets = new ArrayList<>();
     for (byte[] k : KEYS) {
       Get get = new Get(k);
       get.addColumn(BYTES_FAMILY, QUALIFIER);
@@ -190,7 +190,7 @@ public class TestMultiParallel {
     table.batch(gets, multiRes);
 
     // Same gets using individual call API
-    List<Result> singleRes = new ArrayList<Result>();
+    List<Result> singleRes = new ArrayList<>();
     for (Row get : gets) {
       singleRes.add(table.get((Get) get));
     }
@@ -214,7 +214,7 @@ public class TestMultiParallel {
     LOG.info("test=testBadFam");
     Table table = UTIL.getConnection().getTable(TEST_TABLE);
 
-    List<Row> actions = new ArrayList<Row>();
+    List<Row> actions = new ArrayList<>();
     Put p = new Put(Bytes.toBytes("row1"));
     p.addColumn(Bytes.toBytes("bad_family"), Bytes.toBytes("qual"), Bytes.toBytes("value"));
     actions.add(p);
@@ -368,7 +368,7 @@ public class TestMultiParallel {
     validateSizeAndEmpty(results, KEYS.length);
 
     // Deletes
-    List<Row> deletes = new ArrayList<Row>();
+    List<Row> deletes = new ArrayList<>();
     for (int i = 0; i < KEYS.length; i++) {
       Delete delete = new Delete(KEYS[i]);
       delete.addFamily(BYTES_FAMILY);
@@ -399,7 +399,7 @@ public class TestMultiParallel {
     validateSizeAndEmpty(results, KEYS.length);
 
     // Deletes
-    ArrayList<Delete> deletes = new ArrayList<Delete>();
+    ArrayList<Delete> deletes = new ArrayList<>();
     for (int i = 0; i < KEYS.length; i++) {
       Delete delete = new Delete(KEYS[i]);
       delete.addFamily(BYTES_FAMILY);
@@ -422,7 +422,7 @@ public class TestMultiParallel {
     LOG.info("test=testBatchWithManyColsInOneRowGetAndPut");
     Table table = UTIL.getConnection().getTable(TEST_TABLE);
 
-    List<Row> puts = new ArrayList<Row>();
+    List<Row> puts = new ArrayList<>();
     for (int i = 0; i < 100; i++) {
       Put put = new Put(ONE_ROW);
       byte[] qual = Bytes.toBytes("column" + i);
@@ -436,7 +436,7 @@ public class TestMultiParallel {
     validateSizeAndEmpty(results, 100);
 
     // get the data back and validate that it is correct
-    List<Row> gets = new ArrayList<Row>();
+    List<Row> gets = new ArrayList<>();
     for (int i = 0; i < 100; i++) {
       Get get = new Get(ONE_ROW);
       byte[] qual = Bytes.toBytes("column" + i);
@@ -478,7 +478,7 @@ public class TestMultiParallel {
     Append a = new Append(ONE_ROW);
     a.add(BYTES_FAMILY, QUAL1, Bytes.toBytes("def"));
     a.add(BYTES_FAMILY, QUAL4, Bytes.toBytes("xyz"));
-    List<Row> actions = new ArrayList<Row>();
+    List<Row> actions = new ArrayList<>();
     actions.add(inc);
     actions.add(a);
 
@@ -604,7 +604,7 @@ public class TestMultiParallel {
 
     // Batch: get, get, put(new col), delete, get, get of put, get of deleted,
     // put
-    List<Row> actions = new ArrayList<Row>();
+    List<Row> actions = new ArrayList<>();
 
     byte[] qual2 = Bytes.toBytes("qual2");
     byte[] val2 = Bytes.toBytes("putvalue2");
@@ -693,7 +693,7 @@ public class TestMultiParallel {
   private void validateLoadedData(Table table) throws IOException {
     // get the data back and validate that it is correct
     LOG.info("Validating data on " + table);
-    List<Get> gets = new ArrayList<Get>();
+    List<Get> gets = new ArrayList<>();
     for (byte[] k : KEYS) {
       Get get = new Get(k);
       get.addColumn(BYTES_FAMILY, QUALIFIER);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
index 22e88da..becb2eb 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java
@@ -377,12 +377,12 @@ public class TestReplicaWithCluster {
     final int numRows = 10;
     final byte[] qual = Bytes.toBytes("qual");
     final byte[] val  = Bytes.toBytes("val");
-    final List<Pair<byte[], String>> famPaths = new ArrayList<Pair<byte[], String>>();
+    final List<Pair<byte[], String>> famPaths = new ArrayList<>();
     for (HColumnDescriptor col : hdt.getColumnFamilies()) {
       Path hfile = new Path(dir, col.getNameAsString());
       TestHRegionServerBulkLoad.createHFile(HTU.getTestFileSystem(), hfile, col.getName(),
         qual, val, numRows);
-      famPaths.add(new Pair<byte[], String>(col.getName(), hfile.toString()));
+      famPaths.add(new Pair<>(col.getName(), hfile.toString()));
     }
 
     // bulk load HFiles

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java
index 7cbb5ad..7b4442b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicasClient.java
@@ -103,7 +103,7 @@ public class TestReplicasClient {
     static final AtomicBoolean slowDownNext = new AtomicBoolean(false);
     static final AtomicInteger countOfNext = new AtomicInteger(0);
     private static final AtomicReference<CountDownLatch> cdl =
-        new AtomicReference<CountDownLatch>(new CountDownLatch(0));
+        new AtomicReference<>(new CountDownLatch(0));
     Random r = new Random();
     public SlowMeCopro() {
     }
@@ -530,7 +530,7 @@ public class TestReplicasClient {
   public void testCancelOfMultiGet() throws Exception {
     openRegion(hriSecondary);
     try {
-      List<Put> puts = new ArrayList<Put>(2);
+      List<Put> puts = new ArrayList<>(2);
       byte[] b1 = Bytes.toBytes("testCancelOfMultiGet" + 0);
       Put p = new Put(b1);
       p.addColumn(f, b1, b1);
@@ -552,7 +552,7 @@ public class TestReplicasClient {
       // Make primary slowdown
       SlowMeCopro.getCdl().set(new CountDownLatch(1));
 
-      List<Get> gets = new ArrayList<Get>();
+      List<Get> gets = new ArrayList<>();
       Get g = new Get(b1);
       g.setCheckExistenceOnly(true);
       g.setConsistency(Consistency.TIMELINE);
@@ -762,7 +762,7 @@ public class TestReplicasClient {
     Iterator<Result> iter = scanner.iterator();
 
     // Maps of row keys that we have seen so far
-    HashMap<String, Boolean> map = new HashMap<String, Boolean>();
+    HashMap<String, Boolean> map = new HashMap<>();
 
     // Tracked metrics
     int rowCount = 0;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
index ec6e020..3190fb9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRestoreSnapshotFromClient.java
@@ -304,7 +304,7 @@ public class TestRestoreSnapshotFromClient {
 
   private Set<String> getFamiliesFromFS(final TableName tableName) throws IOException {
     MasterFileSystem mfs = TEST_UTIL.getMiniHBaseCluster().getMaster().getMasterFileSystem();
-    Set<String> families = new HashSet<String>();
+    Set<String> families = new HashSet<>();
     Path tableDir = FSUtils.getTableDir(mfs.getRootDir(), tableName);
     for (Path regionDir: FSUtils.getRegionDirs(mfs.getFileSystem(), tableDir)) {
       for (Path familyDir: FSUtils.getFamilyDirs(mfs.getFileSystem(), regionDir)) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
index 42fecfb..6f40093 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
@@ -151,7 +151,7 @@ public class TestScannersFromClientSide {
     scanner = ht.getScanner(scan);
 
     // c4:4, c5:5, c6:6, c7:7
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[4], 4, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[5], 5, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[6], 6, VALUE));
@@ -166,14 +166,14 @@ public class TestScannersFromClientSide {
     scanner = ht.getScanner(scan);
 
     // First batch: c4:4, c5:5
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[4], 4, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[5], 5, VALUE));
     result = scanner.next();
     verifyResult(result, kvListExp, toLog, "Testing first batch of scan");
 
     // Second batch: c6:6, c7:7
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[6], 6, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[7], 7, VALUE));
     result = scanner.next();
@@ -204,7 +204,7 @@ public class TestScannersFromClientSide {
     byte[] cellValue = Bytes.createMaxByteArray(cellSize);
 
     Put put;
-    List<Put> puts = new ArrayList<Put>();
+    List<Put> puts = new ArrayList<>();
     for (int row = 0; row < ROWS.length; row++) {
       put = new Put(ROWS[row]);
       for (int qual = 0; qual < QUALIFIERS.length; qual++) {
@@ -244,7 +244,7 @@ public class TestScannersFromClientSide {
     Table ht = TEST_UTIL.createTable(tableName, FAMILY);
 
     Put put;
-    List<Put> puts = new ArrayList<Put>();
+    List<Put> puts = new ArrayList<>();
     for (int row = 0; row < ROWS.length; row++) {
       put = new Put(ROWS[row]);
       for (int qual = 0; qual < QUALIFIERS.length; qual++) {
@@ -327,7 +327,7 @@ public class TestScannersFromClientSide {
     boolean toLog = true;
     List<Cell> kvListExp;
 
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     // Insert one CF for row[0]
     put = new Put(ROW);
     for (int i=0; i < 10; i++) {
@@ -344,7 +344,7 @@ public class TestScannersFromClientSide {
     get = new Get(ROW);
     get.setMaxResultsPerColumnFamily(2);
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[0], 1, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[1], 1, VALUE));
     verifyResult(result, kvListExp, toLog, "Testing basic setMaxResults");
@@ -355,7 +355,7 @@ public class TestScannersFromClientSide {
     get.setFilter(new ColumnRangeFilter(QUALIFIERS[2], true, QUALIFIERS[5],
                                         true));
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[2], 1, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[3], 1, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[4], 1, VALUE));
@@ -383,7 +383,7 @@ public class TestScannersFromClientSide {
     get.addFamily(FAMILIES[1]);
     get.addFamily(FAMILIES[2]);
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     //Exp: CF1:q0, ..., q9, CF2: q0, q1, q10, q11, ..., q19
     for (int i=0; i < 10; i++) {
       kvListExp.add(new KeyValue(ROW, FAMILIES[1], QUALIFIERS[i], 1, VALUE));
@@ -401,7 +401,7 @@ public class TestScannersFromClientSide {
     get.setMaxResultsPerColumnFamily(3);
     get.setFilter(new ColumnRangeFilter(QUALIFIERS[2], true, null, true));
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     for (int i=2; i < 5; i++) {
       kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[i], 1, VALUE));
     }
@@ -417,7 +417,7 @@ public class TestScannersFromClientSide {
     get.setMaxResultsPerColumnFamily(7);
     get.setFilter(new ColumnPrefixFilter(QUALIFIERS[1]));
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[1], 1, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILIES[1], QUALIFIERS[1], 1, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILIES[2], QUALIFIERS[1], 1, VALUE));
@@ -448,7 +448,7 @@ public class TestScannersFromClientSide {
     boolean toLog = true;
     List<Cell> kvListExp, kvListScan;
 
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
 
     for (int r=0; r < ROWS.length; r++) {
       put = new Put(ROWS[r]);
@@ -467,7 +467,7 @@ public class TestScannersFromClientSide {
     scan = new Scan();
     scan.setMaxResultsPerColumnFamily(4);
     ResultScanner scanner = ht.getScanner(scan);
-    kvListScan = new ArrayList<Cell>();
+    kvListScan = new ArrayList<>();
     while ((result = scanner.next()) != null) {
       for (Cell kv : result.listCells()) {
         kvListScan.add(kv);
@@ -498,7 +498,7 @@ public class TestScannersFromClientSide {
     List<Cell> kvListExp;
 
     // Insert one CF for row
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     put = new Put(ROW);
     for (int i=0; i < 10; i++) {
       KeyValue kv = new KeyValue(ROW, FAMILIES[0], QUALIFIERS[i], 1, VALUE);
@@ -519,7 +519,7 @@ public class TestScannersFromClientSide {
     get = new Get(ROW);
     get.setRowOffsetPerColumnFamily(20);
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     verifyResult(result, kvListExp, toLog, "Testing offset > #kvs");
 
     //offset + maxResultPerCF
@@ -527,7 +527,7 @@ public class TestScannersFromClientSide {
     get.setRowOffsetPerColumnFamily(4);
     get.setMaxResultsPerColumnFamily(5);
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     for (int i=4; i < 9; i++) {
       kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[i], 1, VALUE));
     }
@@ -540,7 +540,7 @@ public class TestScannersFromClientSide {
     get.setFilter(new ColumnRangeFilter(QUALIFIERS[2], true, QUALIFIERS[5],
                                         true));
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[3], 1, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[4], 1, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILIES[0], QUALIFIERS[5], 1, VALUE));
@@ -563,7 +563,7 @@ public class TestScannersFromClientSide {
     get.addFamily(FAMILIES[1]);
     get.addFamily(FAMILIES[2]);
     result = ht.get(get);
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     //Exp: CF1:q4, q5, CF2: q4, q5
     kvListExp.add(new KeyValue(ROW, FAMILIES[1], QUALIFIERS[4], 1, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILIES[1], QUALIFIERS[5], 1, VALUE));
@@ -644,7 +644,7 @@ public class TestScannersFromClientSide {
     }
 
     // c0:0, c1:1
-    kvListExp = new ArrayList<Cell>();
+    kvListExp = new ArrayList<>();
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[0], 0, VALUE));
     kvListExp.add(new KeyValue(ROW, FAMILY, QUALIFIERS[1], 1, VALUE));
     result = scanner.next();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java
index 3d8ee55..f2f3b26 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java
@@ -337,7 +337,7 @@ public class TestSnapshotFromClient {
       LOG.debug(table2Snapshot1 + " completed.");
 
       List<SnapshotDescription> listTableSnapshots = admin.listTableSnapshots("test.*", ".*");
-      List<String> listTableSnapshotNames = new ArrayList<String>();
+      List<String> listTableSnapshotNames = new ArrayList<>();
       assertEquals(3, listTableSnapshots.size());
       for (SnapshotDescription s : listTableSnapshots) {
         listTableSnapshotNames.add(s.getName());
@@ -379,7 +379,7 @@ public class TestSnapshotFromClient {
 
       List<SnapshotDescription> listTableSnapshots =
           admin.listTableSnapshots("test.*", "Table1.*");
-      List<String> listTableSnapshotNames = new ArrayList<String>();
+      List<String> listTableSnapshotNames = new ArrayList<>();
       assertEquals(2, listTableSnapshots.size());
       for (SnapshotDescription s : listTableSnapshots) {
         listTableSnapshotNames.add(s.getName());

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
index 55086b5..99c4340 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java
@@ -193,7 +193,7 @@ public class TestSnapshotMetadata {
     final byte[] snapshotName = Bytes.toBytes(snapshotNameAsString);
 
     // restore the snapshot into a cloned table and examine the output
-    List<byte[]> familiesList = new ArrayList<byte[]>();
+    List<byte[]> familiesList = new ArrayList<>();
     Collections.addAll(familiesList, families);
 
     // Create a snapshot in which all families are empty
@@ -262,8 +262,8 @@ public class TestSnapshotMetadata {
     // populate it with data
     final byte[] familyForUpdate = BLOCKSIZE_FAM;
 
-    List<byte[]> familiesWithDataList = new ArrayList<byte[]>();
-    List<byte[]> emptyFamiliesList = new ArrayList<byte[]>();
+    List<byte[]> familiesWithDataList = new ArrayList<>();
+    List<byte[]> emptyFamiliesList = new ArrayList<>();
     if (addData) {
       Table original = UTIL.getConnection().getTable(originalTableName);
       UTIL.loadTable(original, familyForUpdate); // family arbitrarily chosen

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java
index 5c487d7..0a1fafe 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestTimestampsFilter.java
@@ -145,7 +145,7 @@ public class TestTimestampsFilter {
 
     // Request an empty list of versions using the Timestamps filter;
     // Should return none.
-    kvs = getNVersions(ht, FAMILY, 2, 2, new ArrayList<Long>());
+    kvs = getNVersions(ht, FAMILY, 2, 2, new ArrayList<>());
     assertEquals(0, kvs == null? 0: kvs.length);
 
     //
@@ -192,7 +192,7 @@ public class TestTimestampsFilter {
     p.addColumn(FAMILY, Bytes.toBytes("column4"), (long) 3, Bytes.toBytes("value4-3"));
     ht.put(p);
 
-    ArrayList<Long> timestamps = new ArrayList<Long>();
+    ArrayList<Long> timestamps = new ArrayList<>();
     timestamps.add(new Long(3));
     TimestampsFilter filter = new TimestampsFilter(timestamps);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
index 481f311..f092a48 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdmin.java
@@ -255,7 +255,7 @@ public class TestReplicationAdmin {
 
     // append table column family: f1 of t3 to replication
     tableCFs.clear();
-    tableCFs.put(tableName3, new ArrayList<String>());
+    tableCFs.put(tableName3, new ArrayList<>());
     tableCFs.get(tableName3).add("f1");
     admin.appendPeerTableCFs(ID_ONE, tableCFs);
     result = ReplicationSerDeHelper.parseTableCFsFromConfig(admin.getPeerTableCFs(ID_ONE));
@@ -269,7 +269,7 @@ public class TestReplicationAdmin {
     assertEquals("f1", result.get(tableName3).get(0));
 
     tableCFs.clear();
-    tableCFs.put(tableName4, new ArrayList<String>());
+    tableCFs.put(tableName4, new ArrayList<>());
     tableCFs.get(tableName4).add("f1");
     tableCFs.get(tableName4).add("f2");
     admin.appendPeerTableCFs(ID_ONE, tableCFs);
@@ -289,10 +289,10 @@ public class TestReplicationAdmin {
 
     // append "table5" => [], then append "table5" => ["f1"]
     tableCFs.clear();
-    tableCFs.put(tableName5, new ArrayList<String>());
+    tableCFs.put(tableName5, new ArrayList<>());
     admin.appendPeerTableCFs(ID_ONE, tableCFs);
     tableCFs.clear();
-    tableCFs.put(tableName5, new ArrayList<String>());
+    tableCFs.put(tableName5, new ArrayList<>());
     tableCFs.get(tableName5).add("f1");
     admin.appendPeerTableCFs(ID_ONE, tableCFs);
     result = ReplicationSerDeHelper.parseTableCFsFromConfig(admin.getPeerTableCFs(ID_ONE));
@@ -303,11 +303,11 @@ public class TestReplicationAdmin {
 
     // append "table6" => ["f1"], then append "table6" => []
     tableCFs.clear();
-    tableCFs.put(tableName6, new ArrayList<String>());
+    tableCFs.put(tableName6, new ArrayList<>());
     tableCFs.get(tableName6).add("f1");
     admin.appendPeerTableCFs(ID_ONE, tableCFs);
     tableCFs.clear();
-    tableCFs.put(tableName6, new ArrayList<String>());
+    tableCFs.put(tableName6, new ArrayList<>());
     admin.appendPeerTableCFs(ID_ONE, tableCFs);
     result = ReplicationSerDeHelper.parseTableCFsFromConfig(admin.getPeerTableCFs(ID_ONE));
     assertEquals(6, result.size());
@@ -339,7 +339,7 @@ public class TestReplicationAdmin {
 
     tableCFs.clear();
     tableCFs.put(tableName1, null);
-    tableCFs.put(tableName2, new ArrayList<String>());
+    tableCFs.put(tableName2, new ArrayList<>());
     tableCFs.get(tableName2).add("cf1");
     admin.setPeerTableCFs(ID_ONE, tableCFs);
     try {
@@ -360,7 +360,7 @@ public class TestReplicationAdmin {
 
     try {
       tableCFs.clear();
-      tableCFs.put(tableName1, new ArrayList<String>());
+      tableCFs.put(tableName1, new ArrayList<>());
       tableCFs.get(tableName1).add("f1");
       admin.removePeerTableCFs(ID_ONE, tableCFs);
       assertTrue(false);
@@ -382,13 +382,13 @@ public class TestReplicationAdmin {
     } catch (ReplicationException e) {
     }
     tableCFs.clear();
-    tableCFs.put(tableName2, new ArrayList<String>());
+    tableCFs.put(tableName2, new ArrayList<>());
     tableCFs.get(tableName2).add("cf1");
     admin.removePeerTableCFs(ID_ONE, tableCFs);
     assertNull(admin.getPeerTableCFs(ID_ONE));
 
     tableCFs.clear();
-    tableCFs.put(tableName4, new ArrayList<String>());
+    tableCFs.put(tableName4, new ArrayList<>());
     admin.setPeerTableCFs(ID_ONE, tableCFs);
     admin.removePeerTableCFs(ID_ONE, tableCFs);
     assertNull(admin.getPeerTableCFs(ID_ONE));
@@ -407,7 +407,7 @@ public class TestReplicationAdmin {
     admin.peerAdded(ID_ONE);
 
     rpc = admin.getPeerConfig(ID_ONE);
-    Set<String> namespaces = new HashSet<String>();
+    Set<String> namespaces = new HashSet<>();
     namespaces.add(ns1);
     namespaces.add(ns2);
     rpc.setNamespaces(namespaces);
@@ -448,7 +448,7 @@ public class TestReplicationAdmin {
     admin.updatePeerConfig(ID_ONE, rpc);
     rpc = admin.getPeerConfig(ID_ONE);
     Map<TableName, List<String>> tableCfs = new HashMap<>();
-    tableCfs.put(tableName1, new ArrayList<String>());
+    tableCfs.put(tableName1, new ArrayList<>());
     rpc.setTableCFsMap(tableCfs);
     try {
       admin.updatePeerConfig(ID_ONE, rpc);
@@ -460,7 +460,7 @@ public class TestReplicationAdmin {
 
     rpc = admin.getPeerConfig(ID_ONE);
     tableCfs.clear();
-    tableCfs.put(tableName2, new ArrayList<String>());
+    tableCfs.put(tableName2, new ArrayList<>());
     rpc.setTableCFsMap(tableCfs);
     admin.updatePeerConfig(ID_ONE, rpc);
     rpc = admin.getPeerConfig(ID_ONE);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdminWithClusters.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdminWithClusters.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdminWithClusters.java
index 24889ad..b44ecbf 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdminWithClusters.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/replication/TestReplicationAdminWithClusters.java
@@ -183,8 +183,7 @@ public class TestReplicationAdminWithClusters extends TestReplicationBase {
     }
     assertFalse("Table should not exists in the peer cluster", admin2.isTableAvailable(TestReplicationBase.tableName));
 
-    Map<TableName, ? extends Collection<String>> tableCfs =
-        new HashMap<TableName, Collection<String>>();
+    Map<TableName, ? extends Collection<String>> tableCfs = new HashMap<>();
     tableCfs.put(tableName, null);
     try {
       adminExt.setPeerTableCFs(peerId, tableCfs);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/constraint/TestConstraints.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/constraint/TestConstraints.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/constraint/TestConstraints.java
index acc3fca..12a229d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/constraint/TestConstraints.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/constraint/TestConstraints.java
@@ -75,11 +75,9 @@ public class TestConstraints {
   @Test
   public void testReadWriteWithConf() throws Throwable {
     HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(name.getMethodName()));
-    Constraints.add(
-        desc,
-        new Pair<Class<? extends Constraint>, Configuration>(
-            CheckConfigurationConstraint.class, CheckConfigurationConstraint
-                .getConfiguration()));
+    Constraints.add(desc,
+      new Pair<>(CheckConfigurationConstraint.class,
+        CheckConfigurationConstraint.getConfiguration()));
 
     List<? extends Constraint> c = Constraints.getConstraints(desc, this
         .getClass().getClassLoader());
@@ -88,7 +86,7 @@ public class TestConstraints {
     assertEquals(CheckConfigurationConstraint.class, c.get(0).getClass());
 
     // check to make sure that we overwrite configurations
-    Constraints.add(desc, new Pair<Class<? extends Constraint>, Configuration>(
+    Constraints.add(desc, new Pair<>(
         CheckConfigurationConstraint.class, new Configuration(false)));
 
     try {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
index 21d9861..422c54b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
@@ -349,7 +349,7 @@ public class TestCoprocessorInterface {
     RegionScanner scanner = region.getCoprocessorHost().postScannerOpen(s, region.getScanner(s));
     assertTrue(scanner instanceof CustomScanner);
     // this would throw an exception before HBASE-4197
-    scanner.next(new ArrayList<Cell>());
+    scanner.next(new ArrayList<>());
 
     HBaseTestingUtility.closeRegionAndWAL(region);
     Coprocessor c = region.getCoprocessorHost().

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java
index 04d8c8c..9f20ba2 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestHTableWrapper.java
@@ -221,7 +221,7 @@ public class TestHTableWrapper {
 
     // multiple deletes:
     Delete[] deletes = new Delete[] { new Delete(ROW_D), new Delete(ROW_E) };
-    hTableInterface.delete(new ArrayList<Delete>(Arrays.asList(deletes)));
+    hTableInterface.delete(new ArrayList<>(Arrays.asList(deletes)));
     checkRowsValues(new byte[][] { ROW_D, ROW_E }, new byte[][] { null, null });
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java
index b75fc79..1ed0008 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestOpenTableInCoprocessor.java
@@ -92,7 +92,7 @@ public class TestOpenTableInCoprocessor {
       long keepAliveTime = 60;
       ThreadPoolExecutor pool =
           new ThreadPoolExecutor(1, maxThreads, keepAliveTime, TimeUnit.SECONDS,
-              new SynchronousQueue<Runnable>(), Threads.newDaemonThreadFactory("hbase-table"));
+              new SynchronousQueue<>(), Threads.newDaemonThreadFactory("hbase-table"));
       pool.allowCoreThreadTimeOut(true);
       return pool;
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java
index fb87ff6..63d7544 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverBypass.java
@@ -112,7 +112,7 @@ public class TestRegionObserverBypass {
     EnvironmentEdgeManagerTestHelper.injectEdge(new IncrementingEnvironmentEdge());
 
     Table t = util.getConnection().getTable(tableName);
-    List<Put> puts = new ArrayList<Put>();
+    List<Put> puts = new ArrayList<>();
     Put p = new Put(row1);
     p.addColumn(dummy, dummy, dummy);
     puts.add(p);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
index 2e0db44..7b4cc40 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverInterface.java
@@ -424,7 +424,7 @@ public class TestRegionObserverInterface {
 
         @Override
         public boolean next(List<Cell> results, ScannerContext scannerContext) throws IOException {
-          List<Cell> internalResults = new ArrayList<Cell>();
+          List<Cell> internalResults = new ArrayList<>();
           boolean hasMore;
           do {
             hasMore = scanner.next(internalResults, scannerContext);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java
index 2ab91c1..5fb5421 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestWALObserver.java
@@ -181,8 +181,7 @@ public class TestWALObserver {
     HRegionInfo hri = createBasic3FamilyHRegionInfo(Bytes.toString(TEST_TABLE));
     final HTableDescriptor htd = createBasic3FamilyHTD(Bytes
         .toString(TEST_TABLE));
-    NavigableMap<byte[], Integer> scopes = new TreeMap<byte[], Integer>(
-        Bytes.BYTES_COMPARATOR);
+    NavigableMap<byte[], Integer> scopes = new TreeMap<>(Bytes.BYTES_COMPARATOR);
     for(byte[] fam : htd.getFamiliesKeys()) {
       scopes.put(fam, 0);
     }
@@ -272,8 +271,7 @@ public class TestWALObserver {
     final HRegionInfo hri = createBasic3FamilyHRegionInfo(Bytes.toString(TEST_TABLE));
     final HTableDescriptor htd = createBasic3FamilyHTD(Bytes.toString(TEST_TABLE));
     final MultiVersionConcurrencyControl mvcc = new MultiVersionConcurrencyControl();
-    NavigableMap<byte[], Integer> scopes = new TreeMap<byte[], Integer>(
-        Bytes.BYTES_COMPARATOR);
+    NavigableMap<byte[], Integer> scopes = new TreeMap<>(Bytes.BYTES_COMPARATOR);
     for(byte[] fam : htd.getFamiliesKeys()) {
       scopes.put(fam, 0);
     }
@@ -328,8 +326,7 @@ public class TestWALObserver {
     WALEdit edit = new WALEdit();
     long now = EnvironmentEdgeManager.currentTime();
     final int countPerFamily = 1000;
-    NavigableMap<byte[], Integer> scopes = new TreeMap<byte[], Integer>(
-        Bytes.BYTES_COMPARATOR);
+    NavigableMap<byte[], Integer> scopes = new TreeMap<>(Bytes.BYTES_COMPARATOR);
     for (HColumnDescriptor hcd : htd.getFamilies()) {
       scopes.put(hcd.getName(), 0);
     }


Mime
View raw message