Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.apache.hadoop.hbase.util;
public class CompoundBloomFilterBase implements BloomFilterBase {

At read time, the total number of chunks. At write time, the number of chunks created so far. The first chunk has an ID of 0, and the current chunk has the ID of numChunks - 1.
  protected int numChunks;

The Bloom filter version. There used to be a DynamicByteBloomFilter which had version 2.
  public static final int VERSION = 3;

Target error rate for configuring the filter and for information
  protected float errorRate;

The total number of keys in all chunks
  protected long totalKeyCount;
  protected long totalByteSize;
  protected long totalMaxKeys;

Hash function type to use, as defined in org.apache.hadoop.hbase.util.Hash
  protected int hashType;
Comparator used to compare Bloom filter keys
  protected KVComparator comparator;
  public long getMaxKeys() {
    return ;
  public long getKeyCount() {
    return ;
  public long getByteSize() {
    return ;
  private static final byte[] DUMMY = new byte[0];

Prepare an ordered pair of row and qualifier to be compared using KeyValue.KeyComparator. This is only used for row-column Bloom filters.
  public byte[] createBloomKey(byte[] rowint roffsetint rlength,
      byte[] qualifierint qoffsetint qlength) {
    if (qualifier == null)
      qualifier = ;
    // Make sure this does not specify a timestamp so that the default maximum
    // (most recent) timestamp is used.
    KeyValue kv = KeyValue.createFirstOnRow(rowroffsetrlength, 0, 0,
    return kv.getKey();
  public KVComparator getComparator() {
    return ;
New to GrepCode? Check out our FAQ X