hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From syuanji...@apache.org
Subject [09/50] [abbrv] hbase git commit: HBASE-17532 Replaced explicit type with diamond operator
Date Fri, 10 Mar 2017 22:09:49 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
index 3fe8537..db5bdf2 100644
--- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
+++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java
@@ -195,7 +195,7 @@ public class TestThriftHBaseServiceHandler {
     TGet get = new TGet(wrap(rowName));
     assertFalse(handler.exists(table, get));
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(2);
+    List<TColumnValue> columnValues = new ArrayList<>(2);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)));
     columnValues.add(new TColumnValue(wrap(familyBname), wrap(qualifierBname), wrap(valueBname)));
     TPut put = new TPut(wrap(rowName), columnValues);
@@ -240,7 +240,7 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName = "testPutGet".getBytes();
     ByteBuffer table = wrap(tableAname);
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(2);
+    List<TColumnValue> columnValues = new ArrayList<>(2);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)));
     columnValues.add(new TColumnValue(wrap(familyBname), wrap(qualifierBname), wrap(valueBname)));
     TPut put = new TPut(wrap(rowName), columnValues);
@@ -264,16 +264,16 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName1 = "testPutGetMultiple1".getBytes();
     byte[] rowName2 = "testPutGetMultiple2".getBytes();
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(2);
+    List<TColumnValue> columnValues = new ArrayList<>(2);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)));
     columnValues.add(new TColumnValue(wrap(familyBname), wrap(qualifierBname), wrap(valueBname)));
-    List<TPut> puts = new ArrayList<TPut>(2);
+    List<TPut> puts = new ArrayList<>(2);
     puts.add(new TPut(wrap(rowName1), columnValues));
     puts.add(new TPut(wrap(rowName2), columnValues));
 
     handler.putMultiple(table, puts);
 
-    List<TGet> gets = new ArrayList<TGet>(2);
+    List<TGet> gets = new ArrayList<>(2);
     gets.add(new TGet(wrap(rowName1)));
     gets.add(new TGet(wrap(rowName2)));
 
@@ -294,16 +294,16 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName1 = "testDeleteMultiple1".getBytes();
     byte[] rowName2 = "testDeleteMultiple2".getBytes();
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(2);
+    List<TColumnValue> columnValues = new ArrayList<>(2);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)));
     columnValues.add(new TColumnValue(wrap(familyBname), wrap(qualifierBname), wrap(valueBname)));
-    List<TPut> puts = new ArrayList<TPut>(2);
+    List<TPut> puts = new ArrayList<>(2);
     puts.add(new TPut(wrap(rowName1), columnValues));
     puts.add(new TPut(wrap(rowName2), columnValues));
 
     handler.putMultiple(table, puts);
 
-    List<TDelete> deletes = new ArrayList<TDelete>(2);
+    List<TDelete> deletes = new ArrayList<>(2);
     deletes.add(new TDelete(wrap(rowName1)));
     deletes.add(new TDelete(wrap(rowName2)));
 
@@ -321,7 +321,7 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName = "testDelete".getBytes();
     ByteBuffer table = wrap(tableAname);
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(2);
+    List<TColumnValue> columnValues = new ArrayList<>(2);
     TColumnValue columnValueA = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname));
     TColumnValue columnValueB = new TColumnValue(wrap(familyBname), wrap(qualifierBname),
@@ -335,7 +335,7 @@ public class TestThriftHBaseServiceHandler {
     handler.put(table, put);
 
     TDelete delete = new TDelete(wrap(rowName));
-    List<TColumn> deleteColumns = new ArrayList<TColumn>(1);
+    List<TColumn> deleteColumns = new ArrayList<>(1);
     TColumn deleteColumn = new TColumn(wrap(familyAname));
     deleteColumn.setQualifier(qualifierAname);
     deleteColumns.add(deleteColumn);
@@ -347,7 +347,7 @@ public class TestThriftHBaseServiceHandler {
     TResult result = handler.get(table, get);
     assertArrayEquals(rowName, result.getRow());
     List<TColumnValue> returnedColumnValues = result.getColumnValues();
-    List<TColumnValue> expectedColumnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> expectedColumnValues = new ArrayList<>(1);
     expectedColumnValues.add(columnValueB);
     assertTColumnValuesEqual(expectedColumnValues, returnedColumnValues);
   }
@@ -358,7 +358,7 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName = "testDeleteAllTimestamps".getBytes();
     ByteBuffer table = wrap(tableAname);
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     TColumnValue columnValueA = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname));
     columnValueA.setTimestamp(System.currentTimeMillis() - 10);
