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

Method convertResult

src/BatchGet.java:298–315  ·  view source on GitHub ↗
(final ClientPB.Result res,
                                           final ChannelBuffer buf,
                                           final int kvCount)

Source from the content-addressed store, hash-verified

296 }
297
298 static ArrayList<KeyValue> convertResult(final ClientPB.Result res,
299 final ChannelBuffer buf,
300 final int kvCount) {
301
302 final int size = res.getCellCount();
303 final ArrayList<KeyValue> rows = new ArrayList<KeyValue>(size + kvCount);
304 KeyValue kv = null;
305 for (int i = 0; i < size; i++) {
306 kv = KeyValue.fromCell(res.getCell(i), kv);
307 rows.add(kv);
308 }
309 for (int i = 0; i < kvCount; i++) {
310 final int kv_length = buf.readInt();
311 kv = KeyValue.fromBuffer(buf, kv);
312 rows.add(kv);
313 }
314 return rows;
315 }
316
317 public String toString() {
318 final StringBuilder buf = new StringBuilder();

Callers 1

deserializeMethod · 0.95

Calls 3

fromCellMethod · 0.95
fromBufferMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected