Write a single thing to HBase and read it back, delete it, read it.
()
| 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, |
nothing calls this directly
no test coverage detected