@@ -377,7 +377,7 @@ public class TestThriftHBaseServiceHandler {
     assertEquals(2, result.getColumnValuesSize());
 
     TDelete delete = new TDelete(wrap(rowName));
-    List<TColumn> deleteColumns = new ArrayList<TColumn>(1);
+    List<TColumn> deleteColumns = new ArrayList<>(1);
     TColumn deleteColumn = new TColumn(wrap(familyAname));
     deleteColumn.setQualifier(qualifierAname);
     deleteColumns.add(deleteColumn);
@@ -401,7 +401,7 @@ public class TestThriftHBaseServiceHandler {
     long timestamp1 = System.currentTimeMillis() - 10;
     long timestamp2 = System.currentTimeMillis();
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     TColumnValue columnValueA = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname));
     columnValueA.setTimestamp(timestamp1);
@@ -420,7 +420,7 @@ public class TestThriftHBaseServiceHandler {
     assertEquals(2, result.getColumnValuesSize());
 
     TDelete delete = new TDelete(wrap(rowName));
-    List<TColumn> deleteColumns = new ArrayList<TColumn>(1);
+    List<TColumn> deleteColumns = new ArrayList<>(1);
     TColumn deleteColumn = new TColumn(wrap(familyAname));
     deleteColumn.setQualifier(qualifierAname);
     deleteColumns.add(deleteColumn);
@@ -443,14 +443,14 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName = "testIncrement".getBytes();
     ByteBuffer table = wrap(tableAname);
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(Bytes.toBytes(1L))));
     TPut put = new TPut(wrap(rowName), columnValues);
     put.setColumnValues(columnValues);
     handler.put(table, put);
 
-    List<TColumnIncrement> incrementColumns = new ArrayList<TColumnIncrement>(1);
+    List<TColumnIncrement> incrementColumns = new ArrayList<>(1);
     incrementColumns.add(new TColumnIncrement(wrap(familyAname), wrap(qualifierAname)));
     TIncrement increment = new TIncrement(wrap(rowName), incrementColumns);
     handler.increment(table, increment);
@@ -471,13 +471,13 @@ public class TestThriftHBaseServiceHandler {
     ByteBuffer table = wrap(tableAname);
     byte[] v1 = Bytes.toBytes("42");
     byte[] v2 = Bytes.toBytes("23");
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(v1)));
     TPut put = new TPut(wrap(rowName), columnValues);
     put.setColumnValues(columnValues);
     handler.put(table, put);
 
-    List<TColumnValue> appendColumns = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> appendColumns = new ArrayList<>(1);
     appendColumns.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(v2)));
     TAppend append = new TAppend(wrap(rowName), appendColumns);
     handler.append(table, append);
@@ -503,14 +503,14 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName = "testCheckAndPut".getBytes();
     ByteBuffer table = wrap(tableAname);
 
-    List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValuesA = new ArrayList<>(1);
     TColumnValue columnValueA = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname));
     columnValuesA.add(columnValueA);
     TPut putA = new TPut(wrap(rowName), columnValuesA);
     putA.setColumnValues(columnValuesA);
 
-    List<TColumnValue> columnValuesB = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValuesB = new ArrayList<>(1);
     TColumnValue columnValueB = new TColumnValue(wrap(familyBname), wrap(qualifierBname),
       wrap(valueBname));
     columnValuesB.add(columnValueB);
