public class JrubyScriptEngine extends ScriptEngine
ScriptEngine.SupportedScriptLang| Modifier and Type | Field and Description |
|---|---|
protected static org.jruby.embed.ScriptingContainer |
rubyEngine |
NAMESPACE_SEPARATOR| Constructor and Description |
|---|
JrubyScriptEngine() |
| Modifier and Type | Method and Description |
|---|---|
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 pigContext,
String scriptFile)
Actually runs the script file.
|
void |
registerFunctions(String path,
String namespace,
PigContext pigContext)
Evaluates the script containing ruby udfs to determine what udfs are defined as well as
what libaries and other external resources are necessary.
|
getInstance, getJarPath, getPigStatsMap, getScriptAsStream, getSupportedScriptLang, runpublic void registerFunctions(String path, String namespace, PigContext pigContext) throws IOException
registerFunctions in class ScriptEnginepath - path of the scriptnamespace - namespace for the functionspigContext - pigcontext to register functions to pig in the given namespaceIOExceptionprotected Map<String,List<PigStats>> main(PigContext pigContext, String scriptFile) throws IOException
ScriptEnginemain in class ScriptEnginepigContext - ScriptPigContext to run the script filescriptFile - the fileIOExceptionprotected String getScriptingLang()
ScriptEnginegetScriptingLang in class ScriptEngineprotected Map<String,Object> getParamsFromVariables() throws IOException
ScriptEnginegetParamsFromVariables in class ScriptEngineIOExceptionCopyright © 2007-2017 The Apache Software Foundation