org.apache.pig.tools.pigstats
Class ScriptState
java.lang.Object
org.apache.pig.tools.pigstats.ScriptState
- Direct Known Subclasses:
- MRScriptState
public abstract 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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
protected String id
script
protected String script
commandLine
protected String commandLine
fileName
protected String fileName
pigVersion
protected String pigVersion
hadoopVersion
protected String hadoopVersion
scriptFeatures
protected long scriptFeatures
pigContext
protected PigContext pigContext
listeners
protected List<PigProgressNotificationListener> listeners
ScriptState
protected ScriptState(String id)
get
public static ScriptState get()
start
public static ScriptState start(ScriptState state)
start
@Deprecated
public static ScriptState start(String commandLine,
PigContext pigContext)
- Deprecated. use
start(ScriptState)
instead.
registerListener
public void registerListener(PigProgressNotificationListener listener)
getAllListeners
public List<PigProgressNotificationListener> getAllListeners()
emitInitialPlanNotification
public void emitInitialPlanNotification(OperatorPlan<?> plan)
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)
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)
getId
public String getId()
setCommandLine
public void setCommandLine(String commandLine)
getCommandLine
public String getCommandLine()
getScript
protected String getScript()
setScript
protected void setScript(BufferedReader reader)
bitSetToLong
protected long bitSetToLong(BitSet bs)
featureLongToString
protected String featureLongToString(long l)
setPigContext
public void setPigContext(PigContext pigContext)
getPigContext
public PigContext getPigContext()
getScriptFeatures
public String getScriptFeatures()
Copyright © 2007-2012 The Apache Software Foundation