org.apache.pig.builtin
Class BuildBloomBase<T>
java.lang.Object
org.apache.pig.EvalFunc<T>
org.apache.pig.builtin.BuildBloomBase<T>
- Direct Known Subclasses:
- BuildBloom, BuildBloom.Final, BuildBloom.Initial, BuildBloom.Intermediate
public abstract class BuildBloomBase<T>
- extends EvalFunc<T>
A Base class for BuildBloom and its Algebraic implementations.
Field Summary |
protected org.apache.hadoop.util.bloom.BloomFilter |
filter
|
protected int |
hType
|
protected int |
numHash
|
protected int |
vSize
|
Methods inherited from class org.apache.pig.EvalFunc |
exec, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, isAsynchronous, outputSchema, progress, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
vSize
protected int vSize
numHash
protected int numHash
hType
protected int hType
filter
protected org.apache.hadoop.util.bloom.BloomFilter filter
BuildBloomBase
protected BuildBloomBase()
BuildBloomBase
public BuildBloomBase(String hashType,
String mode,
String vectorSize,
String nbHash)
- Parameters:
hashType
- type of the hashing function (see
Hash
).mode
- Will be ignored, though by convention it should be
"fixed" or "fixedsize"vectorSize
- The vector size of this filter.nbHash
- The number of hash functions to consider.
BuildBloomBase
public BuildBloomBase(String hashType,
String numElements,
String desiredFalsePositive)
- Parameters:
hashType
- type of the hashing function (see
Hash
).numElements
- The number of distinct elements expected to be
placed in this filter.desiredFalsePositive
- the acceptable rate of false positives.
This should be a floating point value between 0 and 1.0, where 1.0
would be 100% (ie, a totally useless filter).
bloomOr
protected DataByteArray bloomOr(Tuple input)
throws IOException
- Throws:
IOException
bloomOut
protected DataByteArray bloomOut()
throws IOException
- Throws:
IOException
bloomIn
protected org.apache.hadoop.util.bloom.BloomFilter bloomIn(DataByteArray b)
throws IOException
- Throws:
IOException
Copyright © 2007-2012 The Apache Software Foundation