boolean passesBloomFilter(Scan scan, final SortedSet<byte[]> columns) {
    byte[] row = scan.getStartRow();
    switch (this.bloomFilterType) {
      case ROW:
        if (!scan.isGetScan()) {
          return true;
        }
        return passesGeneralRowBloomFilter(row, 0, row.length);

      case ROWCOL:
        if (!scan.isGetScan()) {
          return true;
        }
        if (columns != null && columns.size() == 1) {
          byte[] column = columns.first();
          // create the required fake key
          ExtendedCell kvKey =
            PrivateCellUtil.createFirstOnRow(row, HConstants.EMPTY_BYTE_ARRAY, column);
          return passesGeneralRowColBloomFilter(kvKey);
        }

        // For multi-column queries the Bloom filter is checked from the
        // seekExact operation.
        return true;
      case ROWPREFIX_FIXED_LENGTH:
        return passesGeneralRowPrefixBloomFilter(scan);
      default:
        if (scan.isGetScan()) {
          bloomFilterMetrics.incrementEligible();
        }
        return true;
    }
  }
Checks whether the given scan passes the Bloom filter (if present). Only checks Bloom filters
for single-row or single-row-column scans. Bloom filter checking for multi-gets is implemented
as part of the store scanner system (see {@link StoreFileScanner#seek(Cell)} and uses the
lower-level API {@link #passesGeneralRowBloomFilter(byte[], int, int)} and
{@link #passesGeneralRowColBloomFilter(Cell)}.
@param scan    the scan specification. Used to determine the row, and to check whether this is
               a single-row ("get") scan.
@param columns the set of columns. Only used for row-column Bloom filters.
@return true if the scan with the given column set passes the Bloom filter, or if the Bloom
        filter is not applicable for the scan. False if the Bloom filter is applicable and the
        scan fails it.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileReader.java