hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject [08/22] hbase git commit: HBASE-17532 Replaced explicit type with diamond operator
Date Tue, 07 Mar 2017 19:23:21 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/favored/TestFavoredNodeAssignmentHelper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/favored/TestFavoredNodeAssignmentHelper.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/favored/TestFavoredNodeAssignmentHelper.java
index a195ec7..d624c93 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/favored/TestFavoredNodeAssignmentHelper.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/favored/TestFavoredNodeAssignmentHelper.java
@@ -56,9 +56,8 @@ import com.google.common.collect.Sets;
 @Category({MasterTests.class, SmallTests.class})
 public class TestFavoredNodeAssignmentHelper {
 
-  private static List<ServerName> servers = new ArrayList<ServerName>();
-  private static Map<String, List<ServerName>> rackToServers = new HashMap<String,
-      List<ServerName>>();
+  private static List<ServerName> servers = new ArrayList<>();
+  private static Map<String, List<ServerName>> rackToServers = new HashMap<>();
   private static RackManager rackManager = Mockito.mock(RackManager.class);
 
   // Some tests have randomness, so we run them multiple times
@@ -76,7 +75,7 @@ public class TestFavoredNodeAssignmentHelper {
       if (i < 10) {
         Mockito.when(rackManager.getRack(server)).thenReturn("rack1");
         if (rackToServers.get("rack1") == null) {
-          List<ServerName> servers = new ArrayList<ServerName>();
+          List<ServerName> servers = new ArrayList<>();
           rackToServers.put("rack1", servers);
         }
         rackToServers.get("rack1").add(server);
@@ -84,7 +83,7 @@ public class TestFavoredNodeAssignmentHelper {
       if (i >= 10 && i < 20) {
         Mockito.when(rackManager.getRack(server)).thenReturn("rack2");
         if (rackToServers.get("rack2") == null) {
-          List<ServerName> servers = new ArrayList<ServerName>();
+          List<ServerName> servers = new ArrayList<>();
           rackToServers.put("rack2", servers);
         }
         rackToServers.get("rack2").add(server);
@@ -92,7 +91,7 @@ public class TestFavoredNodeAssignmentHelper {
       if (i >= 20 && i < 30) {
         Mockito.when(rackManager.getRack(server)).thenReturn("rack3");
         if (rackToServers.get("rack3") == null) {
-          List<ServerName> servers = new ArrayList<ServerName>();
+          List<ServerName> servers = new ArrayList<>();
           rackToServers.put("rack3", servers);
         }
         rackToServers.get("rack3").add(server);
@@ -105,7 +104,7 @@ public class TestFavoredNodeAssignmentHelper {
   // work with from any given rack
   // Return a rondom 'count' number of servers from 'rack'
   private static List<ServerName> getServersFromRack(Map<String, Integer> rackToServerCount) {
-    List<ServerName> chosenServers = new ArrayList<ServerName>();
+    List<ServerName> chosenServers = new ArrayList<>();
     for (Map.Entry<String, Integer> entry : rackToServerCount.entrySet()) {
       List<ServerName> servers = rackToServers.get(entry.getKey());
       for (int i = 0; i < entry.getValue(); i++) {
@@ -119,7 +118,7 @@ public class TestFavoredNodeAssignmentHelper {
   public void testSmallCluster() {
     // Test the case where we cannot assign favored nodes (because the number
     // of nodes in the cluster is too less)
-    Map<String,Integer> rackToServerCount = new HashMap<String,Integer>();
+    Map<String,Integer> rackToServerCount = new HashMap<>();
     rackToServerCount.put("rack1", 2);
     List<ServerName> servers = getServersFromRack(rackToServerCount);
     FavoredNodeAssignmentHelper helper = new FavoredNodeAssignmentHelper(servers,
@@ -158,7 +157,7 @@ public class TestFavoredNodeAssignmentHelper {
   public void testSecondaryAndTertiaryPlacementWithSingleRack() {
     // Test the case where there is a single rack and we need to choose
     // Primary/Secondary/Tertiary from a single rack.
-    Map<String,Integer> rackToServerCount = new HashMap<String,Integer>();
+    Map<String,Integer> rackToServerCount = new HashMap<>();
     rackToServerCount.put("rack1", 10);
     // have lots of regions to test with
     Triple<Map<HRegionInfo, ServerName>, FavoredNodeAssignmentHelper, List<HRegionInfo>>
@@ -184,7 +183,7 @@ public class TestFavoredNodeAssignmentHelper {
   public void testSecondaryAndTertiaryPlacementWithSingleServer() {
     // Test the case where we have a single node in the cluster. In this case
     // the primary can be assigned but the secondary/tertiary would be null
-    Map<String,Integer> rackToServerCount = new HashMap<String,Integer>();
+    Map<String,Integer> rackToServerCount = new HashMap<>();
     rackToServerCount.put("rack1", 1);
     Triple<Map<HRegionInfo, ServerName>, FavoredNodeAssignmentHelper, List<HRegionInfo>>
       primaryRSMapAndHelper = secondaryAndTertiaryRSPlacementHelper(1, rackToServerCount);
@@ -202,7 +201,7 @@ public class TestFavoredNodeAssignmentHelper {
   public void testSecondaryAndTertiaryPlacementWithMultipleRacks() {
     // Test the case where we have multiple racks and the region servers
     // belong to multiple racks
-    Map<String,Integer> rackToServerCount = new HashMap<String,Integer>();
+    Map<String,Integer> rackToServerCount = new HashMap<>();
     rackToServerCount.put("rack1", 10);
     rackToServerCount.put("rack2", 10);
 
@@ -233,7 +232,7 @@ public class TestFavoredNodeAssignmentHelper {
   public void testSecondaryAndTertiaryPlacementWithLessThanTwoServersInRacks() {
     // Test the case where we have two racks but with less than two servers in each
     // We will not have enough machines to select secondary/tertiary
-    Map<String,Integer> rackToServerCount = new HashMap<String,Integer>();
+    Map<String,Integer> rackToServerCount = new HashMap<>();
     rackToServerCount.put("rack1", 1);
     rackToServerCount.put("rack2", 1);
     Triple<Map<HRegionInfo, ServerName>, FavoredNodeAssignmentHelper, List<HRegionInfo>>
@@ -257,7 +256,7 @@ public class TestFavoredNodeAssignmentHelper {
     // racks than what the primary is on. But if the other rack doesn't have
     // enough nodes to have both secondary/tertiary RSs, the tertiary is placed
     // on the same rack as the primary server is on
-    Map<String,Integer> rackToServerCount = new HashMap<String,Integer>();
+    Map<String,Integer> rackToServerCount = new HashMap<>();
     rackToServerCount.put("rack1", 2);
     rackToServerCount.put("rack2", 1);
     Triple<Map<HRegionInfo, ServerName>, FavoredNodeAssignmentHelper, List<HRegionInfo>>
@@ -290,7 +289,7 @@ public class TestFavoredNodeAssignmentHelper {
         new HashMap<ServerName, List<HRegionInfo>>();
     helper.initialize();
     // create regions
-    List<HRegionInfo> regions = new ArrayList<HRegionInfo>(regionCount);
+    List<HRegionInfo> regions = new ArrayList<>(regionCount);
     for (int i = 0; i < regionCount; i++) {
       HRegionInfo region = new HRegionInfo(TableName.valueOf(name.getMethodName()),
           Bytes.toBytes(i), Bytes.toBytes(i + 1));
@@ -298,13 +297,12 @@ public class TestFavoredNodeAssignmentHelper {
     }
     // place the regions
     helper.placePrimaryRSAsRoundRobin(assignmentMap, primaryRSMap, regions);
-    return new Triple<Map<HRegionInfo, ServerName>, FavoredNodeAssignmentHelper, List<HRegionInfo>>
-                   (primaryRSMap, helper, regions);
+    return new Triple<>(primaryRSMap, helper, regions);
   }
 
   private void primaryRSPlacement(int regionCount, Map<HRegionInfo, ServerName> primaryRSMap,
       int firstRackSize, int secondRackSize, int thirdRackSize) {
-    Map<String,Integer> rackToServerCount = new HashMap<String,Integer>();
+    Map<String,Integer> rackToServerCount = new HashMap<>();
     rackToServerCount.put("rack1", firstRackSize);
     rackToServerCount.put("rack2", secondRackSize);
     rackToServerCount.put("rack3", thirdRackSize);
@@ -315,11 +313,10 @@ public class TestFavoredNodeAssignmentHelper {
 
     assertTrue(helper.canPlaceFavoredNodes());
 
-    Map<ServerName, List<HRegionInfo>> assignmentMap =
-        new HashMap<ServerName, List<HRegionInfo>>();
-    if (primaryRSMap == null) primaryRSMap = new HashMap<HRegionInfo, ServerName>();
+    Map<ServerName, List<HRegionInfo>> assignmentMap = new HashMap<>();
+    if (primaryRSMap == null) primaryRSMap = new HashMap<>();
     // create some regions
-    List<HRegionInfo> regions = new ArrayList<HRegionInfo>(regionCount);
+    List<HRegionInfo> regions = new ArrayList<>(regionCount);
     for (int i = 0; i < regionCount; i++) {
       HRegionInfo region = new HRegionInfo(TableName.valueOf("foobar"),
           Bytes.toBytes(i), Bytes.toBytes(i + 1));
@@ -354,11 +351,11 @@ public class TestFavoredNodeAssignmentHelper {
     //Verify the ordering was as expected by inserting the racks and regions
     //in sorted maps. The keys being the racksize and numregions; values are
     //the relative positions of the racksizes and numregions respectively
-    SortedMap<Integer, Integer> rackMap = new TreeMap<Integer, Integer>();
+    SortedMap<Integer, Integer> rackMap = new TreeMap<>();
     rackMap.put(firstRackSize, 1);
     rackMap.put(secondRackSize, 2);
     rackMap.put(thirdRackSize, 3);
-    SortedMap<Integer, Integer> regionMap = new TreeMap<Integer, Integer>();
+    SortedMap<Integer, Integer> regionMap = new TreeMap<>();
     regionMap.put(regionsOnRack1, 1);
     regionMap.put(regionsOnRack2, 2);
     regionMap.put(regionsOnRack3, 3);
@@ -390,7 +387,7 @@ public class TestFavoredNodeAssignmentHelper {
     helper.initialize();
     assertTrue(helper.canPlaceFavoredNodes());
 
-    List<HRegionInfo> regions = new ArrayList<HRegionInfo>(20);
+    List<HRegionInfo> regions = new ArrayList<>(20);
     for (int i = 0; i < 20; i++) {
       HRegionInfo region = new HRegionInfo(TableName.valueOf(name.getMethodName()),
           Bytes.toBytes(i), Bytes.toBytes(i + 1));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
index 1d24140..9b71d45 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
@@ -70,13 +70,12 @@ public class TestColumnPrefixFilter {
       List<String> columns = generateRandomWords(10000, "column");
       long maxTimestamp = 2;
 
-      List<Cell> kvList = new ArrayList<Cell>();
+      List<Cell> kvList = new ArrayList<>();
 
-      Map<String, List<Cell>> prefixMap = new HashMap<String,
-          List<Cell>>();
+      Map<String, List<Cell>> prefixMap = new HashMap<>();
 
-      prefixMap.put("p", new ArrayList<Cell>());
-      prefixMap.put("s", new ArrayList<Cell>());
+      prefixMap.put("p", new ArrayList<>());
+      prefixMap.put("s", new ArrayList<>());
 
       String valueString = "ValueString";
 
@@ -108,7 +107,7 @@ public class TestColumnPrefixFilter {
         scan.setFilter(filter);
 
         InternalScanner scanner = region.getScanner(scan);
-        List<Cell> results = new ArrayList<Cell>();
+        List<Cell> results = new ArrayList<>();
         while (scanner.next(results))
           ;
         assertEquals(prefixMap.get(s).size(), results.size());
@@ -133,13 +132,12 @@ public class TestColumnPrefixFilter {
       List<String> columns = generateRandomWords(10000, "column");
       long maxTimestamp = 2;
 
-      List<Cell> kvList = new ArrayList<Cell>();
+      List<Cell> kvList = new ArrayList<>();
 
-      Map<String, List<Cell>> prefixMap = new HashMap<String,
-          List<Cell>>();
+      Map<String, List<Cell>> prefixMap = new HashMap<>();
 
-      prefixMap.put("p", new ArrayList<Cell>());
-      prefixMap.put("s", new ArrayList<Cell>());
+      prefixMap.put("p", new ArrayList<>());
+      prefixMap.put("s", new ArrayList<>());
 
       String valueString = "ValueString";
 
@@ -174,7 +172,7 @@ public class TestColumnPrefixFilter {
         scan.setFilter(filterList);
 
         InternalScanner scanner = region.getScanner(scan);
-        List<Cell> results = new ArrayList<Cell>();
+        List<Cell> results = new ArrayList<>();
         while (scanner.next(results))
           ;
         assertEquals(prefixMap.get(s).size(), results.size());
@@ -187,7 +185,7 @@ public class TestColumnPrefixFilter {
   }
 
   List<String> generateRandomWords(int numberOfWords, String suffix) {
-    Set<String> wordSet = new HashSet<String>();
+    Set<String> wordSet = new HashSet<>();
     for (int i = 0; i < numberOfWords; i++) {
       int lengthOfWords = (int) (Math.random()*2) + 1;
       char[] wordChar = new char[lengthOfWords];
@@ -202,7 +200,7 @@ public class TestColumnPrefixFilter {
       }
       wordSet.add(word);
     }
-    List<String> wordList = new ArrayList<String>(wordSet);
+    List<String> wordList = new ArrayList<>(wordSet);
     return wordList;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java
index 04377b0..f03a4f0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestColumnRangeFilter.java
@@ -171,18 +171,18 @@ public class TestColumnRangeFilter {
     long maxTimestamp = 2;
     List<String> columns = generateRandomWords(20000, 8);
 
-    List<KeyValue> kvList = new ArrayList<KeyValue>();
+    List<KeyValue> kvList = new ArrayList<>();
 
-    Map<StringRange, List<KeyValue>> rangeMap = new HashMap<StringRange, List<KeyValue>>();
+    Map<StringRange, List<KeyValue>> rangeMap = new HashMap<>();
 
     rangeMap.put(new StringRange(null, true, "b", false),
-        new ArrayList<KeyValue>());
+        new ArrayList<>());
     rangeMap.put(new StringRange("p", true, "q", false),
-        new ArrayList<KeyValue>());
+        new ArrayList<>());
     rangeMap.put(new StringRange("r", false, "s", true),
-        new ArrayList<KeyValue>());
+        new ArrayList<>());
     rangeMap.put(new StringRange("z", false, null, false),
-        new ArrayList<KeyValue>());
+        new ArrayList<>());
     String valueString = "ValueString";
 
     for (String row : rows) {
@@ -216,7 +216,7 @@ public class TestColumnRangeFilter {
           s.isEndInclusive());
       scan.setFilter(filter);
       ResultScanner scanner = ht.getScanner(scan);
-      List<Cell> results = new ArrayList<Cell>();
+      List<Cell> results = new ArrayList<>();
       LOG.info("scan column range: " + s.toString());
       long timeBeforeScan = System.currentTimeMillis();
 
@@ -245,7 +245,7 @@ public class TestColumnRangeFilter {
   }
 
   List<String> generateRandomWords(int numberOfWords, int maxLengthOfWords) {
-    Set<String> wordSet = new HashSet<String>();
+    Set<String> wordSet = new HashSet<>();
     for (int i = 0; i < numberOfWords; i++) {
       int lengthOfWords = (int) (Math.random() * maxLengthOfWords) + 1;
       char[] wordChar = new char[lengthOfWords];
@@ -255,7 +255,7 @@ public class TestColumnRangeFilter {
       String word = new String(wordChar);
       wordSet.add(word);
     }
-    List<String> wordList = new ArrayList<String>(wordSet);
+    List<String> wordList = new ArrayList<>(wordSet);
     return wordList;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
index 1b00ae8..704441a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
@@ -125,7 +125,7 @@ public class TestDependentColumnFilter {
   }
 
   private List<KeyValue> makeTestVals() {
-    List<KeyValue> testVals = new ArrayList<KeyValue>();
+    List<KeyValue> testVals = new ArrayList<>();
     testVals.add(new KeyValue(ROWS[0], FAMILIES[0], QUALIFIER, STAMPS[0], BAD_VALS[0]));
     testVals.add(new KeyValue(ROWS[0], FAMILIES[0], QUALIFIER, STAMPS[1], BAD_VALS[1]));
     testVals.add(new KeyValue(ROWS[0], FAMILIES[1], QUALIFIER, STAMPS[1], BAD_VALS[2]));
@@ -147,7 +147,7 @@ public class TestDependentColumnFilter {
   private void verifyScan(Scan s, long expectedRows, long expectedCells)
   throws IOException {
     InternalScanner scanner = this.region.getScanner(s);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     int i = 0;
     int cells = 0;
     for (boolean done = true; done; i++) {
@@ -231,7 +231,7 @@ public class TestDependentColumnFilter {
   @Test
   public void testFilterDropping() throws Exception {
     Filter filter = new DependentColumnFilter(FAMILIES[0], QUALIFIER);
-    List<Cell> accepted = new ArrayList<Cell>();
+    List<Cell> accepted = new ArrayList<>();
     for(Cell val : testVals) {
       if(filter.filterKeyValue(val) == ReturnCode.INCLUDE) {
         accepted.add(val);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
index e4af75f..a403c24 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
@@ -275,7 +275,7 @@ public class TestFilter {
 
     // reseek to row three.
     scanner.reseek(ROWS_THREE[1]);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
 
     // the results should belong to ROWS_THREE[1]
     scanner.next(results);
@@ -285,7 +285,7 @@ public class TestFilter {
     }
     // again try to reseek to a value before ROWS_THREE[1]
     scanner.reseek(ROWS_ONE[1]);
-    results = new ArrayList<Cell>();
+    results = new ArrayList<>();
     // This time no seek would have been done to ROWS_ONE[1]
     scanner.next(results);
     for (Cell keyValue : results) {
@@ -511,7 +511,7 @@ public class TestFilter {
     InternalScanner scanner = this.region.getScanner(s);
     int scannerCounter = 0;
     while (true) {
-      boolean isMoreResults = scanner.next(new ArrayList<Cell>());
+      boolean isMoreResults = scanner.next(new ArrayList<>());
       scannerCounter++;
 
       if (scannerCounter >= pageSize) {
@@ -540,7 +540,7 @@ public class TestFilter {
 
     InternalScanner scanner = this.region.getScanner(s);
     while (true) {
-      ArrayList<Cell> values = new ArrayList<Cell>();
+      ArrayList<Cell> values = new ArrayList<>();
       boolean isMoreResults = scanner.next(values);
       if (!isMoreResults
           || !Bytes.toString(CellUtil.cloneRow(values.get(0))).startsWith(prefix)) {
@@ -575,7 +575,7 @@ public class TestFilter {
     InternalScanner scanner = this.region.getScanner(s);
     int scannerCounter = 0;
     while (true) {
-      boolean isMoreResults = scanner.next(new ArrayList<Cell>());
+      boolean isMoreResults = scanner.next(new ArrayList<>());
       scannerCounter++;
 
       if (scannerCounter >= pageSize) {
@@ -629,7 +629,7 @@ public class TestFilter {
     s.setFilter(filter);
 
     InternalScanner scanner = this.region.getScanner(s);
-    ArrayList<Cell> values = new ArrayList<Cell>();
+    ArrayList<Cell> values = new ArrayList<>();
     scanner.next(values);
     assertTrue("All rows should be filtered out", values.isEmpty());
   }
@@ -652,7 +652,7 @@ public class TestFilter {
 
     InternalScanner scanner = this.region.getScanner(s);
     while (true) {
-      ArrayList<Cell> values = new ArrayList<Cell>();
+      ArrayList<Cell> values = new ArrayList<>();
       boolean isMoreResults = scanner.next(values);
       if (!isMoreResults || !Bytes.toString(CellUtil.cloneRow(values.get(0))).startsWith(prefix)) {
         assertTrue("The WhileMatchFilter should now filter all remaining", filter.filterAllRemaining());
@@ -681,7 +681,7 @@ public class TestFilter {
 
     InternalScanner scanner = this.region.getScanner(s);
     while (true) {
-      ArrayList<Cell> values = new ArrayList<Cell>();
+      ArrayList<Cell> values = new ArrayList<>();
       boolean isMoreResults = scanner.next(values);
       assertTrue("The WhileMatchFilter should now filter all remaining", filter.filterAllRemaining());
       if (!isMoreResults) {
@@ -1370,7 +1370,7 @@ public class TestFilter {
     // Test getting a single row, single key using Row, Qualifier, and Value
     // regular expression and substring filters
     // Use must pass all
-    List<Filter> filters = new ArrayList<Filter>();
+    List<Filter> filters = new ArrayList<>();
     filters.add(new RowFilter(CompareOp.EQUAL, new RegexStringComparator(".+-2")));
     filters.add(new QualifierFilter(CompareOp.EQUAL, new RegexStringComparator(".+-2")));
     filters.add(new ValueFilter(CompareOp.EQUAL, new SubstringComparator("One")));
@@ -1520,7 +1520,7 @@ public class TestFilter {
     Scan s1 = new Scan();
     s1.setFilter(filterList);
     InternalScanner scanner = testRegion.getScanner(s1);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     int resultCount = 0;
     while (scanner.next(results)) {
       resultCount++;
@@ -1553,7 +1553,7 @@ public class TestFilter {
     // Now let's grab rows that have Q_ONE[0](VALUES[0]) and Q_ONE[2](VALUES[1])
     // Since group two rows don't have these qualifiers, they will pass
     // so limiting scan to group one
-    List<Filter> filters = new ArrayList<Filter>();
+    List<Filter> filters = new ArrayList<>();
     filters.add(new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[0],
         CompareOp.EQUAL, VALUES[0]));
     filters.add(new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[2],
@@ -1573,7 +1573,7 @@ public class TestFilter {
 
     // In order to get expected behavior without limiting to group one
     // need to wrap SCVFs in SkipFilters
-    filters = new ArrayList<Filter>();
+    filters = new ArrayList<>();
     filters.add(new SkipFilter(new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[0],
         CompareOp.EQUAL, VALUES[0])));
     filters.add(new SkipFilter(new SingleColumnValueFilter(FAMILIES[0], QUALIFIERS_ONE[2],
@@ -1661,7 +1661,7 @@ public class TestFilter {
   private void verifyScan(Scan s, long expectedRows, long expectedKeys)
   throws IOException {
     InternalScanner scanner = this.region.getScanner(s);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     int i = 0;
     for (boolean done = true; done; i++) {
       done = scanner.next(results);
@@ -1683,7 +1683,7 @@ public class TestFilter {
       long expectedKeys)
   throws IOException {
     InternalScanner scanner = this.region.getScanner(s);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     int i = 0;
     for (boolean done = true; done; i++) {
       done = scanner.next(results);
@@ -1704,7 +1704,7 @@ public class TestFilter {
   private void verifyScanFull(Scan s, KeyValue [] kvs)
   throws IOException {
     InternalScanner scanner = this.region.getScanner(s);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     int row = 0;
     int idx = 0;
     for (boolean done = true; done; row++) {
@@ -1735,7 +1735,7 @@ public class TestFilter {
   private void verifyScanFullNoValues(Scan s, KeyValue [] kvs, boolean useLen)
   throws IOException {
     InternalScanner scanner = this.region.getScanner(s);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     int row = 0;
     int idx = 0;
     for (boolean more = true; more; row++) {
@@ -2073,7 +2073,7 @@ public class TestFilter {
     Scan s1 = new Scan();
     s1.setFilter(rowFilter);
     InternalScanner scanner = testRegion.getScanner(s1);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     int i = 5;
     for (boolean done = true; done; i++) {
       done = scanner.next(results);
@@ -2092,7 +2092,7 @@ public class TestFilter {
     s1 = new Scan();
     s1.setFilter(subFilterList);
     scanner = testRegion.getScanner(s1);
-    results = new ArrayList<Cell>();
+    results = new ArrayList<>();
     for (i=0; i<=4; i+=2) {
       scanner.next(results);
       assertTrue(CellUtil.matchingRow(results.get(0), Bytes.toBytes("row" + i)));
@@ -2108,7 +2108,7 @@ public class TestFilter {
     s1 = new Scan();
     s1.setFilter(filterList);
     scanner = testRegion.getScanner(s1);
-    results = new ArrayList<Cell>();
+    results = new ArrayList<>();
     for (i=0; i<=4; i+=2) {
       scanner.next(results);
       assertTrue(CellUtil.matchingRow(results.get(0), Bytes.toBytes("row" + i)));
@@ -2129,7 +2129,7 @@ public class TestFilter {
     s1 = new Scan();
     s1.setFilter(filterList);
     scanner = testRegion.getScanner(s1);
-    results = new ArrayList<Cell>();
+    results = new ArrayList<>();
     for (i=0; i<=4; i+=2) {
       scanner.next(results);
       assertTrue(CellUtil.matchingRow(results.get(0), Bytes.toBytes("row" + i)));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
index f80317b..ad71fcc 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
@@ -125,7 +125,7 @@ public class TestFilterList {
   }
 
   private Filter getFilterMPONE() {
-    List<Filter> filters = new ArrayList<Filter>();
+    List<Filter> filters = new ArrayList<>();
     filters.add(new PageFilter(MAX_PAGES));
     filters.add(new WhileMatchFilter(new PrefixFilter(Bytes.toBytes("yyy"))));
     Filter filterMPONE =
@@ -191,7 +191,7 @@ public class TestFilterList {
   }
 
   private Filter getMPALLFilter() {
-    List<Filter> filters = new ArrayList<Filter>();
+    List<Filter> filters = new ArrayList<>();
     filters.add(new PageFilter(MAX_PAGES));
     filters.add(new WhileMatchFilter(new PrefixFilter(Bytes.toBytes("yyy"))));
     Filter filterMPALL =
@@ -239,7 +239,7 @@ public class TestFilterList {
   }
 
   public Filter getOrderingFilter() {
-    List<Filter> filters = new ArrayList<Filter>();
+    List<Filter> filters = new ArrayList<>();
     filters.add(new PrefixFilter(Bytes.toBytes("yyy")));
     filters.add(new PageFilter(MAX_PAGES));
     Filter filterMPONE =
@@ -370,7 +370,7 @@ public class TestFilterList {
    */
   @Test
   public void testSerialization() throws Exception {
-    List<Filter> filters = new ArrayList<Filter>();
+    List<Filter> filters = new ArrayList<>();
     filters.add(new PageFilter(MAX_PAGES));
     filters.add(new WhileMatchFilter(new PrefixFilter(Bytes.toBytes("yyy"))));
     Filter filterMPALL =

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java
index bbde09d..39abc95 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterListOrOperatorWithBlkCnt.java
@@ -101,13 +101,13 @@ public class TestFilterListOrOperatorWithBlkCnt {
     scan.setMaxVersions();
     long blocksStart = getBlkAccessCount();
 
-    List<RowRange> ranges1 = new ArrayList<RowRange>();
+    List<RowRange> ranges1 = new ArrayList<>();
     ranges1.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(15), false));
     ranges1.add(new RowRange(Bytes.toBytes(9980), true, Bytes.toBytes(9985), false));
 
     MultiRowRangeFilter filter1 = new MultiRowRangeFilter(ranges1);
 
-    List<RowRange> ranges2 = new ArrayList<RowRange>();
+    List<RowRange> ranges2 = new ArrayList<>();
     ranges2.add(new RowRange(Bytes.toBytes(15), true, Bytes.toBytes(20), false));
     ranges2.add(new RowRange(Bytes.toBytes(9985), true, Bytes.toBytes(9990), false));
 
@@ -156,7 +156,7 @@ public class TestFilterListOrOperatorWithBlkCnt {
       scan.setStopRow(stopRow);
     }
     ResultScanner scanner = ht.getScanner(scan);
-    List<Cell> kvList = new ArrayList<Cell>();
+    List<Cell> kvList = new ArrayList<>();
     Result r;
     while ((r = scanner.next()) != null) {
       for (Cell kv : r.listCells()) {
@@ -168,7 +168,7 @@ public class TestFilterListOrOperatorWithBlkCnt {
 
   private int getResultsSize(Table ht, Scan scan) throws IOException {
     ResultScanner scanner = ht.getScanner(scan);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     Result r;
     while ((r = scanner.next()) != null) {
       for (Cell kv : r.listCells()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java
index 7c9651d..37e0d2d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterSerialization.java
@@ -105,12 +105,12 @@ public class TestFilterSerialization {
   @Test
   public void testFilterList() throws Exception {
     // empty filter list
-    FilterList filterList = new FilterList(new LinkedList<Filter>());
+    FilterList filterList = new FilterList(new LinkedList<>());
     assertTrue(filterList.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(filterList))));
 
     // non-empty filter list
-    LinkedList<Filter> list = new LinkedList<Filter>();
+    LinkedList<Filter> list = new LinkedList<>();
     list.add(new ColumnCountGetFilter(1));
     list.add(new RowFilter(CompareFilter.CompareOp.EQUAL,
       new SubstringComparator("testFilterList")));
@@ -131,7 +131,7 @@ public class TestFilterSerialization {
   @Test
   public void testFirstKeyValueMatchingQualifiersFilter() throws Exception {
     // empty qualifiers set
-    TreeSet<byte []> set = new TreeSet<byte []>(Bytes.BYTES_COMPARATOR);
+    TreeSet<byte []> set = new TreeSet<>(Bytes.BYTES_COMPARATOR);
     FirstKeyValueMatchingQualifiersFilter firstKeyValueMatchingQualifiersFilter =
       new FirstKeyValueMatchingQualifiersFilter(set);
     assertTrue(firstKeyValueMatchingQualifiersFilter.areSerializedFieldsEqual(
@@ -155,9 +155,9 @@ public class TestFilterSerialization {
 
   @Test
   public void testFuzzyRowFilter() throws Exception {
-    LinkedList<Pair<byte[], byte[]>> fuzzyList = new LinkedList<Pair<byte[], byte[]>>();
-    fuzzyList.add(new Pair<byte[], byte[]>(Bytes.toBytes("999"),new byte[] {0, 0, 1}));
-    fuzzyList.add(new Pair<byte[], byte[]>(Bytes.toBytes("abcd"),new byte[] {1, 0, 1, 1}));
+    LinkedList<Pair<byte[], byte[]>> fuzzyList = new LinkedList<>();
+    fuzzyList.add(new Pair<>(Bytes.toBytes("999"),new byte[] {0, 0, 1}));
+    fuzzyList.add(new Pair<>(Bytes.toBytes("abcd"),new byte[] {1, 0, 1, 1}));
     FuzzyRowFilter fuzzyRowFilter = new FuzzyRowFilter(fuzzyList);
     assertTrue(fuzzyRowFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(fuzzyRowFilter))));
@@ -294,12 +294,12 @@ public class TestFilterSerialization {
   @Test
   public void testTimestampsFilter() throws Exception {
     // Empty timestamp list
-    TimestampsFilter timestampsFilter = new TimestampsFilter(new LinkedList<Long>());
+    TimestampsFilter timestampsFilter = new TimestampsFilter(new LinkedList<>());
     assertTrue(timestampsFilter.areSerializedFieldsEqual(
       ProtobufUtil.toFilter(ProtobufUtil.toFilter(timestampsFilter))));
 
     // Non-empty timestamp list
-    LinkedList<Long> list = new LinkedList<Long>();
+    LinkedList<Long> list = new LinkedList<>();
     list.add(new Long(System.currentTimeMillis()));
     list.add(new Long(System.currentTimeMillis()));
     timestampsFilter = new TimestampsFilter(list);
@@ -326,7 +326,7 @@ public class TestFilterSerialization {
 
   @Test
   public void testMultiRowRangeFilter() throws Exception {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(40), false));
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(60), true, Bytes.toBytes(70), false));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java
index 0d2940c..4b2842c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWithScanLimits.java
@@ -96,7 +96,7 @@ public class TestFilterWithScanLimits extends FilterTestingCluster {
     try {
       createTable(tableName, columnFamily);
       Table table = openTable(tableName);
-      List<Put> puts = new ArrayList<Put>();
+      List<Put> puts = new ArrayList<>();
 
       // row1 => <f1:c1, 1_c1>, <f1:c2, 1_c2>, <f1:c3, 1_c3>, <f1:c4,1_c4>,
       // <f1:c5, 1_c5>

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java
index 59873be..c4c3e36 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFilterWrapper.java
@@ -75,7 +75,7 @@ public class TestFilterWrapper {
     int row_number = 0;
     try {
       Scan scan = new Scan();
-      List<Filter> fs = new ArrayList<Filter>();
+      List<Filter> fs = new ArrayList<>();
 
       DependentColumnFilter f1 = new DependentColumnFilter(Bytes.toBytes("f1"),
           Bytes.toBytes("c5"), true, CompareFilter.CompareOp.EQUAL,
@@ -115,7 +115,7 @@ public class TestFilterWrapper {
     try {
       Table table = connection.getTable(name);
       assertTrue("Fail to create the table", admin.tableExists(name));
-      List<Put> puts = new ArrayList<Put>();
+      List<Put> puts = new ArrayList<>();
 
       // row1 => <f1:c1, 1_c1, ts=1>, <f1:c2, 1_c2, ts=2>, <f1:c3, 1_c3,ts=3>,
       // <f1:c4,1_c4, ts=4>, <f1:c5, 1_c5, ts=5>

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFirstKeyValueMatchingQualifiersFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFirstKeyValueMatchingQualifiersFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFirstKeyValueMatchingQualifiersFilter.java
index 0d045f7..dbda361 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFirstKeyValueMatchingQualifiersFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFirstKeyValueMatchingQualifiersFilter.java
@@ -45,7 +45,7 @@ public class TestFirstKeyValueMatchingQualifiersFilter extends TestCase {
    * @throws Exception
    */
   public void testFirstKeyMatchingQualifierFilter() throws Exception {
-    Set<byte[]> quals = new TreeSet<byte[]>(Bytes.BYTES_COMPARATOR);
+    Set<byte[]> quals = new TreeSet<>(Bytes.BYTES_COMPARATOR);
     quals.add(COLUMN_QUALIFIER_1);
     quals.add(COLUMN_QUALIFIER_2);
     Filter filter = new FirstKeyValueMatchingQualifiersFilter(quals);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowAndColumnRangeFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowAndColumnRangeFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowAndColumnRangeFilter.java
index 53d87d3..989a93b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowAndColumnRangeFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowAndColumnRangeFilter.java
@@ -149,7 +149,7 @@ public class TestFuzzyRowAndColumnRangeFilter {
 
     byte[] mask = new byte[] {0 , 0, 1, 1, 1, 1, 0, 0, 0, 0};
 
-    Pair<byte[], byte[]> pair = new Pair<byte[], byte[]>(fuzzyKey, mask);
+    Pair<byte[], byte[]> pair = new Pair<>(fuzzyKey, mask);
     FuzzyRowFilter fuzzyRowFilter = new FuzzyRowFilter(Lists.newArrayList(pair));
     ColumnRangeFilter columnRangeFilter = new ColumnRangeFilter(Bytes.toBytes(cqStart), true
             , Bytes.toBytes(4), true);
@@ -167,7 +167,7 @@ public class TestFuzzyRowAndColumnRangeFilter {
     scan.setFilter(filterList);
 
     ResultScanner scanner = hTable.getScanner(scan);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     Result result;
     long timeBeforeScan = System.currentTimeMillis();
     while ((result = scanner.next()) != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilterEndToEnd.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilterEndToEnd.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilterEndToEnd.java
index 21aac70..3c11efe 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilterEndToEnd.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestFuzzyRowFilterEndToEnd.java
@@ -137,10 +137,10 @@ public class TestFuzzyRowFilterEndToEnd {
 
     TEST_UTIL.flush();
 
-    List<Pair<byte[], byte[]>> data = new ArrayList<Pair<byte[], byte[]>>();
+    List<Pair<byte[], byte[]>> data = new ArrayList<>();
     byte[] fuzzyKey = Bytes.toBytesBinary("\\x9B\\x00\\x044e");
     byte[] mask = new byte[] { 0, 0, 0, 0, 0 };
-    data.add(new Pair<byte[], byte[]>(fuzzyKey, mask));
+    data.add(new Pair<>(fuzzyKey, mask));
     FuzzyRowFilter filter = new FuzzyRowFilter(data);
 
     Scan scan = new Scan();
@@ -187,10 +187,10 @@ public class TestFuzzyRowFilterEndToEnd {
 
     TEST_UTIL.flush();
 
-    List<Pair<byte[], byte[]>> data =  new ArrayList<Pair<byte[], byte[]>>();
+    List<Pair<byte[], byte[]>> data =  new ArrayList<>();
     byte[] fuzzyKey = Bytes.toBytesBinary("\\x00\\x00\\x044");
     byte[] mask = new byte[] { 1,0,0,0};
-    data.add(new Pair<byte[], byte[]>(fuzzyKey, mask));
+    data.add(new Pair<>(fuzzyKey, mask));
     FuzzyRowFilter filter = new FuzzyRowFilter(data);
     
     Scan scan = new Scan();
@@ -254,7 +254,7 @@ public class TestFuzzyRowFilterEndToEnd {
 
     byte[] mask = new byte[] { 0, 0, 1, 1, 1, 1, 0, 0, 0, 0 };
 
-    List<Pair<byte[], byte[]>> list = new ArrayList<Pair<byte[], byte[]>>();
+    List<Pair<byte[], byte[]>> list = new ArrayList<>();
     for (int i = 0; i < totalFuzzyKeys; i++) {
       byte[] fuzzyKey = new byte[10];
       ByteBuffer buf = ByteBuffer.wrap(fuzzyKey);
@@ -265,7 +265,7 @@ public class TestFuzzyRowFilterEndToEnd {
       }
       buf.putInt(i);
 
-      Pair<byte[], byte[]> pair = new Pair<byte[], byte[]>(fuzzyKey, mask);
+      Pair<byte[], byte[]> pair = new Pair<>(fuzzyKey, mask);
       list.add(pair);
     }
 
@@ -286,7 +286,7 @@ public class TestFuzzyRowFilterEndToEnd {
 
     byte[] mask = new byte[] { 0, 0, 1, 1, 1, 1, 0, 0, 0, 0 };
 
-    List<Pair<byte[], byte[]>> list = new ArrayList<Pair<byte[], byte[]>>();
+    List<Pair<byte[], byte[]>> list = new ArrayList<>();
 
     for (int i = 0; i < totalFuzzyKeys; i++) {
       byte[] fuzzyKey = new byte[10];
@@ -298,7 +298,7 @@ public class TestFuzzyRowFilterEndToEnd {
       }
       buf.putInt(i * 2);
 
-      Pair<byte[], byte[]> pair = new Pair<byte[], byte[]>(fuzzyKey, mask);
+      Pair<byte[], byte[]> pair = new Pair<>(fuzzyKey, mask);
       list.add(pair);
     }
 
@@ -325,7 +325,7 @@ public class TestFuzzyRowFilterEndToEnd {
     HRegion first = regions.get(0);
     first.getScanner(scan);
     RegionScanner scanner = first.getScanner(scan);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     // Result result;
     long timeBeforeScan = System.currentTimeMillis();
     int found = 0;
@@ -408,8 +408,8 @@ public class TestFuzzyRowFilterEndToEnd {
 
     byte[] mask2 = new byte[] { 0, 0, 0, 0, 0, 0, 1, 1, 1, 1 };
 
-    Pair<byte[], byte[]> pair1 = new Pair<byte[], byte[]>(fuzzyKey1, mask1);
-    Pair<byte[], byte[]> pair2 = new Pair<byte[], byte[]>(fuzzyKey2, mask2);
+    Pair<byte[], byte[]> pair1 = new Pair<>(fuzzyKey1, mask1);
+    Pair<byte[], byte[]> pair2 = new Pair<>(fuzzyKey2, mask2);
 
     FuzzyRowFilter fuzzyRowFilter1 = new FuzzyRowFilter(Lists.newArrayList(pair1));
     FuzzyRowFilter fuzzyRowFilter2 = new FuzzyRowFilter(Lists.newArrayList(pair2));
@@ -426,7 +426,7 @@ public class TestFuzzyRowFilterEndToEnd {
     scan.setFilter(filterList);
 
     ResultScanner scanner = hTable.getScanner(scan);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     Result result;
     long timeBeforeScan = System.currentTimeMillis();
     while ((result = scanner.next()) != null) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestInvocationRecordFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestInvocationRecordFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestInvocationRecordFilter.java
index 8291e52..159769e 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestInvocationRecordFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestInvocationRecordFilter.java
@@ -84,8 +84,8 @@ public class TestInvocationRecordFilter {
 
   @Test
   public void testFilterInvocation() throws Exception {
-    List<Integer> selectQualifiers = new ArrayList<Integer>();
-    List<Integer> expectedQualifiers = new ArrayList<Integer>();
+    List<Integer> selectQualifiers = new ArrayList<>();
+    List<Integer> expectedQualifiers = new ArrayList<>();
 
     selectQualifiers.add(-1);
     verifyInvocationResults(selectQualifiers.toArray(new Integer[selectQualifiers.size()]),
@@ -127,7 +127,7 @@ public class TestInvocationRecordFilter {
 
     get.setFilter(new InvocationRecordFilter());
 
-    List<KeyValue> expectedValues = new ArrayList<KeyValue>();
+    List<KeyValue> expectedValues = new ArrayList<>();
     for (int i = 0; i < expectedQualifiers.length; i++) {
       expectedValues.add(new KeyValue(ROW_BYTES, FAMILY_NAME_BYTES, Bytes
           .toBytes(QUALIFIER_PREFIX + expectedQualifiers[i]),
@@ -136,8 +136,8 @@ public class TestInvocationRecordFilter {
     }
 
     Scan scan = new Scan(get);
-    List<Cell> actualValues = new ArrayList<Cell>();
-    List<Cell> temp = new ArrayList<Cell>();
+    List<Cell> actualValues = new ArrayList<>();
+    List<Cell> temp = new ArrayList<>();
     InternalScanner scanner = this.region.getScanner(scan);
     while (scanner.next(temp)) {
       actualValues.addAll(temp);
@@ -161,7 +161,7 @@ public class TestInvocationRecordFilter {
    */
   private static class InvocationRecordFilter extends FilterBase {
 
-    private List<Cell> visitedKeyValues = new ArrayList<Cell>();
+    private List<Cell> visitedKeyValues = new ArrayList<>();
 
     public void reset() {
       visitedKeyValues.clear();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java
index 271edaf..0b1c368 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java
@@ -120,48 +120,48 @@ public class TestMultiRowRangeFilter {
 
   @Test
   public void testMergeAndSortWithEmptyStartRow() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(""), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(15), true, Bytes.toBytes(40), false));
     List<RowRange> actualRanges = MultiRowRangeFilter.sortAndMerge(ranges);
-    List<RowRange> expectedRanges = new ArrayList<RowRange>();
+    List<RowRange> expectedRanges = new ArrayList<>();
     expectedRanges.add(new RowRange(Bytes.toBytes(""), true, Bytes.toBytes(40), false));
     assertRangesEqual(expectedRanges, actualRanges);
   }
 
   @Test
   public void testMergeAndSortWithEmptyStopRow() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(15), true, Bytes.toBytes(""), false));
     ranges.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(70), false));
     List<RowRange> actualRanges = MultiRowRangeFilter.sortAndMerge(ranges);
-    List<RowRange> expectedRanges = new ArrayList<RowRange>();
+    List<RowRange> expectedRanges = new ArrayList<>();
     expectedRanges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(""), false));
     assertRangesEqual(expectedRanges, actualRanges);
   }
 
   @Test
   public void testMergeAndSortWithEmptyStartRowAndStopRow() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(""), true, Bytes.toBytes(""), false));
     ranges.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(70), false));
     List<RowRange> actualRanges = MultiRowRangeFilter.sortAndMerge(ranges);
-    List<RowRange> expectedRanges = new ArrayList<RowRange>();
+    List<RowRange> expectedRanges = new ArrayList<>();
     expectedRanges.add(new RowRange(Bytes.toBytes(""), true, Bytes.toBytes(""), false));
     assertRangesEqual(expectedRanges, actualRanges);
   }
 
   @Test(expected=IllegalArgumentException.class)
   public void testMultiRowRangeWithoutRange() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     new MultiRowRangeFilter(ranges);
   }
 
   @Test(expected=IllegalArgumentException.class)
   public void testMultiRowRangeWithInvalidRange() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     // the start row larger than the stop row
     ranges.add(new RowRange(Bytes.toBytes(80), true, Bytes.toBytes(20), false));
@@ -171,12 +171,12 @@ public class TestMultiRowRangeFilter {
 
   @Test
   public void testMergeAndSortWithoutOverlap() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(40), false));
     ranges.add(new RowRange(Bytes.toBytes(60), true, Bytes.toBytes(70), false));
     List<RowRange> actualRanges = MultiRowRangeFilter.sortAndMerge(ranges);
-    List<RowRange> expectedRanges = new ArrayList<RowRange>();
+    List<RowRange> expectedRanges = new ArrayList<>();
     expectedRanges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     expectedRanges.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(40), false));
     expectedRanges.add(new RowRange(Bytes.toBytes(60), true, Bytes.toBytes(70), false));
@@ -185,7 +185,7 @@ public class TestMultiRowRangeFilter {
 
   @Test
   public void testMergeAndSortWithOverlap() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(15), true, Bytes.toBytes(40), false));
     ranges.add(new RowRange(Bytes.toBytes(20), true, Bytes.toBytes(30), false));
@@ -194,7 +194,7 @@ public class TestMultiRowRangeFilter {
     ranges.add(new RowRange(Bytes.toBytes(90), true, Bytes.toBytes(100), false));
     ranges.add(new RowRange(Bytes.toBytes(95), true, Bytes.toBytes(100), false));
     List<RowRange> actualRanges = MultiRowRangeFilter.sortAndMerge(ranges);
-    List<RowRange> expectedRanges = new ArrayList<RowRange>();
+    List<RowRange> expectedRanges = new ArrayList<>();
     expectedRanges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(70), false));
     expectedRanges.add(new RowRange(Bytes.toBytes(90), true, Bytes.toBytes(100), false));
     assertRangesEqual(expectedRanges, actualRanges);
@@ -202,22 +202,22 @@ public class TestMultiRowRangeFilter {
 
   @Test
   public void testMergeAndSortWithStartRowInclusive() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(20), true, Bytes.toBytes(""), false));
     List<RowRange> actualRanges = MultiRowRangeFilter.sortAndMerge(ranges);
-    List<RowRange> expectedRanges = new ArrayList<RowRange>();
+    List<RowRange> expectedRanges = new ArrayList<>();
     expectedRanges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(""), false));
     assertRangesEqual(expectedRanges, actualRanges);
   }
 
   @Test
   public void testMergeAndSortWithRowExclusive() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(20), false, Bytes.toBytes(""), false));
     List<RowRange> actualRanges = MultiRowRangeFilter.sortAndMerge(ranges);
-    List<RowRange> expectedRanges = new ArrayList<RowRange>();
+    List<RowRange> expectedRanges = new ArrayList<>();
     expectedRanges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     expectedRanges.add(new RowRange(Bytes.toBytes(20), false, Bytes.toBytes(""), false));
     assertRangesEqual(expectedRanges, actualRanges);
@@ -225,11 +225,11 @@ public class TestMultiRowRangeFilter {
 
   @Test
   public void testMergeAndSortWithRowInclusive() throws IOException {
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), true));
     ranges.add(new RowRange(Bytes.toBytes(20), false, Bytes.toBytes(""), false));
     List<RowRange> actualRanges = MultiRowRangeFilter.sortAndMerge(ranges);
-    List<RowRange> expectedRanges = new ArrayList<RowRange>();
+    List<RowRange> expectedRanges = new ArrayList<>();
     expectedRanges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(""), false));
     assertRangesEqual(expectedRanges, actualRanges);
   }
@@ -255,7 +255,7 @@ public class TestMultiRowRangeFilter {
     Scan scan = new Scan();
     scan.setMaxVersions();
 
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(15), true, Bytes.toBytes(40), false));
     ranges.add(new RowRange(Bytes.toBytes(65), true, Bytes.toBytes(75), false));
@@ -283,7 +283,7 @@ public class TestMultiRowRangeFilter {
     Scan scan = new Scan();
     scan.setMaxVersions();
 
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(40), false));
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(60), true, Bytes.toBytes(70), false));
@@ -309,7 +309,7 @@ public class TestMultiRowRangeFilter {
     Scan scan = new Scan();
     scan.setMaxVersions();
 
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(""), true, Bytes.toBytes(10), false));
     ranges.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(40), false));
 
@@ -331,7 +331,7 @@ public class TestMultiRowRangeFilter {
     Scan scan = new Scan();
     scan.setMaxVersions();
 
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(""), false));
     ranges.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(40), false));
 
@@ -353,7 +353,7 @@ public class TestMultiRowRangeFilter {
     Scan scan = new Scan();
     scan.setMaxVersions();
 
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(20), true, Bytes.toBytes(40), false));
     ranges.add(new RowRange(Bytes.toBytes(65), true, Bytes.toBytes(75), false));
@@ -384,7 +384,7 @@ public class TestMultiRowRangeFilter {
     Scan scan = new Scan();
     scan.setMaxVersions();
 
-    List<RowRange> ranges = new ArrayList<RowRange>();
+    List<RowRange> ranges = new ArrayList<>();
     ranges.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges.add(new RowRange(Bytes.toBytes(20), false, Bytes.toBytes(40), false));
     ranges.add(new RowRange(Bytes.toBytes(65), true, Bytes.toBytes(75), false));
@@ -410,14 +410,14 @@ public class TestMultiRowRangeFilter {
     Scan scan = new Scan();
     scan.setMaxVersions();
 
-    List<RowRange> ranges1 = new ArrayList<RowRange>();
+    List<RowRange> ranges1 = new ArrayList<>();
     ranges1.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges1.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(40), false));
     ranges1.add(new RowRange(Bytes.toBytes(60), true, Bytes.toBytes(70), false));
 
     MultiRowRangeFilter filter1 = new MultiRowRangeFilter(ranges1);
 
-    List<RowRange> ranges2 = new ArrayList<RowRange>();
+    List<RowRange> ranges2 = new ArrayList<>();
     ranges2.add(new RowRange(Bytes.toBytes(20), true, Bytes.toBytes(40), false));
     ranges2.add(new RowRange(Bytes.toBytes(80), true, Bytes.toBytes(90), false));
 
@@ -445,14 +445,14 @@ public class TestMultiRowRangeFilter {
     Scan scan = new Scan();
     scan.setMaxVersions();
 
-    List<RowRange> ranges1 = new ArrayList<RowRange>();
+    List<RowRange> ranges1 = new ArrayList<>();
     ranges1.add(new RowRange(Bytes.toBytes(30), true, Bytes.toBytes(40), false));
     ranges1.add(new RowRange(Bytes.toBytes(10), true, Bytes.toBytes(20), false));
     ranges1.add(new RowRange(Bytes.toBytes(60), true, Bytes.toBytes(70), false));
 
     MultiRowRangeFilter filter1 = new MultiRowRangeFilter(ranges1);
 
-    List<RowRange> ranges2 = new ArrayList<RowRange>();
+    List<RowRange> ranges2 = new ArrayList<>();
     ranges2.add(new RowRange(Bytes.toBytes(20), true, Bytes.toBytes(40), false));
     ranges2.add(new RowRange(Bytes.toBytes(80), true, Bytes.toBytes(90), false));
 
@@ -523,7 +523,7 @@ public class TestMultiRowRangeFilter {
       scan.setStopRow(stopRow);
     }
     ResultScanner scanner = ht.getScanner(scan);
-    List<Cell> kvList = new ArrayList<Cell>();
+    List<Cell> kvList = new ArrayList<>();
     Result r;
     while ((r = scanner.next()) != null) {
       for (Cell kv : r.listCells()) {
@@ -536,7 +536,7 @@ public class TestMultiRowRangeFilter {
 
   private int getResultsSize(Table ht, Scan scan) throws IOException {
     ResultScanner scanner = ht.getScanner(scan);
-    List<Cell> results = new ArrayList<Cell>();
+    List<Cell> results = new ArrayList<>();
     Result r;
     while ((r = scanner.next()) != null) {
       for (Cell kv : r.listCells()) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
index d8df298..d30cb37 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
@@ -73,14 +73,13 @@ public class TestMultipleColumnPrefixFilter {
     List<String> columns = generateRandomWords(10000, "column");
     long maxTimestamp = 2;
 
-    List<Cell> kvList = new ArrayList<Cell>();
+    List<Cell> kvList = new ArrayList<>();
 
-    Map<String, List<Cell>> prefixMap = new HashMap<String,
-        List<Cell>>();
+    Map<String, List<Cell>> prefixMap = new HashMap<>();
 
-    prefixMap.put("p", new ArrayList<Cell>());
-    prefixMap.put("q", new ArrayList<Cell>());
-    prefixMap.put("s", new ArrayList<Cell>());
+    prefixMap.put("p", new ArrayList<>());
+    prefixMap.put("q", new ArrayList<>());
+    prefixMap.put("s", new ArrayList<>());
 
     String valueString = "ValueString";
 
@@ -112,7 +111,7 @@ public class TestMultipleColumnPrefixFilter {
     
     filter = new MultipleColumnPrefixFilter(filter_prefix);
     scan.setFilter(filter);
-    List<Cell> results = new ArrayList<Cell>();  
+    List<Cell> results = new ArrayList<>();
     InternalScanner scanner = region.getScanner(scan);
     while (scanner.next(results))
       ;
@@ -140,14 +139,13 @@ public class TestMultipleColumnPrefixFilter {
     List<String> columns = generateRandomWords(10000, "column");
     long maxTimestamp = 3;
 
-    List<Cell> kvList = new ArrayList<Cell>();
+    List<Cell> kvList = new ArrayList<>();
 
-    Map<String, List<Cell>> prefixMap = new HashMap<String,
-        List<Cell>>();
+    Map<String, List<Cell>> prefixMap = new HashMap<>();
 
-    prefixMap.put("p", new ArrayList<Cell>());
-    prefixMap.put("q", new ArrayList<Cell>());
-    prefixMap.put("s", new ArrayList<Cell>());
+    prefixMap.put("p", new ArrayList<>());
+    prefixMap.put("q", new ArrayList<>());
+    prefixMap.put("s", new ArrayList<>());
 
     String valueString = "ValueString";
 
@@ -185,7 +183,7 @@ public class TestMultipleColumnPrefixFilter {
     
     filter = new MultipleColumnPrefixFilter(filter_prefix);
     scan.setFilter(filter);
-    List<Cell> results = new ArrayList<Cell>();  
+    List<Cell> results = new ArrayList<>();
     InternalScanner scanner = region.getScanner(scan);
     while (scanner.next(results))
       ;
@@ -230,7 +228,7 @@ public class TestMultipleColumnPrefixFilter {
  
     multiplePrefixFilter = new MultipleColumnPrefixFilter(filter_prefix);
     scan1.setFilter(multiplePrefixFilter);
-    List<Cell> results1 = new ArrayList<Cell>();  
+    List<Cell> results1 = new ArrayList<>();
     InternalScanner scanner1 = region.getScanner(scan1);
     while (scanner1.next(results1))
       ;
@@ -241,7 +239,7 @@ public class TestMultipleColumnPrefixFilter {
     singlePrefixFilter = new ColumnPrefixFilter(Bytes.toBytes("p"));
  
     scan2.setFilter(singlePrefixFilter);
-    List<Cell> results2 = new ArrayList<Cell>();  
+    List<Cell> results2 = new ArrayList<>();
     InternalScanner scanner2 = region.getScanner(scan1);
     while (scanner2.next(results2))
       ;
@@ -252,7 +250,7 @@ public class TestMultipleColumnPrefixFilter {
   }
   
   List<String> generateRandomWords(int numberOfWords, String suffix) {
-    Set<String> wordSet = new HashSet<String>();
+    Set<String> wordSet = new HashSet<>();
     for (int i = 0; i < numberOfWords; i++) {
       int lengthOfWords = (int) (Math.random()*2) + 1;
       char[] wordChar = new char[lengthOfWords];
@@ -267,7 +265,7 @@ public class TestMultipleColumnPrefixFilter {
       }
       wordSet.add(word);
     }
-    List<String> wordList = new ArrayList<String>(wordSet);
+    List<String> wordList = new ArrayList<>(wordSet);
     return wordList;
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
index e23a394..0ef3ea7 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
@@ -58,7 +58,7 @@ public class TestSingleColumnValueExcludeFilter {
         CompareOp.EQUAL, VAL_1);
 
     // A 'match' situation
-    List<Cell> kvs = new ArrayList<Cell>();
+    List<Cell> kvs = new ArrayList<>();
     KeyValue kv = new KeyValue(ROW, COLUMN_FAMILY, COLUMN_QUALIFIER_2, VAL_1);
 
     kvs.add (new KeyValue(ROW, COLUMN_FAMILY, COLUMN_QUALIFIER_2, VAL_1));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestGlobalFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestGlobalFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestGlobalFilter.java
index 0165b3d..acfe929 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestGlobalFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestGlobalFilter.java
@@ -45,7 +45,7 @@ import org.junit.experimental.categories.Category;
 @Category({MiscTests.class, SmallTests.class})
 public class TestGlobalFilter extends HttpServerFunctionalTest {
   private static final Log LOG = LogFactory.getLog(HttpServer.class);
-  static final Set<String> RECORDS = new TreeSet<String>(); 
+  static final Set<String> RECORDS = new TreeSet<>();
 
   /** A very simple filter that records accessed uri's */
   static public class RecordingFilter implements Filter {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java
index 3b9e852..31b5b8d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestHttpServer.java
@@ -84,7 +84,7 @@ public class TestHttpServer extends HttpServerFunctionalTest {
                       ) throws ServletException, IOException {
       PrintWriter out = response.getWriter();
       Map<String, String[]> params = request.getParameterMap();
-      SortedSet<String> keys = new TreeSet<String>(params.keySet());
+      SortedSet<String> keys = new TreeSet<>(params.keySet());
       for(String key: keys) {
         out.print(key);
         out.print(':');
@@ -109,7 +109,7 @@ public class TestHttpServer extends HttpServerFunctionalTest {
                       HttpServletResponse response
                       ) throws ServletException, IOException {
       PrintWriter out = response.getWriter();
-      SortedSet<String> sortedKeys = new TreeSet<String>();
+      SortedSet<String> sortedKeys = new TreeSet<>();
       Enumeration<String> keys = request.getParameterNames();
       while(keys.hasMoreElements()) {
         sortedKeys.add(keys.nextElement());
@@ -335,7 +335,7 @@ public class TestHttpServer extends HttpServerFunctionalTest {
    * Custom user->group mapping service.
    */
   public static class MyGroupsProvider extends ShellBasedUnixGroupsMapping {
-    static Map<String, List<String>> mapping = new HashMap<String, List<String>>();
+    static Map<String, List<String>> mapping = new HashMap<>();
 
     static void clearMapping() {
       mapping.clear();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestPathFilter.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestPathFilter.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestPathFilter.java
index 33618ad..3c2de53 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestPathFilter.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/TestPathFilter.java
@@ -45,7 +45,7 @@ import org.junit.experimental.categories.Category;
 @Category({MiscTests.class, SmallTests.class})
 public class TestPathFilter extends HttpServerFunctionalTest {
   private static final Log LOG = LogFactory.getLog(HttpServer.class);
-  static final Set<String> RECORDS = new TreeSet<String>(); 
+  static final Set<String> RECORDS = new TreeSet<>();
 
   /** A very simple filter that records accessed uri's */
   static public class RecordingFilter implements Filter {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/http/resource/JerseyResource.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/resource/JerseyResource.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/resource/JerseyResource.java
index da9519e..bf0e609 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/resource/JerseyResource.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/resource/JerseyResource.java
@@ -55,7 +55,7 @@ public class JerseyResource {
       ) throws IOException {
     LOG.info("get: " + PATH + "=" + path + ", " + OP + "=" + op);
 
-    final Map<String, Object> m = new TreeMap<String, Object>();
+    final Map<String, Object> m = new TreeMap<>();
     m.put(PATH, path);
     m.put(OP, op);
     final String js = JSON.toString(m);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java
index 8668738..234bd7a 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/http/ssl/KeyStoreTestUtil.java
@@ -206,7 +206,7 @@ public class KeyStoreTestUtil {
     File sslClientConfFile = new File(sslConfDir + "/ssl-client.xml");
     File sslServerConfFile = new File(sslConfDir + "/ssl-server.xml");
 
-    Map<String, X509Certificate> certs = new HashMap<String, X509Certificate>();
+    Map<String, X509Certificate> certs = new HashMap<>();
 
     if (useClientCert) {
       KeyPair cKP = KeyStoreTestUtil.generateKeyPair("RSA");

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java
index 0da685f..8ee7d3d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java
@@ -126,7 +126,7 @@ public class TestFileLink {
 
     writeSomeData(fs, originalPath, 256 << 20, (byte)2);
 
-    List<Path> files = new ArrayList<Path>();
+    List<Path> files = new ArrayList<>();
     files.add(originalPath);
     files.add(archivedPath);
 
@@ -194,7 +194,7 @@ public class TestFileLink {
     assertEquals("hdfs", fs.getUri().getScheme());
 
     try {
-      List<Path> files = new ArrayList<Path>();
+      List<Path> files = new ArrayList<>();
       for (int i = 0; i < 3; i++) {
         Path path = new Path(String.format("test-data-%d", i));
         writeSomeData(fs, path, 1 << 20, (byte)i);

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java
index 0e5f08e..6a0921f 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java
@@ -241,7 +241,7 @@ public class TestHalfStoreFileReader {
   }
 
   List<KeyValue> genSomeKeys() {
-    List<KeyValue> ret = new ArrayList<KeyValue>(SIZE);
+    List<KeyValue> ret = new ArrayList<>(SIZE);
     for (int i = 0; i < SIZE; i++) {
       KeyValue kv =
           new KeyValue(

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestBufferedDataBlockEncoder.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestBufferedDataBlockEncoder.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestBufferedDataBlockEncoder.java
index d31af31..7e14228 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestBufferedDataBlockEncoder.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestBufferedDataBlockEncoder.java
@@ -59,7 +59,7 @@ public class TestBufferedDataBlockEncoder {
   @Test
   public void testEnsureSpaceForKey() {
     BufferedDataBlockEncoder.SeekerState state = new BufferedDataBlockEncoder.SeekerState(
-        new ObjectIntPair<ByteBuffer>(), false);
+        new ObjectIntPair<>(), false);
     for (int i = 1; i <= 65536; ++i) {
       state.keyLength = i;
       state.ensureSpaceForKey();

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
index a2cd50c..97f74af 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
@@ -77,8 +77,7 @@ public class TestChangingEncoding {
       createEncodingsToIterate();
 
   private static final List<DataBlockEncoding> createEncodingsToIterate() {
-    List<DataBlockEncoding> encodings = new ArrayList<DataBlockEncoding>(
-        Arrays.asList(DataBlockEncoding.values()));
+    List<DataBlockEncoding> encodings = new ArrayList<>(Arrays.asList(DataBlockEncoding.values()));
     encodings.add(DataBlockEncoding.NONE);
     return Collections.unmodifiableList(encodings);
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
index 66fee6a..dc15bf5 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
@@ -124,7 +124,7 @@ public class TestDataBlockEncoders {
    */
   @Test
   public void testEmptyKeyValues() throws IOException {
-    List<KeyValue> kvList = new ArrayList<KeyValue>();
+    List<KeyValue> kvList = new ArrayList<>();
     byte[] row = new byte[0];
     byte[] family = new byte[0];
     byte[] qualifier = new byte[0];
@@ -151,7 +151,7 @@ public class TestDataBlockEncoders {
    */
   @Test
   public void testNegativeTimestamps() throws IOException {
-    List<KeyValue> kvList = new ArrayList<KeyValue>();
+    List<KeyValue> kvList = new ArrayList<>();
     byte[] row = new byte[0];
     byte[] family = new byte[0];
     byte[] qualifier = new byte[0];
@@ -190,8 +190,7 @@ public class TestDataBlockEncoders {
     List<KeyValue> sampleKv = generator.generateTestKeyValues(NUMBER_OF_KV, includesTags);
 
     // create all seekers
-    List<DataBlockEncoder.EncodedSeeker> encodedSeekers = 
-        new ArrayList<DataBlockEncoder.EncodedSeeker>();
+    List<DataBlockEncoder.EncodedSeeker> encodedSeekers = new ArrayList<>();
     for (DataBlockEncoding encoding : DataBlockEncoding.values()) {
       LOG.info("Encoding: " + encoding);
       // Off heap block data support not added for PREFIX_TREE DBE yet.
@@ -403,7 +402,7 @@ public class TestDataBlockEncoders {
   
   @Test
   public void testZeroByte() throws IOException {
-    List<KeyValue> kvList = new ArrayList<KeyValue>();
+    List<KeyValue> kvList = new ArrayList<>();
     byte[] row = Bytes.toBytes("abcd");
     byte[] family = new byte[] { 'f' };
     byte[] qualifier0 = new byte[] { 'b' };

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
index 0869df6..1b5c630 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestEncodedSeekers.java
@@ -81,7 +81,7 @@ public class TestEncodedSeekers {
 
   @Parameters
   public static Collection<Object[]> parameters() {
-    List<Object[]> paramList = new ArrayList<Object[]>();
+    List<Object[]> paramList = new ArrayList<>();
     for (DataBlockEncoding encoding : DataBlockEncoding.values()) {
       for (boolean includeTags : new boolean[] { false, true }) {
         for (boolean compressTags : new boolean[] { false, true }) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTree.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTree.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTree.java
index e31a73b..6b13899 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTree.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTree.java
@@ -114,7 +114,7 @@ public class TestPrefixTree {
     scan.setStopRow(Bytes.toBytes("a-b-A-1:"));
 
     RegionScanner scanner = region.getScanner(scan);
-    List<Cell> cells = new ArrayList<Cell>();
+    List<Cell> cells = new ArrayList<>();
     for (int i = 0; i < 3; i++) {
       assertEquals(i < 2, scanner.next(cells));
       CellScanner cellScanner = Result.create(cells).cellScanner();
@@ -184,7 +184,7 @@ public class TestPrefixTree {
     region.flush(true);
     Scan scan = new Scan(Bytes.toBytes("obj29995"));
     RegionScanner scanner = region.getScanner(scan);
-    List<Cell> cells = new ArrayList<Cell>();
+    List<Cell> cells = new ArrayList<>();
     assertFalse(scanner.next(cells));
     assertArrayEquals(Bytes.toBytes("obj3"), Result.create(cells).getRow());
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTreeEncoding.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTreeEncoding.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTreeEncoding.java
index fd9b90b..decd39d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTreeEncoding.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestPrefixTreeEncoding.java
@@ -73,14 +73,13 @@ public class TestPrefixTreeEncoding {
   private static final int NUM_COLS_PER_ROW = 20;
 
   private int numBatchesWritten = 0;
-  private ConcurrentSkipListSet<Cell> kvset = new ConcurrentSkipListSet<Cell>(
-      CellComparator.COMPARATOR);
+  private ConcurrentSkipListSet<Cell> kvset = new ConcurrentSkipListSet<>(CellComparator.COMPARATOR);
 
   private static boolean formatRowNum = false;
 
   @Parameters
   public static Collection<Object[]> parameters() {
-    List<Object[]> paramList = new ArrayList<Object[]>();
+    List<Object[]> paramList = new ArrayList<>();
     {
       paramList.add(new Object[] { false });
       paramList.add(new Object[] { true });
@@ -228,7 +227,7 @@ public class TestPrefixTreeEncoding {
 
   private void verifySeeking(EncodedSeeker encodeSeeker,
       ByteBuffer encodedData, int batchId) {
-    List<KeyValue> kvList = new ArrayList<KeyValue>();
+    List<KeyValue> kvList = new ArrayList<>();
     for (int i = 0; i < NUM_ROWS_PER_BATCH; ++i) {
       kvList.clear();
       encodeSeeker.setCurrentBuffer(new SingleByteBuff(encodedData));

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekBeforeWithReverseScan.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekBeforeWithReverseScan.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekBeforeWithReverseScan.java
index 2826694..3bf189d 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekBeforeWithReverseScan.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekBeforeWithReverseScan.java
@@ -92,7 +92,7 @@ public class TestSeekBeforeWithReverseScan {
     scan.setFilter(new FirstKeyOnlyFilter());
     scan.addFamily(cfName);
     RegionScanner scanner = region.getScanner(scan);
-    List<Cell> res = new ArrayList<Cell>();
+    List<Cell> res = new ArrayList<>();
     int count = 1;
     while (scanner.next(res)) {
       count++;
@@ -130,7 +130,7 @@ public class TestSeekBeforeWithReverseScan {
     scan.setFilter(new FirstKeyOnlyFilter());
     scan.addFamily(cfName);
     RegionScanner scanner = region.getScanner(scan);
-    List<Cell> res = new ArrayList<Cell>();
+    List<Cell> res = new ArrayList<>();
     int count = 1;
     while (scanner.next(res)) {
       count++;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekToBlockWithEncoders.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekToBlockWithEncoders.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekToBlockWithEncoders.java
index 46cc9f9..cc70dc1 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekToBlockWithEncoders.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestSeekToBlockWithEncoders.java
@@ -63,7 +63,7 @@ public class TestSeekToBlockWithEncoders {
    */
   @Test
   public void testSeekToBlockWithNonMatchingSeekKey() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("f1"), Bytes.toBytes("q1"),
         Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -89,7 +89,7 @@ public class TestSeekToBlockWithEncoders {
    */
   @Test
   public void testSeekingToBlockWithBiggerNonLength1() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("f1"), Bytes.toBytes("q1"),
         Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -115,7 +115,7 @@ public class TestSeekToBlockWithEncoders {
    */
   @Test
   public void testSeekingToBlockToANotAvailableKey() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("f1"), Bytes.toBytes("q1"),
         Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -141,7 +141,7 @@ public class TestSeekToBlockWithEncoders {
    */
   @Test
   public void testSeekToBlockWithDecreasingCommonPrefix() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("row10aaa"), Bytes.toBytes("f1"),
         Bytes.toBytes("q1"), Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -160,7 +160,7 @@ public class TestSeekToBlockWithEncoders {
 
   @Test
   public void testSeekToBlockWithDiffQualifer() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("f1"), Bytes.toBytes("q1"),
         Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -180,7 +180,7 @@ public class TestSeekToBlockWithEncoders {
 
   @Test
   public void testSeekToBlockWithDiffQualiferOnSameRow() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("f1"), Bytes.toBytes("q1"),
         Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -203,7 +203,7 @@ public class TestSeekToBlockWithEncoders {
 
   @Test
   public void testSeekToBlockWithDiffQualiferOnSameRow1() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("f1"), Bytes.toBytes("q1"),
         Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -226,7 +226,7 @@ public class TestSeekToBlockWithEncoders {
 
   @Test
   public void testSeekToBlockWithDiffQualiferOnSameRowButDescendingInSize() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("f1"), Bytes.toBytes("qual1"),
         Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -249,7 +249,7 @@ public class TestSeekToBlockWithEncoders {
 
   @Test
   public void testSeekToBlockWithDiffFamilyAndQualifer() throws IOException {
-    List<KeyValue> sampleKv = new ArrayList<KeyValue>();
+    List<KeyValue> sampleKv = new ArrayList<>();
     KeyValue kv1 = new KeyValue(Bytes.toBytes("aaa"), Bytes.toBytes("fam1"), Bytes.toBytes("q1"),
         Bytes.toBytes("val"));
     sampleKv.add(kv1);
@@ -270,7 +270,7 @@ public class TestSeekToBlockWithEncoders {
   private void seekToTheKey(KeyValue expected, List<KeyValue> kvs, Cell toSeek)
       throws IOException {
     // create all seekers
-    List<DataBlockEncoder.EncodedSeeker> encodedSeekers = new ArrayList<DataBlockEncoder.EncodedSeeker>();
+    List<DataBlockEncoder.EncodedSeeker> encodedSeekers = new ArrayList<>();
     for (DataBlockEncoding encoding : DataBlockEncoding.values()) {
       if (encoding.getEncoder() == null || encoding == DataBlockEncoding.PREFIX_TREE) {
         continue;

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java
index bd3f4c7..8d94766 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/CacheTestUtils.java
@@ -77,7 +77,7 @@ public class CacheTestUtils {
         conf);
 
     final AtomicInteger totalQueries = new AtomicInteger();
-    final ConcurrentLinkedQueue<HFileBlockPair> blocksToTest = new ConcurrentLinkedQueue<HFileBlockPair>();
+    final ConcurrentLinkedQueue<HFileBlockPair> blocksToTest = new ConcurrentLinkedQueue<>();
     final AtomicInteger hits = new AtomicInteger();
     final AtomicInteger miss = new AtomicInteger();
 
@@ -344,7 +344,7 @@ public class CacheTestUtils {
   public static HFileBlockPair[] generateHFileBlocks(int blockSize, int numBlocks) {
     HFileBlockPair[] returnedBlocks = new HFileBlockPair[numBlocks];
     Random rand = new Random();
-    HashSet<String> usedStrings = new HashSet<String>();
+    HashSet<String> usedStrings = new HashSet<>();
     for (int i = 0; i < numBlocks; i++) {
       ByteBuffer cachedBuffer = ByteBuffer.allocate(blockSize);
       rand.nextBytes(cachedBuffer.array());


Mime
View raw message