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

Method appendTwiceNoReturnRead

test/TestIntegration.java:252–271  ·  view source on GitHub ↗

Call append on a column twice, the first time to create it, the second to append the new value.

()

Source from the content-addressed store, hash-verified

250 * append the new value.
251 */
252 @Test
253 public void appendTwiceNoReturnRead() throws Exception {
254 client.setFlushInterval(FAST_FLUSH);
255 truncateTable(table);
256 final double write_time = System.currentTimeMillis();
257 final AppendRequest append = new AppendRequest(table, "a2", family, "q", "val");
258 final AppendRequest append2 = new AppendRequest(table, "a2", family, "q", "2ndv");
259 final GetRequest get = new GetRequest(table, "a2", family, "q");
260 assertNull(client.append(append).join());
261 assertNull(client.append(append2).join());
262 final ArrayList<KeyValue> kvs = client.get(get).join();
263 assertSizeIs(1, kvs);
264 final KeyValue kv = kvs.get(0);
265 assertEq("a2", kv.key());
266 assertEq(family, kv.family());
267 assertEq("q", kv.qualifier());
268 assertEq("val2ndv", kv.value());
269 final double kvts = kv.timestamp();
270 assertEquals(write_time, kvts, 5000.0); // Within five seconds.
271 }
272
273 @Test
274 public void appendTwiceBatchedNoReturnRead() throws Exception {

Callers

nothing calls this directly

Calls 11

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

Tested by

no test coverage detected