public class PreprocessorContext extends Object
Constructor and Description |
---|
PreprocessorContext(int limit) |
PreprocessorContext(Map<String,String> paramVal) |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getParamVal() |
void |
loadParamVal(List<String> params,
List<String> paramFiles) |
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 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-2012 The Apache Software Foundation