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 executedParameterSubstitutionException
FrontendException
public void processOrdLine(java.lang.String key, java.lang.String val) throws ParameterSubstitutionException
key
- - parameter nameval
- - value supplied for the keyParameterSubstitutionException
public 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 executedParameterSubstitutionException
FrontendException
public void validate(java.lang.String preprocessorCmd) throws FrontendException
FrontendException
public 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 existsParameterSubstitutionException
public 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.IOException
org.apache.pig.tools.parameters.ParseException
public java.lang.String substitute(java.lang.String line) throws ParameterSubstitutionException
ParameterSubstitutionException
public java.lang.String substitute(java.lang.String line, java.lang.String parentKey) throws ParameterSubstitutionException
ParameterSubstitutionException
Copyright © 2007-2012 The Apache Software Foundation