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(String hashType,
String numElements,
String desiredFalsePositive) |
|
BuildBloomBase(String hashType,
String mode,
String vectorSize,
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(String hashType, String mode, String vectorSize, 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(String hashType, String numElements, 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 IOException
IOException
protected DataByteArray bloomOut() throws IOException
IOException
public static org.apache.hadoop.util.bloom.BloomFilter bloomIn(DataByteArray b) throws IOException
IOException
Copyright © 2007-2017 The Apache Software Foundation