public class HasherRand extends Hasher
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
algorithm |
protected com.google.common.hash.HashFunction |
hash_func |
SEEDED_HASH_NAMES| Constructor and Description |
|---|
HasherRand()
Generates hash values according to murmur3-32, a non-cryptographic-strength
hash function with good mixing.
|
HasherRand(java.lang.String alg) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
call(java.lang.String val) |
protected java.util.Random |
getRandomGenerator() |
protected void |
onReady(org.apache.pig.impl.logicalLayer.schema.Schema in_schema,
org.apache.pig.impl.logicalLayer.schema.Schema out_schema)
Hook method, called once the input and output schema are prepared.
|
intFromHex, longFromHex, makeHashFuncexec, getReturnType, outputSchemagetContextProperties, getInstanceName, getInstanceProperties, setUDFContextSignatureprotected com.google.common.hash.HashFunction hash_func
protected final java.lang.String algorithm
public HasherRand()
throws java.lang.IllegalArgumentException,
java.lang.RuntimeException
algorithm - IllegalArgumentException, - RuntimeExceptionjava.lang.IllegalArgumentExceptionjava.lang.RuntimeExceptionHasher(String alg)public HasherRand(java.lang.String alg)
throws java.lang.IllegalArgumentException,
java.lang.RuntimeException
java.lang.IllegalArgumentExceptionjava.lang.RuntimeExceptionprotected void onReady(org.apache.pig.impl.logicalLayer.schema.Schema in_schema,
org.apache.pig.impl.logicalLayer.schema.Schema out_schema)
ContextualEvalFunconReady in class ContextualEvalFunc<java.lang.String>in_schema - input schemaout_schema - output schemaprotected java.util.Random getRandomGenerator()