brickhouse.udf.bloom
Class BloomFactory

java.lang.Object
  extended by brickhouse.udf.bloom.BloomFactory

public class BloomFactory
extends Object

Utility class for construction and serialization of BloomFilters ...


Field Summary
static double DEFAULT_FALSE_POS_PROB
           
static int DEFAULT_HASH_TYPE
           
static int DEFAULT_NUM_ELEMENTS
           
static int NUMBER_OF_BLOOMS
           
 
Constructor Summary
BloomFactory()
           
 
Method Summary
static org.apache.hadoop.util.bloom.Filter GetBloomFilter(String str)
          Generic method for getting BloomFilter from a string.
static org.apache.hadoop.util.bloom.Filter GetNamedBloomFilter(String name)
           
static org.apache.hadoop.util.bloom.Filter NewBloomInstance()
           
static org.apache.hadoop.util.bloom.Filter NewBloomInstance(double c, int n, int k)
           
static org.apache.hadoop.util.bloom.Filter NewBloomInstance(int expectedNumberOfElements, double falsePositiveProbability)
           
static void PutNamedBloomFilter(String name, org.apache.hadoop.util.bloom.Filter bloom)
           
static org.apache.hadoop.util.bloom.Filter ReadBloomFromStream(InputStream stream)
           
static org.apache.hadoop.util.bloom.Filter ReadBloomFromString(String str)
           
static void WriteBloomToStream(OutputStream stream, org.apache.hadoop.util.bloom.Filter bloom)
           
static String WriteBloomToString(org.apache.hadoop.util.bloom.Filter bloom)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NUM_ELEMENTS

public static final int DEFAULT_NUM_ELEMENTS
See Also:
Constant Field Values

DEFAULT_FALSE_POS_PROB

public static final double DEFAULT_FALSE_POS_PROB
See Also:
Constant Field Values

DEFAULT_HASH_TYPE

public static final int DEFAULT_HASH_TYPE
See Also:
Constant Field Values

NUMBER_OF_BLOOMS

public static final int NUMBER_OF_BLOOMS
See Also:
Constant Field Values
Constructor Detail

BloomFactory

public BloomFactory()
Method Detail

NewBloomInstance

public static org.apache.hadoop.util.bloom.Filter NewBloomInstance()

NewBloomInstance

public static org.apache.hadoop.util.bloom.Filter NewBloomInstance(int expectedNumberOfElements,
                                                                   double falsePositiveProbability)

NewBloomInstance

public static org.apache.hadoop.util.bloom.Filter NewBloomInstance(double c,
                                                                   int n,
                                                                   int k)

GetBloomFilter

public static org.apache.hadoop.util.bloom.Filter GetBloomFilter(String str)
Generic method for getting BloomFilter from a string. First, the local map is checked for a bloom loaded from the distributed cache. Next the bloom is attempted to be parsed from UUencoded format.

Parameters:
name -
Returns:

GetNamedBloomFilter

public static org.apache.hadoop.util.bloom.Filter GetNamedBloomFilter(String name)

PutNamedBloomFilter

public static void PutNamedBloomFilter(String name,
                                       org.apache.hadoop.util.bloom.Filter bloom)

ReadBloomFromStream

public static org.apache.hadoop.util.bloom.Filter ReadBloomFromStream(InputStream stream)
                                                               throws IOException
Throws:
IOException

WriteBloomToStream

public static void WriteBloomToStream(OutputStream stream,
                                      org.apache.hadoop.util.bloom.Filter bloom)
                               throws IOException
Throws:
IOException

ReadBloomFromString

public static org.apache.hadoop.util.bloom.Filter ReadBloomFromString(String str)
                                                               throws IOException
Throws:
IOException

WriteBloomToString

public static String WriteBloomToString(org.apache.hadoop.util.bloom.Filter bloom)
                                 throws IOException
Throws:
IOException


Copyright © 2013. All rights reserved.