public class PreprocessorContext
extends java.lang.Object
| Constructor and Description |
|---|
PreprocessorContext(int limit) |
PreprocessorContext(java.util.Map<java.lang.String,java.lang.String> paramVal) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getParamVal() |
void |
loadParamVal(java.util.List<java.lang.String> params,
java.util.List<java.lang.String> paramFiles) |
void |
processOrdLine(java.lang.String key,
java.lang.String val)
This method generates value for the specified key by
performing substitution if needed within the value first.
|
void |
processOrdLine(java.lang.String key,
java.lang.String val,
java.lang.Boolean overwrite)
This method generates value for the specified key by
performing substitution if needed within the value first.
|
void |
processShellCmd(java.lang.String key,
java.lang.String val)
This method generates parameter value by running specified command
|
void |
processShellCmd(java.lang.String key,
java.lang.String val,
java.lang.Boolean overwrite)
This method generates parameter value by running specified command
|
void |
setPigContext(PigContext context) |
java.lang.String |
substitute(java.lang.String line) |
java.lang.String |
substitute(java.lang.String line,
java.lang.String parentKey) |
void |
validate(java.lang.String preprocessorCmd) |
public PreprocessorContext(int limit)
limit - - max number of parameters. Passing
smaller number only impacts performancepublic PreprocessorContext(java.util.Map<java.lang.String,java.lang.String> paramVal)
public java.util.Map<java.lang.String,java.lang.String> getParamVal()
public void setPigContext(PigContext context)
public void processShellCmd(java.lang.String key,
java.lang.String val)
throws ParameterSubstitutionException,
FrontendException
key - - parameter nameval - - string containing command to be executedParameterSubstitutionExceptionFrontendExceptionpublic void processOrdLine(java.lang.String key,
java.lang.String val)
throws ParameterSubstitutionException
key - - parameter nameval - - value supplied for the keyParameterSubstitutionExceptionpublic void processShellCmd(java.lang.String key,
java.lang.String val,
java.lang.Boolean overwrite)
throws ParameterSubstitutionException,
FrontendException
key - - parameter nameval - - string containing command to be executedParameterSubstitutionExceptionFrontendExceptionpublic void validate(java.lang.String preprocessorCmd)
throws FrontendException
FrontendExceptionpublic void processOrdLine(java.lang.String key,
java.lang.String val,
java.lang.Boolean overwrite)
throws ParameterSubstitutionException
key - - parameter nameval - - value supplied for the keyoverwrite - - specifies whether the value should be replaced if it already existsParameterSubstitutionExceptionpublic void loadParamVal(java.util.List<java.lang.String> params,
java.util.List<java.lang.String> paramFiles)
throws java.io.IOException,
org.apache.pig.tools.parameters.ParseException
java.io.IOExceptionorg.apache.pig.tools.parameters.ParseExceptionpublic java.lang.String substitute(java.lang.String line)
throws ParameterSubstitutionException
ParameterSubstitutionExceptionpublic java.lang.String substitute(java.lang.String line,
java.lang.String parentKey)
throws ParameterSubstitutionException
ParameterSubstitutionExceptionCopyright © 2007-2012 The Apache Software Foundation