public static boolean matchingTags(final ExtendedCell left, final ExtendedCell right, int llength,
    int rlength) {
    if (left instanceof ByteBufferExtendedCell && right instanceof ByteBufferExtendedCell) {
      ByteBufferExtendedCell leftBBCell = (ByteBufferExtendedCell) left;
      ByteBufferExtendedCell rightBBCell = (ByteBufferExtendedCell) right;
      return ByteBufferUtils.equals(leftBBCell.getTagsByteBuffer(), leftBBCell.getTagsPosition(),
        llength, rightBBCell.getTagsByteBuffer(), rightBBCell.getTagsPosition(), rlength);
    }
    if (left instanceof ByteBufferExtendedCell) {
      ByteBufferExtendedCell leftBBCell = (ByteBufferExtendedCell) left;
      return ByteBufferUtils.equals(leftBBCell.getTagsByteBuffer(), leftBBCell.getTagsPosition(),
        llength, right.getTagsArray(), right.getTagsOffset(), rlength);
    }
    if (right instanceof ByteBufferExtendedCell) {
      ByteBufferExtendedCell rightBBCell = (ByteBufferExtendedCell) right;
      return ByteBufferUtils.equals(rightBBCell.getTagsByteBuffer(), rightBBCell.getTagsPosition(),
        rlength, left.getTagsArray(), left.getTagsOffset(), llength);
    }
    return Bytes.equals(left.getTagsArray(), left.getTagsOffset(), llength, right.getTagsArray(),
      right.getTagsOffset(), rlength);
  }
Finds if the start of the qualifier part of the Cell matches <code>buf</code>
@param left       the cell with which we need to match the qualifier
@param startsWith the serialized keyvalue format byte[]
@return true if the qualifier have same staring characters, false otherwise
hbase-common/src/main/java/org/apache/hadoop/hbase/PrivateCellUtil.java