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