Scan with multiple qualifiers.
()
| 444 | |
| 445 | /** Scan with multiple qualifiers. */ |
| 446 | @Test |
| 447 | public void scanWithQualifiers() throws Exception { |
| 448 | client.setFlushInterval(FAST_FLUSH); |
| 449 | final PutRequest put1 = new PutRequest(table, "k", family, "a", "val1"); |
| 450 | final PutRequest put2 = new PutRequest(table, "k", family, "b", "val2"); |
| 451 | final PutRequest put3 = new PutRequest(table, "k", family, "c", "val3"); |
| 452 | Deferred.group(client.put(put1), client.put(put2), |
| 453 | client.put(put3)).join(); |
| 454 | final Scanner scanner = client.newScanner(table); |
| 455 | scanner.setFamily(family); |
| 456 | scanner.setQualifiers(new byte[][]{{'a'}, {'c'}}); |
| 457 | final ArrayList<ArrayList<KeyValue>> rows = scanner.nextRows(2).join(); |
| 458 | scanner.close().join(); |
| 459 | assertSizeIs(1, rows); |
| 460 | final ArrayList<KeyValue> kvs = rows.get(0); |
| 461 | assertSizeIs(2, kvs); |
| 462 | assertEq("val1", kvs.get(0).value()); |
| 463 | assertEq("val3", kvs.get(1).value()); |
| 464 | } |
| 465 | |
| 466 | /** Write a few KVs and delete them in one batch */ |
| 467 | @Test |
nothing calls this directly
no test coverage detected