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