|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.tools.pigstats.PigStats
@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class PigStats
PigStats encapsulates the statistics collected from a running script. It includes status of the execution, the DAG of its Hadoop jobs, as well as information about outputs and inputs of the script.
Nested Class Summary | |
---|---|
static class |
PigStats.JobGraph
JobGraph is an OperatorPlan whose members are JobStats |
static class |
PigStats.JobGraphPrinter
This class prints a JobGraph |
Field Summary | |
---|---|
protected Map<String,OutputStats> |
aliasOuputMap
|
protected static String |
DATE_FORMAT
|
protected long |
endTime
|
protected int |
errorCode
|
protected String |
errorMessage
|
protected Throwable |
errorThrowable
|
protected PigStats.JobGraph |
jobPlan
|
protected PigContext |
pigContext
|
protected int |
returnCode
|
protected long |
startTime
|
protected String |
userId
|
Constructor Summary | |
---|---|
PigStats()
|
Method Summary | |
---|---|
static PigStats |
get()
|
abstract List<String> |
getAllErrorMessages()
|
abstract Map<String,List<PigStats>> |
getAllStats()
|
long |
getBytesWritten()
Returns the total bytes written to user specified HDFS locations of this script. |
long |
getDuration()
|
int |
getErrorCode()
Returns the error code of PigException |
String |
getErrorMessage()
Returns error message string |
Throwable |
getErrorThrowable()
Returns the error code of PigException |
String |
getFeatures()
|
String |
getFileName()
|
String |
getHadoopVersion()
|
List<InputStats> |
getInputStats()
|
abstract org.apache.hadoop.mapred.JobClient |
getJobClient()
Deprecated. |
PigStats.JobGraph |
getJobGraph()
Returns the DAG of jobs spawned by the script |
long |
getNumberBytes(String location)
Returns the number of bytes for the given output location, -1 for invalid location or name. |
int |
getNumberFailedJobs()
|
int |
getNumberJobs()
Returns the number of jobs for this script |
long |
getNumberRecords(String location)
Returns the number of records for the given output location, -1 for invalid location or name. |
int |
getNumberSuccessfulJobs()
|
String |
getOutputAlias(String location)
Returns the alias associated with this output location |
List<String> |
getOutputLocations()
Returns the list of output locations in the script |
List<String> |
getOutputNames()
Returns the list of output names in the script |
List<OutputStats> |
getOutputStats()
|
PigContext |
getPigContext()
|
Properties |
getPigProperties()
Returns the properties associated with the script |
String |
getPigVersion()
|
abstract long |
getProactiveSpillCountObjects()
Returns the total number of bags that spilled proactively |
abstract long |
getProactiveSpillCountRecords()
Returns the total number of records that spilled proactively |
long |
getRecordWritten()
Returns the total number of records in user specified output locations of this script. |
int |
getReturnCode()
Returns code are defined in PigRunner.ReturnCode |
String |
getScriptId()
|
abstract long |
getSMMSpillCount()
Returns the total spill counts from SpillableMemoryManager . |
abstract boolean |
isEmbedded()
|
boolean |
isSuccessful()
|
OutputStats |
result(String alias)
|
void |
setBackendException(String jobId,
Exception e)
|
void |
setErrorCode(int errorCode)
|
void |
setErrorMessage(String errorMessage)
|
void |
setErrorThrowable(Throwable t)
|
void |
setReturnCode(int returnCode)
|
void |
start()
|
static PigStats |
start(PigStats stats)
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String DATE_FORMAT
protected long startTime
protected long endTime
protected String userId
protected PigStats.JobGraph jobPlan
protected PigContext pigContext
protected Map<String,OutputStats> aliasOuputMap
protected int errorCode
protected String errorMessage
protected Throwable errorThrowable
protected int returnCode
Constructor Detail |
---|
public PigStats()
Method Detail |
---|
public static PigStats get()
public static PigStats start(PigStats stats)
public int getReturnCode()
PigRunner.ReturnCode
public String getErrorMessage()
public int getErrorCode()
PigException
public Throwable getErrorThrowable()
PigException
@Deprecated public abstract org.apache.hadoop.mapred.JobClient getJobClient()
public abstract boolean isEmbedded()
public boolean isSuccessful()
public abstract Map<String,List<PigStats>> getAllStats()
public abstract List<String> getAllErrorMessages()
public Properties getPigProperties()
public PigStats.JobGraph getJobGraph()
public List<String> getOutputLocations()
public List<String> getOutputNames()
public long getNumberBytes(String location)
public long getNumberRecords(String location)
public String getOutputAlias(String location)
public abstract long getSMMSpillCount()
SpillableMemoryManager
.
public abstract long getProactiveSpillCountObjects()
public abstract long getProactiveSpillCountRecords()
public long getBytesWritten()
public long getRecordWritten()
public String getHadoopVersion()
public String getPigVersion()
public String getScriptId()
public String getFileName()
public String getFeatures()
public long getDuration()
public int getNumberJobs()
public List<OutputStats> getOutputStats()
public OutputStats result(String alias)
public List<InputStats> getInputStats()
public void setErrorMessage(String errorMessage)
public void setErrorCode(int errorCode)
public void setErrorThrowable(Throwable t)
public void setReturnCode(int returnCode)
@InterfaceAudience.Private public void setBackendException(String jobId, Exception e)
@InterfaceAudience.Private public PigContext getPigContext()
public void start()
public void stop()
public int getNumberSuccessfulJobs()
public int getNumberFailedJobs()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |