public static ClientProtos.Result toResultNoData(final Result result) {
    if (result.getExists() != null) return toResult(result.getExists(), result.isStale());
    int size = result.size();
    if (size == 0) return result.isStale() ? EMPTY_RESULT_PB_STALE : EMPTY_RESULT_PB;
    ClientProtos.Result.Builder builder = ClientProtos.Result.newBuilder();
    builder.setAssociatedCellCount(size);
    builder.setStale(result.isStale());
    if (result.getMetrics() != null) {
      builder.setMetrics(toQueryMetrics(result.getMetrics()));
    }
    return builder.build();
  }
Convert a client Result to a protocol buffer Result. The pb Result does not include the Cell
data. That is for transport otherwise.
@param result the client Result to convert
@return the converted protocol buffer Result
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java