public static TResult resultFromHBase(Result in) {
    ExtendedCell[] raw = ClientInternalHelper.getExtendedRawCells(in);
    TResult out = new TResult();
    byte[] row = in.getRow();
    if (row != null) {
      out.setRow(in.getRow());
    }
    List<TColumnValue> columnValues = new ArrayList<>(raw.length);
    for (ExtendedCell kv : raw) {
      TColumnValue col = new TColumnValue();
      col.setFamily(CellUtil.cloneFamily(kv));
      col.setQualifier(CellUtil.cloneQualifier(kv));
      col.setTimestamp(kv.getTimestamp());
      col.setValue(CellUtil.cloneValue(kv));
      col.setType(kv.getType().getCode());
      if (kv.getTagsLength() > 0) {
        col.setTags(PrivateCellUtil.cloneTags(kv));
      }
      columnValues.add(col);
    }
    out.setColumnValues(columnValues);

    out.setStale(in.isStale());

    out.setPartial(in.mayHaveMoreCellsInRow());
    return out;
  }
Creates a {@link TResult} (Thrift) from a {@link Result} (HBase).
@param in the <code>Result</code> to convert
@return converted result, returns an empty result if the input is <code>null</code>
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java