public static Put putFromThrift(TPut in) {
    Put out;

    if (in.isSetTimestamp()) {
      out = new Put(in.getRow(), in.getTimestamp());
    } else {
      out = new Put(in.getRow());
    }

    if (in.isSetDurability()) {
      out.setDurability(durabilityFromThrift(in.getDurability()));
    }

    for (TColumnValue columnValue : in.getColumnValues()) {
      try {
        if (columnValue.isSetTimestamp()) {
          out.add(CellBuilderFactory.create(CellBuilderType.DEEP_COPY).setRow(out.getRow())
            .setFamily(columnValue.getFamily()).setQualifier(columnValue.getQualifier())
            .setTimestamp(columnValue.getTimestamp()).setType(Cell.Type.Put)
            .setValue(columnValue.getValue()).build());
        } else {
          out.add(CellBuilderFactory.create(CellBuilderType.DEEP_COPY).setRow(out.getRow())
            .setFamily(columnValue.getFamily()).setQualifier(columnValue.getQualifier())
            .setTimestamp(out.getTimestamp()).setType(Cell.Type.Put)
            .setValue(columnValue.getValue()).build());
        }
      } catch (IOException e) {
        throw new IllegalArgumentException((e));
      }
    }

    if (in.isSetAttributes()) {
      addAttributes(out, in.getAttributes());
    }

    if (in.getCellVisibility() != null) {
      out.setCellVisibility(new CellVisibility(in.getCellVisibility().getExpression()));
    }

    return out;
  }
Creates a {@link Put} (HBase) from a {@link TPut} (Thrift)
@param in the <code>TPut</code> to convert
@return converted <code>Put</code>
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftUtilities.java