Example usage for com.google.common.hash Funnels byteArrayFunnel

List of usage examples for com.google.common.hash Funnels byteArrayFunnel

Introduction

In this page you can find the example usage for com.google.common.hash Funnels byteArrayFunnel.

Prototype

public static Funnel<byte[]> byteArrayFunnel() 

Source Link

Document

Returns a funnel that extracts the bytes from a byte array.

Usage

From source file:com.conversantmedia.mapreduce.output.StringBloomFilter.java

public void init(final int expectedInsertions, final double falsePossitiveRate) {
    //All funnels created by Funnels factory are serializable
    Funnel<byte[]> byteFunnel = Funnels.byteArrayFunnel();
    init(expectedInsertions, falsePossitiveRate, byteFunnel);
}

From source file:net.stargraph.core.processors.SinkDuplicateProcessor.java

public SinkDuplicateProcessor(Config config) {
    super(config);
    //TODO: should be in configuration, assuming worst case scenario with acceptable loss.
    //In the near future we must treat the losses.
    bloomFilter = BloomFilter.create(Funnels.byteArrayFunnel(), 100000000, 0.02);
}