Package org.apache.hadoop.util.bloom

Examples of org.apache.hadoop.util.bloom.Filter.membershipTest()


    // instantiate a bloom filter input key initialized by the data
    Key key = new Key(data.getBytes());

    // if the key is already in the filter, forget about it
    Filter filter = this.getFilter();
    if (filter.membershipTest(key))
      return;

    // add the key to the bloom filter
    filter.add(key);
View Full Code Here



  public Boolean evaluate( String key, String bloomFilter) throws HiveException {
    Filter bloom = BloomFactory.GetBloomFilter(bloomFilter);
    if( bloom != null) {
      return bloom.membershipTest( new Key(key.getBytes()));
    } else {
      throw new HiveException("Unable to find bloom " + bloomFilter);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.