Example usage for org.apache.hadoop.util.bloom Filter add

List of usage examples for org.apache.hadoop.util.bloom Filter add

Introduction

In this page you can find the example usage for org.apache.hadoop.util.bloom Filter add.

Prototype

public void add(Key[] keys) 

Source Link

Document

Adds an array of keys to this filter.

Usage

From source file:org.apache.mahout.utils.nlp.collocations.llr.BloomTokenFilterTest.java

License:Apache License

private static Filter getFilter(String[] tokens) throws IOException {
    Filter filter = new BloomFilter(100, 50, Hash.JENKINS_HASH);
    Key k = new Key();
    for (String s : tokens) {
        setKey(k, s);//  w  w  w.  ja v a 2  s.  c  o  m
        filter.add(k);
    }
    return filter;
}