public class JSPig extends Object
| Modifier and Type | Method and Description |
|---|---|
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 |
public static int fs(String cmd) throws IOException
Pigcmd - Filesystem command to run along with its arguments as one string.IOExceptionpublic static void registerJar(String jarfile) throws IOException
Pigjarfile - Path of jar to include.IOException - if the indicated jarfile cannot be found.public static void registerUDF(String udffile, String namespace) throws IOException
Pigudffile - Path of the script UDF filenamespace - namespace of the UDFsIOExceptionpublic static void define(String alias, String definition) throws IOException
Pigalias - name of the defined aliasdefinition - string this alias is defined asIOExceptionpublic static void set(String var, String value) throws IOException
Pigvar - variable to setvalue - to set it toIOExceptionpublic 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 MapIOException - 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.Copyright © 2007-2017 The Apache Software Foundation