org.apache.oozie.action.hadoop
Class PigMain

java.lang.Object
  extended by org.apache.oozie.action.hadoop.LauncherMain
      extended by org.apache.oozie.action.hadoop.PigMain

public class PigMain
extends LauncherMain


Field Summary
static String ACTION_PREFIX
           
static String EXTERNAL_ACTION_STATS
           
static String EXTERNAL_CHILD_IDS
           
static String EXTERNAL_STATS_WRITE
           
static int STRING_BUFFER_SIZE
           
 
Fields inherited from class org.apache.oozie.action.hadoop.LauncherMain
HADOOP_JOBS
 
Constructor Summary
PigMain()
           
 
Method Summary
protected  String getHadoopJobIds(org.apache.pig.tools.pigstats.PigStats pigStats)
          Get Hadoop Ids through PigStats API
static void main(String[] args)
           
protected  void run(String[] args)
           
protected  void runPigJob(String[] args, String pigLog, boolean resetSecurityManager, boolean retrieveStats)
          Runs the pig script using PigRunner API if version 0.8 or above.
static void setPigScript(org.apache.hadoop.conf.Configuration conf, String script, String[] params, String[] args)
           
 
Methods inherited from class org.apache.oozie.action.hadoop.LauncherMain
getHadoopJobIds, logMasking, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_PREFIX

public static final String ACTION_PREFIX
See Also:
Constant Field Values

EXTERNAL_CHILD_IDS

public static final String EXTERNAL_CHILD_IDS
See Also:
Constant Field Values

EXTERNAL_ACTION_STATS

public static final String EXTERNAL_ACTION_STATS
See Also:
Constant Field Values

EXTERNAL_STATS_WRITE

public static final String EXTERNAL_STATS_WRITE
See Also:
Constant Field Values

STRING_BUFFER_SIZE

public static final int STRING_BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

PigMain

public PigMain()
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

run

protected void run(String[] args)
            throws Exception
Specified by:
run in class LauncherMain
Throws:
Exception

runPigJob

protected void runPigJob(String[] args,
                         String pigLog,
                         boolean resetSecurityManager,
                         boolean retrieveStats)
                  throws Exception
Runs the pig script using PigRunner API if version 0.8 or above. Embedded pig within python is also supported.

Parameters:
args - pig command line arguments
pigLog - pig log file
resetSecurityManager - specify if need to reset security manager
retrieveStats - specify if stats are to be retrieved
Throws:
Exception

setPigScript

public static void setPigScript(org.apache.hadoop.conf.Configuration conf,
                                String script,
                                String[] params,
                                String[] args)

getHadoopJobIds

protected String getHadoopJobIds(org.apache.pig.tools.pigstats.PigStats pigStats)
Get Hadoop Ids through PigStats API

Parameters:
pigStats - stats object obtained through PigStats API
Returns:
comma-separated String


Copyright © 2012 Apache Software Foundation. All Rights Reserved.