org.apache.pig.scripting.jython
Class JythonScriptEngine

java.lang.Object
  extended by org.apache.pig.scripting.ScriptEngine
      extended by org.apache.pig.scripting.jython.JythonScriptEngine

public class JythonScriptEngine
extends ScriptEngine

Implementation of the script engine for Jython


Field Summary
 
Fields inherited from class org.apache.pig.scripting.ScriptEngine
namespaceSeparator
 
Constructor Summary
JythonScriptEngine()
           
 
Method Summary
static org.python.core.PyFunction getFunction(String path, String functionName)
           
 void registerFunctions(String path, String namespace, PigContext pigContext)
          registers the Jython functions as Pig functions with given namespace
 
Methods inherited from class org.apache.pig.scripting.ScriptEngine
getInstance, getJarPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JythonScriptEngine

public JythonScriptEngine()
Method Detail

registerFunctions

public void registerFunctions(String path,
                              String namespace,
                              PigContext pigContext)
                       throws IOException
Description copied from class: ScriptEngine
registers the Jython functions as Pig functions with given namespace

Specified by:
registerFunctions in class ScriptEngine
Parameters:
path - path of the script
namespace - namespace for the functions
pigContext - pigcontext to register functions to pig in the given namespace
Throws:
IOException

getFunction

public static org.python.core.PyFunction getFunction(String path,
                                                     String functionName)
                                              throws IOException
Throws:
IOException


Copyright © ${year} The Apache Software Foundation