org.apache.pig.tools.pigstats
Class PigStats

java.lang.Object
  extended by org.apache.pig.tools.pigstats.PigStats

@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract class PigStats
extends Object

PigStats encapsulates the statistics collected from a running script. It includes status of the execution, the DAG of its MR 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
 
Field Summary
protected  int returnCode
           
 
Constructor Summary
PigStats()
           
 
Method Summary
static PigStats get()
           
abstract  List<String> getAllErrorMessages()
           
abstract  Map<String,List<PigStats>> getAllStats()
           
abstract  long getBytesWritten()
          Returns the total bytes written to user specified HDFS locations of this script.
abstract  long getDuration()
           
 int getErrorCode()
          Returns the error code of PigException
 String getErrorMessage()
          Returns error message string
abstract  String getFeatures()
           
 String getHadoopVersion()
           
abstract  List<InputStats> getInputStats()
           
abstract  org.apache.hadoop.mapred.JobClient getJobClient()
           
abstract  PigStats.JobGraph getJobGraph()
          Returns the DAG of the MR jobs spawned by the script
abstract  long getNumberBytes(String location)
          Returns the number of bytes for the given output location, -1 for invalid location or name.
abstract  int getNumberJobs()
          Returns the number of MR jobs for this script
abstract  long getNumberRecords(String location)
          Returns the number of records for the given output location, -1 for invalid location or name.
abstract  String getOutputAlias(String location)
          Returns the alias associated with this output location
abstract  List<String> getOutputLocations()
          Returns the list of output locations in the script
abstract  List<String> getOutputNames()
          Returns the list of output names in the script
abstract  List<OutputStats> getOutputStats()
           
abstract  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
abstract  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
abstract  String getScriptId()
           
abstract  long getSMMSpillCount()
          Returns the total spill counts from SpillableMemoryManager.
abstract  boolean isEmbedded()
           
abstract  boolean isSuccessful()
           
abstract  OutputStats result(String alias)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

returnCode

protected int returnCode
Constructor Detail

PigStats

public PigStats()
Method Detail

get

public static PigStats get()

getReturnCode

public int getReturnCode()
Returns code are defined in PigRunner.ReturnCode


getErrorMessage

public String getErrorMessage()
Returns error message string


getErrorCode

public int getErrorCode()
Returns the error code of PigException


getJobClient

public abstract org.apache.hadoop.mapred.JobClient getJobClient()

isEmbedded

public abstract boolean isEmbedded()

isSuccessful

public abstract boolean isSuccessful()

getAllStats

public abstract Map<String,List<PigStats>> getAllStats()

getAllErrorMessages

public abstract List<String> getAllErrorMessages()

getPigProperties

public abstract Properties getPigProperties()
Returns the properties associated with the script


getJobGraph

public abstract PigStats.JobGraph getJobGraph()
Returns the DAG of the MR jobs spawned by the script


getOutputLocations

public abstract List<String> getOutputLocations()
Returns the list of output locations in the script


getOutputNames

public abstract List<String> getOutputNames()
Returns the list of output names in the script


getNumberBytes

public abstract long getNumberBytes(String location)
Returns the number of bytes for the given output location, -1 for invalid location or name.


getNumberRecords

public abstract long getNumberRecords(String location)
Returns the number of records for the given output location, -1 for invalid location or name.


getOutputAlias

public abstract String getOutputAlias(String location)
Returns the alias associated with this output location


getSMMSpillCount

public abstract long getSMMSpillCount()
Returns the total spill counts from SpillableMemoryManager.


getProactiveSpillCountObjects

public abstract long getProactiveSpillCountObjects()
Returns the total number of bags that spilled proactively


getProactiveSpillCountRecords

public abstract long getProactiveSpillCountRecords()
Returns the total number of records that spilled proactively


getBytesWritten

public abstract long getBytesWritten()
Returns the total bytes written to user specified HDFS locations of this script.


getRecordWritten

public abstract long getRecordWritten()
Returns the total number of records in user specified output locations of this script.


getHadoopVersion

public String getHadoopVersion()

getPigVersion

public String getPigVersion()

getScriptId

public abstract String getScriptId()

getFeatures

public abstract String getFeatures()

getDuration

public abstract long getDuration()

getNumberJobs

public abstract int getNumberJobs()
Returns the number of MR jobs for this script


getOutputStats

public abstract List<OutputStats> getOutputStats()

result

public abstract OutputStats result(String alias)

getInputStats

public abstract List<InputStats> getInputStats()


Copyright © 2007-2012 The Apache Software Foundation