org.apache.pig
Class Main

java.lang.Object
  extended by org.apache.pig.Main

@InterfaceAudience.LimitedPrivate(value="Oozie")
@InterfaceStability.Stable
public class Main
extends Object

Main class for Pig engine.


Field Summary
protected static String PROGRESS_NOTIFICATION_LISTENER_ARG_KEY
           
protected static String PROGRESS_NOTIFICATION_LISTENER_KEY
           
 
Constructor Summary
Main()
           
 
Method Summary
static boolean dryrun(String scriptFile, PigContext pigContext)
           
static String getBuildTime()
          Returns the built time of the Pig build being run.
static String getMajorVersion()
          Returns the major version of Pig being run.
static String getMinorVersion()
          Returns the major version of the Pig build being run.
static String getPatchVersion()
          Returns the patch version of the Pig build being run.
static String getSvnRevision()
          Returns the svn revision number of the Pig build being run.
static String getVersionString()
          Returns a version string formatted similarly to that of svn.
static void main(String[] args)
          The Main-Class for the Pig Jar that will provide a shell and setup a classpath appropriate for executing Jar files.
protected static PigProgressNotificationListener makeListener(Properties properties)
           
static void printProperties()
           
static void usage()
          Print usage string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROGRESS_NOTIFICATION_LISTENER_KEY

protected static final String PROGRESS_NOTIFICATION_LISTENER_KEY
See Also:
Constant Field Values

PROGRESS_NOTIFICATION_LISTENER_ARG_KEY

protected static final String PROGRESS_NOTIFICATION_LISTENER_ARG_KEY
See Also:
Constant Field Values
Constructor Detail

Main

public Main()
Method Detail

main

public static void main(String[] args)
The Main-Class for the Pig Jar that will provide a shell and setup a classpath appropriate for executing Jar files. Warning, this method calls System.exit().

Parameters:
args - -jar can be used to add additional jar files (colon separated). - will start a shell. -e will execute the rest of the command line as if it was input to the shell.
Throws:
IOException

makeListener

protected static PigProgressNotificationListener makeListener(Properties properties)

dryrun

public static boolean dryrun(String scriptFile,
                             PigContext pigContext)
                      throws org.antlr.runtime.RecognitionException,
                             IOException
Throws:
org.antlr.runtime.RecognitionException
IOException

getMajorVersion

public static String getMajorVersion()
Returns the major version of Pig being run.


getMinorVersion

public static String getMinorVersion()
Returns the major version of the Pig build being run.


getPatchVersion

public static String getPatchVersion()
Returns the patch version of the Pig build being run.


getSvnRevision

public static String getSvnRevision()
Returns the svn revision number of the Pig build being run.


getBuildTime

public static String getBuildTime()
Returns the built time of the Pig build being run.


getVersionString

public static String getVersionString()
Returns a version string formatted similarly to that of svn.
 Apache Pig version 0.11.0-SNAPSHOT (r1202387)
 compiled Nov 15 2011, 15:22:09
 


usage

public static void usage()
Print usage string.


printProperties

public static void printProperties()


Copyright © 2007-2012 The Apache Software Foundation