MCPcopy Create free account
hub / github.com/OpenTSDB/asynchbase / scanWithQualifiers

Method scanWithQualifiers

test/TestIntegration.java:446–464  ·  view source on GitHub ↗

Scan with multiple qualifiers.

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 11

setFamilyMethod · 0.95
setQualifiersMethod · 0.95
nextRowsMethod · 0.95
closeMethod · 0.95
assertSizeIsMethod · 0.95
assertEqMethod · 0.95
setFlushIntervalMethod · 0.80
putMethod · 0.80
newScannerMethod · 0.80
valueMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected