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 executedParameterSubstitutionExceptionFrontendExceptionpublic void processOrdLine(String key, String val) throws ParameterSubstitutionException
key - - parameter nameval - - value supplied for the keyParameterSubstitutionExceptionpublic void processShellCmd(String key, String val, Boolean overwrite) throws ParameterSubstitutionException, FrontendException
key - - parameter nameval - - string containing command to be executedParameterSubstitutionExceptionFrontendExceptionpublic void validate(String preprocessorCmd) throws FrontendException
FrontendExceptionpublic 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 existsParameterSubstitutionExceptionpublic void loadParamVal(List<String> params, List<String> paramFiles) throws IOException, org.apache.pig.tools.parameters.ParseException
IOExceptionorg.apache.pig.tools.parameters.ParseExceptionpublic String substitute(String line) throws ParameterSubstitutionException
ParameterSubstitutionExceptionpublic String substitute(String line, String parentKey) throws ParameterSubstitutionException
ParameterSubstitutionExceptionCopyright © 2007-2012 The Apache Software Foundation