public class PreprocessorContext
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PreprocessorContext.CallableStreamReader
Slurp in an entire input stream and close it.
|
Constructor and Description |
---|
PreprocessorContext(int limit) |
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 |
paramScopePop() |
void |
paramScopePush() |
boolean |
paramval_containsKey(java.lang.String key) |
java.lang.String |
paramval_get(java.lang.String key) |
void |
paramval_put(java.lang.String key,
java.lang.String value) |
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 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 paramScopePush()
public void paramScopePop()
public boolean paramval_containsKey(java.lang.String key)
public java.lang.String paramval_get(java.lang.String key)
public void paramval_put(java.lang.String key, java.lang.String value)
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-2017 The Apache Software Foundation