org.apache.pig.tools.pigstats
Class ScriptState
java.lang.Object
org.apache.pig.tools.pigstats.ScriptState
public class ScriptState
- extends Object
ScriptStates encapsulates settings for a Pig script that runs on a hadoop
cluster. These settings are added to all MR jobs spawned by the script and
in turn are persisted in the hadoop job xml. With the properties already in
the job xml, users who want to know the relations between the script and MR
jobs can derive them from the job xmls.
Field Summary |
static String |
INSERT_ENABLED
Pig property that allows user to turn off the inclusion of settings
in the jobs |
static int |
MAX_SCRIPT_SIZE
Restricts the size of Pig script stored in job xml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSERT_ENABLED
public static final String INSERT_ENABLED
- Pig property that allows user to turn off the inclusion of settings
in the jobs
- See Also:
- Constant Field Values
MAX_SCRIPT_SIZE
public static final int MAX_SCRIPT_SIZE
- Restricts the size of Pig script stored in job xml
- See Also:
- Constant Field Values
start
public static ScriptState start(String commandLine,
PigContext pigContext)
get
public static ScriptState get()
registerListener
public void registerListener(PigProgressNotificationListener listener)
getAllListeners
public List<PigProgressNotificationListener> getAllListeners()
emitLaunchStartedNotification
public void emitLaunchStartedNotification(int numJobsToLaunch)
emitJobsSubmittedNotification
public void emitJobsSubmittedNotification(int numJobsSubmitted)
emitJobStartedNotification
public void emitJobStartedNotification(String assignedJobId)
emitjobFinishedNotification
public void emitjobFinishedNotification(JobStats jobStats)
emitJobFailedNotification
public void emitJobFailedNotification(JobStats jobStats)
emitOutputCompletedNotification
public void emitOutputCompletedNotification(OutputStats outputStats)
emitProgressUpdatedNotification
public void emitProgressUpdatedNotification(int progress)
emitLaunchCompletedNotification
public void emitLaunchCompletedNotification(int numJobsSucceeded)
addSettingsToConf
public void addSettingsToConf(MapReduceOper mro,
org.apache.hadoop.conf.Configuration conf)
setScript
public void setScript(File file)
setScript
public void setScript(String script)
setScriptFeatures
public void setScriptFeatures(LogicalPlan plan)
getHadoopVersion
public String getHadoopVersion()
getPigVersion
public String getPigVersion()
getFileName
public String getFileName()
setFileName
public void setFileName(String fileName)
setPigContext
public void setPigContext(PigContext pigContext)
getPigContext
public PigContext getPigContext()
Copyright © 2012 The Apache Software Foundation