public class PreprocessorContext extends 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 |
---|---|
Map<String,String> |
getParamVal() |
void |
loadParamVal(List<String> params,
List<String> paramFiles) |
void |
paramScopePop() |
void |
paramScopePush() |
boolean |
paramval_containsKey(String key) |
String |
paramval_get(String key) |
void |
paramval_put(String key,
String value) |
void |
processOrdLine(String key,
String val)
This method generates value for the specified key by
performing substitution if needed within the value first.
|
void |
processOrdLine(String key,
String val,
Boolean overwrite)
This method generates value for the specified key by
performing substitution if needed within the value first.
|
void |
processShellCmd(String key,
String val)
This method generates parameter value by running specified command
|
void |
processShellCmd(String key,
String val,
Boolean overwrite)
This method generates parameter value by running specified command
|
void |
setPigContext(PigContext context) |
String |
substitute(String line) |
String |
substitute(String line,
String parentKey) |
void |
validate(String preprocessorCmd) |
public PreprocessorContext(int limit)
limit
- - max number of parameters. Passing
smaller number only impacts performancepublic void setPigContext(PigContext context)
public void processShellCmd(String key, String val) throws ParameterSubstitutionException, FrontendException
key
- - parameter nameval
- - string containing command to be executedParameterSubstitutionException
FrontendException
public void processOrdLine(String key, String val) throws ParameterSubstitutionException
key
- - parameter nameval
- - value supplied for the keyParameterSubstitutionException
public void paramScopePush()
public void paramScopePop()
public boolean paramval_containsKey(String key)
public void processShellCmd(String key, String val, Boolean overwrite) throws ParameterSubstitutionException, FrontendException
key
- - parameter nameval
- - string containing command to be executedParameterSubstitutionException
FrontendException
public void validate(String preprocessorCmd) throws FrontendException
FrontendException
public void processOrdLine(String key, String val, 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(List<String> params, List<String> paramFiles) throws IOException, org.apache.pig.tools.parameters.ParseException
IOException
org.apache.pig.tools.parameters.ParseException
public String substitute(String line) throws ParameterSubstitutionException
ParameterSubstitutionException
public String substitute(String line, String parentKey) throws ParameterSubstitutionException
ParameterSubstitutionException
Copyright © 2007-2017 The Apache Software Foundation