public class REPLACE_MULTI extends EvalFunc<java.lang.String>
input_data = LOAD 'input_data' as (name); -- name = 'Hello World!'
replaced_name = FOREACH input_data GENERATE REPLACE_MULTI ( name, [ ' '#'_', '!'#'', 'e'#'a', 'o'#'oo' ] ); -- replaced_name = Halloo_Woorld
The first argument is the source string on which REPLACE_MULTI operation is
performed. The second argument is a map having search key - replacement value
pairs.EvalFunc.SchemaTypelog, pigLogger, reporter, returnType| Constructor and Description |
|---|
REPLACE_MULTI() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
exec(Tuple input)
Method invoked on every tuple during FOREACH evaluation.
|
java.util.List<FuncSpec> |
getArgToFuncMapping()
Allow a UDF to specify type specific implementations of itself.
|
Schema |
outputSchema(Schema input)
Report the schema of the output of this UDF.
|
addCredentials, allowCompileTimeCalculation, finish, getCacheFiles, getInputSchema, getLoadCaster, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, getSchemaType, getShipFiles, isAsynchronous, needEndOfAllInputProcessing, progress, setEndOfAllInput, setInputSchema, setPigLogger, setReporter, setUDFContextSignature, warnpublic java.lang.String exec(Tuple input) throws java.io.IOException
public Schema outputSchema(Schema input)
EvalFunc
The default implementation interprets the OutputSchema annotation,
if one is present. Otherwise, it returns null (no known output schema).
outputSchema in class EvalFunc<java.lang.String>input - Schema of the inputpublic java.util.List<FuncSpec> getArgToFuncMapping() throws FrontendException
EvalFuncgetArgToFuncMapping in class EvalFunc<java.lang.String>FrontendExceptionCopyright © 2007-2016 The Apache Software Foundation