@@ -1442,35 +1442,36 @@ public void testFamilyFilter() throws Exception {
1442
1442
Put putKey2Column1Value2 = new Put (toBytes (key2 ));
1443
1443
putKey2Column1Value2 .addColumn (toBytes (family3 ), toBytes (column1 ), toBytes (value2 ));
1444
1444
1445
- multiCfHTable .delete (deleteKey1 );
1446
- multiCfHTable .delete (deleteKey2 );
1447
- multiCfHTable .put (putKey1Column1Value1 );
1448
- multiCfHTable .put (putKey1Column1Value2 );
1449
- multiCfHTable .put (putKey1Column2Value2 );
1450
- multiCfHTable .put (putKey2Column2Value1 );
1451
- multiCfHTable .put (putKey2Column1Value1 );
1452
- multiCfHTable .put (putKey2Column1Value2 );
1445
+ multiCfHTable .delete (deleteKey1 );
1446
+ multiCfHTable .delete (deleteKey2 );
1447
+ multiCfHTable .put (putKey1Column1Value1 );
1448
+ multiCfHTable .put (putKey1Column1Value2 );
1449
+ multiCfHTable .put (putKey1Column2Value2 );
1450
+ multiCfHTable .put (putKey2Column2Value1 );
1451
+ multiCfHTable .put (putKey2Column1Value1 );
1452
+ multiCfHTable .put (putKey2Column1Value2 );
1453
1453
1454
1454
Scan scan ;
1455
1455
scan = new Scan ();
1456
1456
scan .addFamily (family1 .getBytes ());
1457
1457
scan .addFamily (family2 .getBytes ());
1458
1458
scan .addFamily (family3 .getBytes ());
1459
1459
scan .setMaxVersions (10 );
1460
- FamilyFilter f = new FamilyFilter (CompareFilter .CompareOp .EQUAL , new BinaryComparator (Bytes .toBytes (family2 )));
1460
+ FamilyFilter f = new FamilyFilter (CompareFilter .CompareOp .EQUAL , new BinaryComparator (
1461
+ Bytes .toBytes (family2 )));
1461
1462
scan .setFilter (f );
1462
1463
ResultScanner scanner = multiCfHTable .getScanner (scan );
1463
1464
1464
1465
int res_count = 0 ;
1465
1466
for (Result result : scanner ) {
1466
1467
for (Cell keyValue : result .rawCells ()) {
1467
- System .out .printf ("Rowkey: %s, Column Family: %s, Column Qualifier: %s, Timestamp: %d, Value: %s%n" ,
1468
+ System .out
1469
+ .printf (
1470
+ "Rowkey: %s, Column Family: %s, Column Qualifier: %s, Timestamp: %d, Value: %s%n" ,
1468
1471
Bytes .toString (CellUtil .cloneRow (keyValue )),
1469
1472
Bytes .toString (CellUtil .cloneFamily (keyValue )),
1470
- Bytes .toString (CellUtil .cloneQualifier (keyValue )),
1471
- keyValue .getTimestamp (),
1472
- Bytes .toString (CellUtil .cloneValue (keyValue ))
1473
- );
1473
+ Bytes .toString (CellUtil .cloneQualifier (keyValue )), keyValue .getTimestamp (),
1474
+ Bytes .toString (CellUtil .cloneValue (keyValue )));
1474
1475
Assert .assertArrayEquals (family2 .getBytes (), CellUtil .cloneFamily (keyValue ));
1475
1476
res_count += 1 ;
1476
1477
}
@@ -1483,20 +1484,21 @@ public void testFamilyFilter() throws Exception {
1483
1484
scan .addFamily (family2 .getBytes ());
1484
1485
scan .addFamily (family3 .getBytes ());
1485
1486
scan .setMaxVersions (10 );
1486
- f = new FamilyFilter (CompareFilter .CompareOp .NOT_EQUAL , new BinaryComparator (Bytes .toBytes (family2 )));
1487
+ f = new FamilyFilter (CompareFilter .CompareOp .NOT_EQUAL , new BinaryComparator (
1488
+ Bytes .toBytes (family2 )));
1487
1489
scan .setFilter (f );
1488
1490
scanner = multiCfHTable .getScanner (scan );
1489
1491
1490
1492
res_count = 0 ;
1491
1493
for (Result result : scanner ) {
1492
1494
for (Cell keyValue : result .rawCells ()) {
1493
- System .out .printf ("Rowkey: %s, Column Family: %s, Column Qualifier: %s, Timestamp: %d, Value: %s%n" ,
1495
+ System .out
1496
+ .printf (
1497
+ "Rowkey: %s, Column Family: %s, Column Qualifier: %s, Timestamp: %d, Value: %s%n" ,
1494
1498
Bytes .toString (CellUtil .cloneRow (keyValue )),
1495
1499
Bytes .toString (CellUtil .cloneFamily (keyValue )),
1496
- Bytes .toString (CellUtil .cloneQualifier (keyValue )),
1497
- keyValue .getTimestamp (),
1498
- Bytes .toString (CellUtil .cloneValue (keyValue ))
1499
- );
1500
+ Bytes .toString (CellUtil .cloneQualifier (keyValue )), keyValue .getTimestamp (),
1501
+ Bytes .toString (CellUtil .cloneValue (keyValue )));
1500
1502
res_count += 1 ;
1501
1503
}
1502
1504
}
@@ -1508,20 +1510,21 @@ public void testFamilyFilter() throws Exception {
1508
1510
scan .addFamily (family2 .getBytes ());
1509
1511
scan .addFamily (family3 .getBytes ());
1510
1512
scan .setMaxVersions (10 );
1511
- f = new FamilyFilter (CompareFilter .CompareOp .GREATER , new BinaryComparator (Bytes .toBytes (family2 )));
1513
+ f = new FamilyFilter (CompareFilter .CompareOp .GREATER , new BinaryComparator (
1514
+ Bytes .toBytes (family2 )));
1512
1515
scan .setFilter (f );
1513
1516
scanner = multiCfHTable .getScanner (scan );
1514
1517
1515
1518
res_count = 0 ;
1516
1519
for (Result result : scanner ) {
1517
1520
for (Cell keyValue : result .rawCells ()) {
1518
- System .out .printf ("Rowkey: %s, Column Family: %s, Column Qualifier: %s, Timestamp: %d, Value: %s%n" ,
1521
+ System .out
1522
+ .printf (
1523
+ "Rowkey: %s, Column Family: %s, Column Qualifier: %s, Timestamp: %d, Value: %s%n" ,
1519
1524
Bytes .toString (CellUtil .cloneRow (keyValue )),
1520
1525
Bytes .toString (CellUtil .cloneFamily (keyValue )),
1521
- Bytes .toString (CellUtil .cloneQualifier (keyValue )),
1522
- keyValue .getTimestamp (),
1523
- Bytes .toString (CellUtil .cloneValue (keyValue ))
1524
- );
1526
+ Bytes .toString (CellUtil .cloneQualifier (keyValue )), keyValue .getTimestamp (),
1527
+ Bytes .toString (CellUtil .cloneValue (keyValue )));
1525
1528
Assert .assertArrayEquals (family3 .getBytes (), CellUtil .cloneFamily (keyValue ));
1526
1529
res_count += 1 ;
1527
1530
}
@@ -1534,20 +1537,21 @@ public void testFamilyFilter() throws Exception {
1534
1537
scan .addFamily (family2 .getBytes ());
1535
1538
scan .addFamily (family3 .getBytes ());
1536
1539
scan .setMaxVersions (10 );
1537
- f = new FamilyFilter (CompareFilter .CompareOp .EQUAL , new BinaryPrefixComparator (Bytes .toBytes ("family_with_group" )));
1540
+ f = new FamilyFilter (CompareFilter .CompareOp .EQUAL , new BinaryPrefixComparator (
1541
+ Bytes .toBytes ("family_with_group" )));
1538
1542
scan .setFilter (f );
1539
1543
scanner = multiCfHTable .getScanner (scan );
1540
1544
1541
1545
res_count = 0 ;
1542
1546
for (Result result : scanner ) {
1543
1547
for (Cell keyValue : result .rawCells ()) {
1544
- System .out .printf ("Rowkey: %s, Column Family: %s, Column Qualifier: %s, Timestamp: %d, Value: %s%n" ,
1548
+ System .out
1549
+ .printf (
1550
+ "Rowkey: %s, Column Family: %s, Column Qualifier: %s, Timestamp: %d, Value: %s%n" ,
1545
1551
Bytes .toString (CellUtil .cloneRow (keyValue )),
1546
1552
Bytes .toString (CellUtil .cloneFamily (keyValue )),
1547
- Bytes .toString (CellUtil .cloneQualifier (keyValue )),
1548
- keyValue .getTimestamp (),
1549
- Bytes .toString (CellUtil .cloneValue (keyValue ))
1550
- );
1553
+ Bytes .toString (CellUtil .cloneQualifier (keyValue )), keyValue .getTimestamp (),
1554
+ Bytes .toString (CellUtil .cloneValue (keyValue )));
1551
1555
res_count += 1 ;
1552
1556
}
1553
1557
}
0 commit comments