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

Method putReadDeleteRead

test/TestIntegration.java:178–191  ·  view source on GitHub ↗

Write a single thing to HBase and read it back, delete it, read it.

()

Source from the content-addressed store, hash-verified

176
177 /** Write a single thing to HBase and read it back, delete it, read it. */
178 @Test
179 public void putReadDeleteRead() throws Exception {
180 client.setFlushInterval(FAST_FLUSH);
181 final PutRequest put = new PutRequest(table, "k", family, "q", "val");
182 final GetRequest get = new GetRequest(table, "k", family, "q");
183 client.put(put).join();
184 final ArrayList<KeyValue> kvs = client.get(get).join();
185 assertSizeIs(1, kvs);
186 assertEq("val", kvs.get(0).value());
187 final DeleteRequest del = new DeleteRequest(table, "k", family, "q");
188 client.delete(del).join();
189 final ArrayList<KeyValue> kvs2 = client.get(get).join();
190 assertSizeIs(0, kvs2);
191 }
192
193 /**
194 * Write two values to a HBase column and read them back,

Callers

nothing calls this directly

Calls 7

assertSizeIsMethod · 0.95
assertEqMethod · 0.95
setFlushIntervalMethod · 0.80
putMethod · 0.80
deleteMethod · 0.80
valueMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected