public static boolean matchingQualifier(final Cell left, final byte[] buf, final int offset,
    final int length) {
    if (buf == null) {
      return left.getQualifierLength() == 0;
    }
    if (left instanceof ByteBufferExtendedCell) {
      return ByteBufferUtils.equals(((ByteBufferExtendedCell) left).getQualifierByteBuffer(),
        ((ByteBufferExtendedCell) left).getQualifierPosition(), left.getQualifierLength(), buf,
        offset, length);
    }
    return Bytes.equals(left.getQualifierArray(), left.getQualifierOffset(),
      left.getQualifierLength(), buf, offset, length);
  }
Finds if the qualifier part of the cell and the KV serialized byte[] are equal
@param left   the cell with which we need to match the qualifier
@param buf    the serialized keyvalue format byte[]
@param offset the offset of the qualifier in the byte[]
@param length the length of the qualifier in the byte[]
@return true if the qualifier matches, false otherwise
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java