@@ -532,7 +532,7 @@ public class TestThriftHBaseServiceHandler {
     result = handler.get(table, get);
     assertArrayEquals(rowName, result.getRow());
     List<TColumnValue> returnedColumnValues = result.getColumnValues();
-    List<TColumnValue> expectedColumnValues = new ArrayList<TColumnValue>(2);
+    List<TColumnValue> expectedColumnValues = new ArrayList<>(2);
     expectedColumnValues.add(columnValueA);
     expectedColumnValues.add(columnValueB);
     assertTColumnValuesEqual(expectedColumnValues, returnedColumnValues);
@@ -550,14 +550,14 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName = "testCheckAndDelete".getBytes();
     ByteBuffer table = wrap(tableAname);
 
-    List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValuesA = new ArrayList<>(1);
     TColumnValue columnValueA = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname));
     columnValuesA.add(columnValueA);
     TPut putA = new TPut(wrap(rowName), columnValuesA);
     putA.setColumnValues(columnValuesA);
 
-    List<TColumnValue> columnValuesB = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValuesB = new ArrayList<>(1);
     TColumnValue columnValueB = new TColumnValue(wrap(familyBname), wrap(qualifierBname),
       wrap(valueBname));
     columnValuesB.add(columnValueB);
@@ -595,7 +595,7 @@ public class TestThriftHBaseServiceHandler {
     // insert data
     TColumnValue columnValue = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname));
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(columnValue);
     for (int i = 0; i < 10; i++) {
       TPut put = new TPut(wrap(("testScan" + i).getBytes()), columnValues);
@@ -604,7 +604,7 @@ public class TestThriftHBaseServiceHandler {
 
     // create scan instance
     TScan scan = new TScan();
-    List<TColumn> columns = new ArrayList<TColumn>(1);
+    List<TColumn> columns = new ArrayList<>(1);
     TColumn column = new TColumn();
     column.setFamily(familyAname);
     column.setQualifier(qualifierAname);
@@ -656,7 +656,7 @@ public class TestThriftHBaseServiceHandler {
     // insert data
     TColumnValue columnValue = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
         wrap(valueAname));
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(columnValue);
     for (int i = 0; i < numTrials; i++) {
       TPut put = new TPut(wrap(("testScan" + i).getBytes()), columnValues);
@@ -665,7 +665,7 @@ public class TestThriftHBaseServiceHandler {
 
     // create scan instance
     TScan scan = new TScan();
-    List<TColumn> columns = new ArrayList<TColumn>(1);
+    List<TColumn> columns = new ArrayList<>(1);
     TColumn column = new TColumn();
     column.setFamily(familyAname);
     column.setQualifier(qualifierAname);
@@ -694,7 +694,7 @@ public class TestThriftHBaseServiceHandler {
     // insert data
     TColumnValue columnValue = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname));
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(columnValue);
     for (int i = 0; i < 10; i++) {
       TPut put = new TPut(wrap(("testReverseScan" + i).getBytes()), columnValues);
@@ -704,7 +704,7 @@ public class TestThriftHBaseServiceHandler {
     // create reverse scan instance
     TScan scan = new TScan();
     scan.setReversed(true);
-    List<TColumn> columns = new ArrayList<TColumn>(1);
+    List<TColumn> columns = new ArrayList<>(1);
     TColumn column = new TColumn();
     column.setFamily(familyAname);
     column.setQualifier(qualifierAname);
@@ -743,7 +743,7 @@ public class TestThriftHBaseServiceHandler {
     // insert data
     TColumnValue columnValue = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname));
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(columnValue);
     for (int i = 0; i < 10; i++) {
       TPut put = new TPut(wrap(("testScanWithFilter" + i).getBytes()), columnValues);
@@ -752,7 +752,7 @@ public class TestThriftHBaseServiceHandler {
 
     // create scan instance with filter
     TScan scan = new TScan();
-    List<TColumn> columns = new ArrayList<TColumn>(1);
+    List<TColumn> columns = new ArrayList<>(1);
     TColumn column = new TColumn();
     column.setFamily(familyAname);
     column.setQualifier(qualifierAname);
@@ -792,7 +792,7 @@ public class TestThriftHBaseServiceHandler {
     ThriftHBaseServiceHandler handler = createHandler();
     byte[] rowName = "testPutTTL".getBytes();
     ByteBuffer table = wrap(tableAname);
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
 
     // Add some dummy data
     columnValues.add(
@@ -856,7 +856,7 @@ public class TestThriftHBaseServiceHandler {
     ByteBuffer table = wrap(tableAname);
 
     // insert data
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(100);
+    List<TColumnValue> columnValues = new ArrayList<>(100);
     for (int i = 0; i < 100; i++) {
       String colNum = pad(i, (byte) 3);
       TColumnValue columnValue = new TColumnValue(wrap(familyAname),
@@ -868,7 +868,7 @@ public class TestThriftHBaseServiceHandler {
 
     // create scan instance
     TScan scan = new TScan();
-    List<TColumn> columns = new ArrayList<TColumn>(1);
+    List<TColumn> columns = new ArrayList<>(1);
     TColumn column = new TColumn();
     column.setFamily(familyAname);
     columns.add(column);
@@ -917,7 +917,7 @@ public class TestThriftHBaseServiceHandler {
     // insert data
     TColumnValue columnValue =
         new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname));
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(columnValue);
     for (int i = 0; i < 20; i++) {
       TPut put =
@@ -927,7 +927,7 @@ public class TestThriftHBaseServiceHandler {
 
     // create scan instance
     TScan scan = new TScan();
-    List<TColumn> columns = new ArrayList<TColumn>(1);
+    List<TColumn> columns = new ArrayList<>(1);
     TColumn column = new TColumn();
     column.setFamily(familyAname);
     column.setQualifier(qualifierAname);
@@ -1002,7 +1002,7 @@ public class TestThriftHBaseServiceHandler {
     TGet get = new TGet(wrap(rowName));
     assertFalse(handler.exists(table, get));
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(2);
+    List<TColumnValue> columnValues = new ArrayList<>(2);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)));
     columnValues.add(new TColumnValue(wrap(familyBname), wrap(qualifierBname),  wrap(valueBname)));
     TPut put = new TPut(wrap(rowName), columnValues);
@@ -1144,7 +1144,7 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName = "testAttribute".getBytes();
     byte[] attributeKey = "attribute1".getBytes();
     byte[] attributeValue = "value1".getBytes();
-    Map<ByteBuffer, ByteBuffer> attributes = new HashMap<ByteBuffer, ByteBuffer>();
+    Map<ByteBuffer, ByteBuffer> attributes = new HashMap<>();
     attributes.put(wrap(attributeKey), wrap(attributeValue));
 
     TGet tGet = new TGet(wrap(rowName));
@@ -1152,7 +1152,7 @@ public class TestThriftHBaseServiceHandler {
     Get get = getFromThrift(tGet);
     assertArrayEquals(get.getAttribute("attribute1"), attributeValue);
 
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)));
     TPut tPut = new TPut(wrap(rowName) , columnValues);
     tPut.setAttributes(attributes);
@@ -1164,7 +1164,7 @@ public class TestThriftHBaseServiceHandler {
     Scan scan = scanFromThrift(tScan);
     assertArrayEquals(scan.getAttribute("attribute1"), attributeValue);
 
-    List<TColumnIncrement> incrementColumns = new ArrayList<TColumnIncrement>(1);
+    List<TColumnIncrement> incrementColumns = new ArrayList<>(1);
     incrementColumns.add(new TColumnIncrement(wrap(familyAname), wrap(qualifierAname)));
     TIncrement tIncrement = new TIncrement(wrap(rowName), incrementColumns);
     tIncrement.setAttributes(attributes);
@@ -1189,7 +1189,7 @@ public class TestThriftHBaseServiceHandler {
     byte[] rowName = "testMutateRow".getBytes();
     ByteBuffer table = wrap(tableAname);
 
-    List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValuesA = new ArrayList<>(1);
     TColumnValue columnValueA = new TColumnValue(wrap(familyAname), wrap(qualifierAname),
         wrap(valueAname));
     columnValuesA.add(columnValueA);
@@ -1203,11 +1203,11 @@ public class TestThriftHBaseServiceHandler {
     assertArrayEquals(rowName, result.getRow());
     List<TColumnValue> returnedColumnValues = result.getColumnValues();
 
-    List<TColumnValue> expectedColumnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> expectedColumnValues = new ArrayList<>(1);
     expectedColumnValues.add(columnValueA);
     assertTColumnValuesEqual(expectedColumnValues, returnedColumnValues);
 
-    List<TColumnValue> columnValuesB = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValuesB = new ArrayList<>(1);
     TColumnValue columnValueB = new TColumnValue(wrap(familyAname), wrap(qualifierBname),
         wrap(valueBname));
     columnValuesB.add(columnValueB);
@@ -1215,13 +1215,13 @@ public class TestThriftHBaseServiceHandler {
     putB.setColumnValues(columnValuesB);
 
     TDelete delete = new TDelete(wrap(rowName));
-    List<TColumn> deleteColumns = new ArrayList<TColumn>(1);
+    List<TColumn> deleteColumns = new ArrayList<>(1);
     TColumn deleteColumn = new TColumn(wrap(familyAname));
     deleteColumn.setQualifier(qualifierAname);
     deleteColumns.add(deleteColumn);
     delete.setColumns(deleteColumns);
 
-    List<TMutation> mutations = new ArrayList<TMutation>(2);
+    List<TMutation> mutations = new ArrayList<>(2);
     TMutation mutationA = TMutation.put(putB);
     mutations.add(mutationA);
 
@@ -1235,7 +1235,7 @@ public class TestThriftHBaseServiceHandler {
     assertArrayEquals(rowName, result.getRow());
     returnedColumnValues = result.getColumnValues();
 
-    expectedColumnValues = new ArrayList<TColumnValue>(1);
+    expectedColumnValues = new ArrayList<>(1);
     expectedColumnValues.add(columnValueB);
     assertTColumnValuesEqual(expectedColumnValues, returnedColumnValues);
   }
@@ -1250,10 +1250,10 @@ public class TestThriftHBaseServiceHandler {
   @Test
   public void testDurability() throws Exception {
     byte[] rowName = "testDurability".getBytes();
-    List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValues = new ArrayList<>(1);
     columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname), wrap(valueAname)));
 
-    List<TColumnIncrement> incrementColumns = new ArrayList<TColumnIncrement>(1);
+    List<TColumnIncrement> incrementColumns = new ArrayList<>(1);
     incrementColumns.add(new TColumnIncrement(wrap(familyAname), wrap(qualifierAname)));
 
     TDelete tDelete = new TDelete(wrap(rowName));
@@ -1319,7 +1319,7 @@ public class TestThriftHBaseServiceHandler {
     ByteBuffer value = wrap(valueAname);
 
     // Create a mutation to write to 'B', our "mutate" of "checkAndMutate"
-    List<TColumnValue> columnValuesB = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValuesB = new ArrayList<>(1);
     TColumnValue columnValueB = new TColumnValue(family, wrap(qualifierBname), wrap(valueBname));
     columnValuesB.add(columnValueB);
     TPut putB = new TPut(row, columnValuesB);
@@ -1337,7 +1337,7 @@ public class TestThriftHBaseServiceHandler {
         handler.checkAndMutate(table, row, family, qualifier, TCompareOp.EQUAL, value,
             tRowMutations));
 
-    List<TColumnValue> columnValuesA = new ArrayList<TColumnValue>(1);
+    List<TColumnValue> columnValuesA = new ArrayList<>(1);
     TColumnValue columnValueA = new TColumnValue(family, qualifier, value);
     columnValuesA.add(columnValueA);
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b53f3547/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
----------------------------------------------------------------------
diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
index f729908..d672ab4 100644
--- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
+++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandlerWithLabels.java
@@ -197,7 +197,7 @@ public void testScanWithVisibilityLabels() throws Exception {
   // insert data
   TColumnValue columnValue = new TColumnValue(wrap(familyAname),
       wrap(qualifierAname), wrap(valueAname));
-  List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+  List<TColumnValue> columnValues = new ArrayList<>(1);
   columnValues.add(columnValue);
   for (int i = 0; i < 10; i++) {
     TPut put = new TPut(wrap(("testScan" + i).getBytes()), columnValues);
@@ -212,7 +212,7 @@ public void testScanWithVisibilityLabels() throws Exception {
 
   // create scan instance
   TScan scan = new TScan();
-  List<TColumn> columns = new ArrayList<TColumn>(1);
+  List<TColumn> columns = new ArrayList<>(1);
   TColumn column = new TColumn();
   column.setFamily(familyAname);
   column.setQualifier(qualifierAname);
@@ -222,7 +222,7 @@ public void testScanWithVisibilityLabels() throws Exception {
   scan.setStopRow("testScan\uffff".getBytes());
 
   TAuthorization tauth = new TAuthorization();
-  List<String> labels = new ArrayList<String>(2);
+  List<String> labels = new ArrayList<>(2);
   labels.add(SECRET);
   labels.add(PRIVATE);
   tauth.setLabels(labels);
@@ -265,7 +265,7 @@ public void testGetScannerResultsWithAuthorizations() throws Exception
{
   // insert data
   TColumnValue columnValue = new TColumnValue(wrap(familyAname),
       wrap(qualifierAname), wrap(valueAname));
-  List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+  List<TColumnValue> columnValues = new ArrayList<>(1);
   columnValues.add(columnValue);
   for (int i = 0; i < 20; i++) {
     TPut put = new TPut(
@@ -282,7 +282,7 @@ public void testGetScannerResultsWithAuthorizations() throws Exception
{
 
   // create scan instance
   TScan scan = new TScan();
-  List<TColumn> columns = new ArrayList<TColumn>(1);
+  List<TColumn> columns = new ArrayList<>(1);
   TColumn column = new TColumn();
   column.setFamily(familyAname);
   column.setQualifier(qualifierAname);
@@ -293,7 +293,7 @@ public void testGetScannerResultsWithAuthorizations() throws Exception
{
   // get 5 rows and check the returned results
   scan.setStopRow("testGetScannerResults05".getBytes());
   TAuthorization tauth = new TAuthorization();
-  List<String> labels = new ArrayList<String>(2);
+  List<String> labels = new ArrayList<>(2);
   labels.add(SECRET);
   labels.add(PRIVATE);
   tauth.setLabels(labels);
@@ -321,7 +321,7 @@ public void testGetsWithLabels() throws Exception {
   byte[] rowName = "testPutGet".getBytes();
   ByteBuffer table = wrap(tableAname);
 
-  List<TColumnValue> columnValues = new ArrayList<TColumnValue>(2);
+  List<TColumnValue> columnValues = new ArrayList<>(2);
   columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(valueAname)));
   columnValues.add(new TColumnValue(wrap(familyBname), wrap(qualifierBname),
@@ -334,7 +334,7 @@ public void testGetsWithLabels() throws Exception {
   handler.put(table, put);
   TGet get = new TGet(wrap(rowName));
   TAuthorization tauth = new TAuthorization();
-  List<String> labels = new ArrayList<String>(2);
+  List<String> labels = new ArrayList<>(2);
   labels.add(SECRET);
   labels.add(PRIVATE);
   tauth.setLabels(labels);
@@ -351,7 +351,7 @@ public void testIncrementWithTags() throws Exception {
   byte[] rowName = "testIncrementWithTags".getBytes();
   ByteBuffer table = wrap(tableAname);
 
-  List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+  List<TColumnValue> columnValues = new ArrayList<>(1);
   columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(Bytes.toBytes(1L))));
   TPut put = new TPut(wrap(rowName), columnValues);
@@ -359,7 +359,7 @@ public void testIncrementWithTags() throws Exception {
   put.setCellVisibility(new TCellVisibility().setExpression(PRIVATE));
   handler.put(table, put);
 
-  List<TColumnIncrement> incrementColumns = new ArrayList<TColumnIncrement>(1);
+  List<TColumnIncrement> incrementColumns = new ArrayList<>(1);
   incrementColumns.add(new TColumnIncrement(wrap(familyAname),
       wrap(qualifierAname)));
   TIncrement increment = new TIncrement(wrap(rowName), incrementColumns);
@@ -368,7 +368,7 @@ public void testIncrementWithTags() throws Exception {
 
   TGet get = new TGet(wrap(rowName));
   TAuthorization tauth = new TAuthorization();
-  List<String> labels = new ArrayList<String>(1);
+  List<String> labels = new ArrayList<>(1);
   labels.add(SECRET);
   tauth.setLabels(labels);
   get.setAuthorizations(tauth);
@@ -386,7 +386,7 @@ public void testIncrementWithTagsWithNotMatchLabels() throws Exception
{
   byte[] rowName = "testIncrementWithTagsWithNotMatchLabels".getBytes();
   ByteBuffer table = wrap(tableAname);
 
-  List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+  List<TColumnValue> columnValues = new ArrayList<>(1);
   columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(Bytes.toBytes(1L))));
   TPut put = new TPut(wrap(rowName), columnValues);
@@ -394,7 +394,7 @@ public void testIncrementWithTagsWithNotMatchLabels() throws Exception
{
   put.setCellVisibility(new TCellVisibility().setExpression(PRIVATE));
   handler.put(table, put);
 
-  List<TColumnIncrement> incrementColumns = new ArrayList<TColumnIncrement>(1);
+  List<TColumnIncrement> incrementColumns = new ArrayList<>(1);
   incrementColumns.add(new TColumnIncrement(wrap(familyAname),
       wrap(qualifierAname)));
   TIncrement increment = new TIncrement(wrap(rowName), incrementColumns);
@@ -403,7 +403,7 @@ public void testIncrementWithTagsWithNotMatchLabels() throws Exception
{
 
   TGet get = new TGet(wrap(rowName));
   TAuthorization tauth = new TAuthorization();
-  List<String> labels = new ArrayList<String>(1);
+  List<String> labels = new ArrayList<>(1);
   labels.add(PUBLIC);
   tauth.setLabels(labels);
   get.setAuthorizations(tauth);
@@ -418,7 +418,7 @@ public void testAppend() throws Exception {
   ByteBuffer table = wrap(tableAname);
   byte[] v1 = Bytes.toBytes(1L);
   byte[] v2 = Bytes.toBytes(5L);
-  List<TColumnValue> columnValues = new ArrayList<TColumnValue>(1);
+  List<TColumnValue> columnValues = new ArrayList<>(1);
   columnValues.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(Bytes.toBytes(1L))));
   TPut put = new TPut(wrap(rowName), columnValues);
@@ -426,7 +426,7 @@ public void testAppend() throws Exception {
   put.setCellVisibility(new TCellVisibility().setExpression(PRIVATE));
   handler.put(table, put);
 
-  List<TColumnValue> appendColumns = new ArrayList<TColumnValue>(1);
+  List<TColumnValue> appendColumns = new ArrayList<>(1);
   appendColumns.add(new TColumnValue(wrap(familyAname), wrap(qualifierAname),
       wrap(v2)));
   TAppend append = new TAppend(wrap(rowName), appendColumns);
@@ -435,7 +435,7 @@ public void testAppend() throws Exception {
 
   TGet get = new TGet(wrap(rowName));
   TAuthorization tauth = new TAuthorization();
-  List<String> labels = new ArrayList<String>(1);
+  List<String> labels = new ArrayList<>(1);
   labels.add(SECRET);
   tauth.setLabels(labels);
   get.setAuthorizations(tauth);


Mime
View raw message