public class JSPig
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
BoundScript |
bind()
See:
Pig.bind() |
BoundScript |
bind(java.lang.Object o)
javascript helper for binding parameters.
|
static JSPig |
compile(java.lang.String pl)
Define a Pig pipeline.
|
static JSPig |
compile(java.lang.String name,
java.lang.String pl)
Define a named portion of a Pig pipeline.
|
static JSPig |
compileFromFile(java.lang.String filename)
Define a Pig pipeline based on Pig Latin in a separate file.
|
static JSPig |
compileFromFile(java.lang.String name,
java.lang.String filename)
Define a named Pig pipeline based on Pig Latin in a separate file.
|
static void |
define(java.lang.String alias,
java.lang.String definition)
See
Pig |
static int |
fs(java.lang.String cmd)
See
Pig |
static void |
registerJar(java.lang.String jarfile)
See
Pig |
static void |
registerUDF(java.lang.String udffile,
java.lang.String namespace)
See
Pig |
static void |
set(java.lang.String var,
java.lang.String value)
See
Pig |
public static int fs(java.lang.String cmd) throws java.io.IOException
Pig
cmd
- Filesystem command to run along with its arguments as one string.java.io.IOException
public static void registerJar(java.lang.String jarfile) throws java.io.IOException
Pig
jarfile
- Path of jar to include.java.io.IOException
- if the indicated jarfile cannot be found.public static void registerUDF(java.lang.String udffile, java.lang.String namespace) throws java.io.IOException
Pig
udffile
- Path of the script UDF filenamespace
- namespace of the UDFsjava.io.IOException
public static void define(java.lang.String alias, java.lang.String definition) throws java.io.IOException
Pig
alias
- name of the defined aliasdefinition
- string this alias is defined asjava.io.IOException
public static void set(java.lang.String var, java.lang.String value) throws java.io.IOException
Pig
var
- variable to setvalue
- to set it tojava.io.IOException
public static JSPig compile(java.lang.String pl) throws java.io.IOException
pl
- Pig Latin definition of the pipeline.java.io.IOException
- if the Pig Latin does not compile.public static JSPig compile(java.lang.String name, java.lang.String pl) throws java.io.IOException
name
- Name that will be used to define this pipeline.
The namespace is global.pl
- Pig Latin definition of the pipeline.java.io.IOException
- if the Pig Latin does not compile.public static JSPig compileFromFile(java.lang.String filename) throws java.io.IOException
filename
- File to read Pig Latin from. This must be a purely
Pig Latin file. It cannot contain host language constructs in it.java.io.IOException
- if the Pig Latin does not compile or the file
cannot be found.public static JSPig compileFromFile(java.lang.String name, java.lang.String filename) throws java.io.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.java.io.IOException
- if the Pig Latin does not compile or the file
cannot be found.public BoundScript bind(java.lang.Object o) throws java.io.IOException
Pig.bind(Map)
o
- a javascript object to be converted into a Mapjava.io.IOException
- if Pig.bind(Map)
throws an IOExceptionpublic BoundScript bind() throws java.io.IOException
Pig.bind()
java.io.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