public static Delete deleteFromThrift(TDelete in) {
    Delete out;

    if (in.isSetColumns()) {
      out = new Delete(in.getRow());
      for (TColumn column : in.getColumns()) {
        if (in.isSetDeleteType()) {
          switch (in.getDeleteType()) {
            case DELETE_COLUMN:
              if (column.isSetTimestamp()) {
                out.addColumn(column.getFamily(), column.getQualifier(), column.getTimestamp());
              } else {
                out.addColumn(column.getFamily(), column.getQualifier());
              }
              break;
            case DELETE_COLUMNS:
              if (column.isSetTimestamp()) {
                out.addColumns(column.getFamily(), column.getQualifier(), column.getTimestamp());
              } else {
                out.addColumns(column.getFamily(), column.getQualifier());
              }
              break;
            case DELETE_FAMILY:
              if (column.isSetTimestamp()) {
                out.addFamily(column.getFamily(), column.getTimestamp());
              } else {
                out.addFamily(column.getFamily());
              }
              break;
            case DELETE_FAMILY_VERSION:
              if (column.isSetTimestamp()) {
                out.addFamilyVersion(column.getFamily(), column.getTimestamp());
              } else {
                throw new IllegalArgumentException(
                  "Timestamp is required for TDelete with DeleteFamilyVersion type");
              }
              break;
            default:
              throw new IllegalArgumentException("DeleteType is required for TDelete");
          }
        } else {
          throw new IllegalArgumentException("DeleteType is required for TDelete");
        }
      }
    } else {
      if (in.isSetTimestamp()) {
        out = new Delete(in.getRow(), in.getTimestamp());
      } else {
        out = new Delete(in.getRow());
      }
    }

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

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

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