public static KeyValue.Type toTypeByte(Cell.Type type) {
    switch (type) {
      case Put:
        return KeyValue.Type.Put;
      case Delete:
        return KeyValue.Type.Delete;
      case DeleteColumn:
        return KeyValue.Type.DeleteColumn;
      case DeleteFamilyVersion:
        return KeyValue.Type.DeleteFamilyVersion;
      case DeleteFamily:
        return KeyValue.Type.DeleteFamily;
      default:
        throw new UnsupportedOperationException("Unsupported data type:" + type);
    }
  }
Compare cell's qualifier against given comparator
@param cell       the cell to use for comparison
@param comparator the {@link CellComparator} to use for comparison
@return result comparing cell's qualifier
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java