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, makeHashFunc
exec, getReturnType, outputSchema
getContextProperties, getInstanceName, getInstanceProperties, setUDFContextSignature
protected 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.IllegalArgumentException
java.lang.RuntimeException
Hasher(String alg)
public HasherRand(java.lang.String alg) throws java.lang.IllegalArgumentException, java.lang.RuntimeException
java.lang.IllegalArgumentException
java.lang.RuntimeException
protected void onReady(org.apache.pig.impl.logicalLayer.schema.Schema in_schema, org.apache.pig.impl.logicalLayer.schema.Schema out_schema)
ContextualEvalFunc
onReady
in class ContextualEvalFunc<java.lang.String>
in_schema
- input schemaout_schema
- output schemaprotected java.util.Random getRandomGenerator()