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

Method extractResponse

src/GetRequest.java:729–737  ·  view source on GitHub ↗

Transforms a protobuf get response into a list of KeyValue. @param resp The protobuf response from which to extract the KVs. @param buf The buffer from which the protobuf was read. @param cell_size The number of bytes of the cell block that follows, in the buffer.

(final ClientPB.GetResponse resp,
                                             final ChannelBuffer buf,
                                             final int cell_size)

Source from the content-addressed store, hash-verified

727 * in the buffer.
728 */
729 static ArrayList<KeyValue> extractResponse(final ClientPB.GetResponse resp,
730 final ChannelBuffer buf,
731 final int cell_size) {
732 final ClientPB.Result res = resp.getResult();
733 if (res == null) {
734 return new ArrayList<KeyValue>(0);
735 }
736 return convertResult(res, buf, cell_size);
737 }
738
739 /**
740 * Converts a protobuf result into a list of {@link KeyValue}.

Callers 2

deserializeMethod · 0.95
deserializeMethod · 0.95

Calls 1

convertResultMethod · 0.95

Tested by

no test coverage detected