public static KeyValue.Type fromDeleteType(DeleteType type) throws IOException {
    switch (type) {
      case DELETE_ONE_VERSION:
        return KeyValue.Type.Delete;
      case DELETE_MULTIPLE_VERSIONS:
        return KeyValue.Type.DeleteColumn;
      case DELETE_FAMILY:
        return KeyValue.Type.DeleteFamily;
      case DELETE_FAMILY_VERSION:
        return KeyValue.Type.DeleteFamilyVersion;
      default:
        throw new IOException("Unknown delete type: " + type);
    }
  }
Convert a protocol buffer DeleteType to delete KeyValue type.
@param type The DeleteType
@return The type.
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java