public class GroovyScriptEngine extends ScriptEngine
ScriptEngine.SupportedScriptLangNAMESPACE_SEPARATOR| Constructor and Description |
|---|
GroovyScriptEngine() |
| Modifier and Type | Method and Description |
|---|---|
protected static groovy.util.GroovyScriptEngine |
getEngine() |
protected Map<String,Object> |
getParamsFromVariables()
Returns a map from local variable names to their values
|
protected String |
getScriptingLang()
Gets ScriptEngine classname or keyword for the scripting language
|
protected Map<String,List<PigStats>> |
main(PigContext context,
String scriptFile)
Actually runs the script file.
|
void |
registerFunctions(String path,
String namespace,
PigContext pigContext)
Registers scripting language functions as Pig functions with given namespace
|
getInstance, getJarPath, getPigStatsMap, getScriptAsStream, getSupportedScriptLang, runprotected Map<String,List<PigStats>> main(PigContext context, String scriptFile) throws IOException
ScriptEnginemain in class ScriptEnginecontext - ScriptPigContext to run the script filescriptFile - the fileIOExceptionpublic void registerFunctions(String path, String namespace, PigContext pigContext) throws IOException
ScriptEngineregisterFunctions in class ScriptEnginepath - path of the scriptnamespace - namespace for the functionspigContext - pigcontext to register functions to pig in the given namespaceIOExceptionprotected Map<String,Object> getParamsFromVariables() throws IOException
ScriptEnginegetParamsFromVariables in class ScriptEngineIOExceptionprotected String getScriptingLang()
ScriptEnginegetScriptingLang in class ScriptEngineprotected static groovy.util.GroovyScriptEngine getEngine()
Copyright © 2007-2017 The Apache Software Foundation