public abstract class BuildBloomBase<T> extends EvalFunc<T>
EvalFunc.SchemaType
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.util.bloom.BloomFilter |
filter |
protected int |
hType |
protected int |
numHash |
protected int |
vSize |
log, pigLogger, reporter, returnType
Modifier | Constructor and Description |
---|---|
protected |
BuildBloomBase() |
|
BuildBloomBase(java.lang.String hashType,
java.lang.String numElements,
java.lang.String desiredFalsePositive) |
|
BuildBloomBase(java.lang.String hashType,
java.lang.String mode,
java.lang.String vectorSize,
java.lang.String nbHash) |
Modifier and Type | Method and Description |
---|---|
static org.apache.hadoop.util.bloom.BloomFilter |
bloomIn(DataByteArray b) |
protected DataByteArray |
bloomOr(Tuple input) |
protected DataByteArray |
bloomOut() |
allowCompileTimeCalculation, exec, finish, getArgToFuncMapping, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, outputSchema, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warn
protected int vSize
protected int numHash
protected int hType
protected org.apache.hadoop.util.bloom.BloomFilter filter
protected BuildBloomBase()
public BuildBloomBase(java.lang.String hashType, java.lang.String mode, java.lang.String vectorSize, java.lang.String nbHash)
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.public BuildBloomBase(java.lang.String hashType, java.lang.String numElements, java.lang.String desiredFalsePositive)
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).protected DataByteArray bloomOr(Tuple input) throws java.io.IOException
java.io.IOException
protected DataByteArray bloomOut() throws java.io.IOException
java.io.IOException
public static org.apache.hadoop.util.bloom.BloomFilter bloomIn(DataByteArray b) throws java.io.IOException
java.io.IOException
Copyright © 2007-2017 The Apache Software Foundation