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

Method appendTwiceBatchedReturnRead

test/TestIntegration.java:295–317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

293 }
294
295 @Test
296 public void appendTwiceBatchedReturnRead() throws Exception {
297 truncateTable(table);
298 final double write_time = System.currentTimeMillis();
299 final AppendRequest append = new AppendRequest(table, "a2", family, "q", "val");
300 append.returnResult(true);
301 final AppendRequest append2 = new AppendRequest(table, "a2", family, "q", "2ndv");
302 append2.returnResult(true);
303 final GetRequest get = new GetRequest(table, "a2", family, "q");
304 final ArrayList<Deferred<Object>> deferreds = new ArrayList<Deferred<Object>>(2);
305 deferreds.add(client.append(append));
306 deferreds.add(client.append(append2));
307 Deferred.group(deferreds).join();
308 final ArrayList<KeyValue> kvs = client.get(get).join();
309 assertSizeIs(1, kvs);
310 final KeyValue kv = kvs.get(0);
311 assertEq("a2", kv.key());
312 assertEq(family, kv.family());
313 assertEq("q", kv.qualifier());
314 assertEq("val2ndv", kv.value());
315 final double kvts = kv.timestamp();
316 assertEquals(write_time, kvts, 5000.0); // Within five seconds.
317 }
318
319 @Test
320 public void basicScanMultipleRegions() throws Exception {

Callers

nothing calls this directly

Calls 12

truncateTableMethod · 0.95
returnResultMethod · 0.95
assertSizeIsMethod · 0.95
assertEqMethod · 0.95
keyMethod · 0.95
familyMethod · 0.95
qualifierMethod · 0.95
valueMethod · 0.95
timestampMethod · 0.95
appendMethod · 0.80
addMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected