|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.scripting.js.JSPig
public class JSPig
Pig entry point from javascript
Method Summary | |
---|---|
BoundScript |
bind()
See: Pig.bind() |
BoundScript |
bind(Object o)
javascript helper for binding parameters. |
static JSPig |
compile(String pl)
Define a Pig pipeline. |
static JSPig |
compile(String name,
String pl)
Define a named portion of a Pig pipeline. |
static JSPig |
compileFromFile(String filename)
Define a Pig pipeline based on Pig Latin in a separate file. |
static JSPig |
compileFromFile(String name,
String filename)
Define a named Pig pipeline based on Pig Latin in a separate file. |
static void |
define(String alias,
String definition)
See Pig |
static int |
fs(String cmd)
See Pig |
static void |
registerJar(String jarfile)
See Pig |
static void |
registerUDF(String udffile,
String namespace)
See Pig |
static void |
set(String var,
String value)
See Pig |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int fs(String cmd) throws IOException
Pig
cmd
- Filesystem command to run along with its arguments as one string.
IOException
public static void registerJar(String jarfile) throws IOException
Pig
jarfile
- Path of jar to include.
IOException
- if the indicated jarfile cannot be found.public static void registerUDF(String udffile, String namespace) throws IOException
Pig
udffile
- Path of the script UDF filenamespace
- namespace of the UDFs
IOException
public static void define(String alias, String definition) throws IOException
Pig
alias
- name of the defined aliasdefinition
- string this alias is defined as
IOException
public static void set(String var, String value) throws IOException
Pig
var
- variable to setvalue
- to set it to
IOException
public static JSPig compile(String pl) throws IOException
pl
- Pig Latin definition of the pipeline.
IOException
- if the Pig Latin does not compile.public static JSPig compile(String name, String pl) throws IOException
name
- Name that will be used to define this pipeline.
The namespace is global.pl
- Pig Latin definition of the pipeline.
IOException
- if the Pig Latin does not compile.public static JSPig compileFromFile(String filename) throws IOException
filename
- File to read Pig Latin from. This must be a purely
Pig Latin file. It cannot contain host language constructs in it.
IOException
- if the Pig Latin does not compile or the file
cannot be found.public static JSPig compileFromFile(String name, String filename) throws IOException
name
- Name that will be used to define this pipeline.
The namespace is global.filename
- File to read Pig Latin from. This must be a purely
Pig Latin file. It cannot contain host language constructs in it.
IOException
- if the Pig Latin does not compile or the file
cannot be found.public BoundScript bind(Object o) throws IOException
Pig.bind(Map)
o
- a javascript object to be converted into a Map
IOException
- if Pig.bind(Map)
throws an IOExceptionpublic BoundScript bind() throws IOException
Pig.bind()
IOException
- if host language variables are not found to resolve all
Pig Latin parameters or if they contain unsupported types.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |