org.apache.pig.tools.pigstats
Class PigStatsUtil

java.lang.Object
  extended by org.apache.pig.tools.pigstats.PigStatsUtil
Direct Known Subclasses:
MRPigStatsUtil

public class PigStatsUtil
extends Object

A utility class for Pig Statistics


Field Summary
static String FS_COUNTER_GROUP
          Deprecated. use MRPigStatsUtil.FS_COUNTER_GROUP instead.
static String HDFS_BYTES_READ
           
static String HDFS_BYTES_WRITTEN
           
static String MAP_INPUT_RECORDS
           
static String MAP_OUTPUT_RECORDS
           
static String MULTI_INPUTS_COUNTER_GROUP
           
static String MULTI_INPUTS_RECORD_COUNTER
           
static String MULTI_STORE_COUNTER_GROUP
           
static String MULTI_STORE_RECORD_COUNTER
           
static String REDUCE_INPUT_RECORDS
           
static String REDUCE_OUTPUT_RECORDS
           
static String TASK_COUNTER_GROUP
          Deprecated. use MRPigStatsUtil.TASK_COUNTER_GROUP instead.
 
Constructor Summary
PigStatsUtil()
           
 
Method Summary
static PigStats getEmptyPigStats()
          Deprecated. 
static String getMultiInputsCounterName(String fname, int index)
          Returns the counter name for the given input file name
static String getMultiStoreCounterName(POStore store)
          Returns the counter name for the given POStore
static PigStats getPigStats(int code)
          Returns the PigStats with the given return code
static boolean isTempFile(String fileName)
           
static void setErrorCode(int code)
           
static void setErrorMessage(String msg)
           
static void setErrorThrowable(Throwable t)
           
static void setStatsMap(Map<String,List<PigStats>> statsMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAP_INPUT_RECORDS

public static final String MAP_INPUT_RECORDS
See Also:
Constant Field Values

MAP_OUTPUT_RECORDS

public static final String MAP_OUTPUT_RECORDS
See Also:
Constant Field Values

REDUCE_INPUT_RECORDS

public static final String REDUCE_INPUT_RECORDS
See Also:
Constant Field Values

REDUCE_OUTPUT_RECORDS

public static final String REDUCE_OUTPUT_RECORDS
See Also:
Constant Field Values

HDFS_BYTES_WRITTEN

public static final String HDFS_BYTES_WRITTEN
See Also:
Constant Field Values

HDFS_BYTES_READ

public static final String HDFS_BYTES_READ
See Also:
Constant Field Values

MULTI_INPUTS_RECORD_COUNTER

public static final String MULTI_INPUTS_RECORD_COUNTER
See Also:
Constant Field Values

MULTI_INPUTS_COUNTER_GROUP

public static final String MULTI_INPUTS_COUNTER_GROUP
See Also:
Constant Field Values

MULTI_STORE_RECORD_COUNTER

public static final String MULTI_STORE_RECORD_COUNTER
See Also:
Constant Field Values

MULTI_STORE_COUNTER_GROUP

public static final String MULTI_STORE_COUNTER_GROUP
See Also:
Constant Field Values

TASK_COUNTER_GROUP

@Deprecated
public static final String TASK_COUNTER_GROUP
Deprecated. use MRPigStatsUtil.TASK_COUNTER_GROUP instead.
See Also:
Constant Field Values

FS_COUNTER_GROUP

@Deprecated
public static final String FS_COUNTER_GROUP
Deprecated. use MRPigStatsUtil.FS_COUNTER_GROUP instead.
Constructor Detail

PigStatsUtil

public PigStatsUtil()
Method Detail

getEmptyPigStats

@Deprecated
public static PigStats getEmptyPigStats()
Deprecated. 

Returns an empty PigStats object Use of this method is not advised as it will return the MR execution engine version of PigStats by default, and is not necessarily empty depending on the timing.

Returns:
an empty PigStats object

getPigStats

public static PigStats getPigStats(int code)
Returns the PigStats with the given return code

Parameters:
code - the return code
Returns:
the PigStats with the given return code

setErrorMessage

public static void setErrorMessage(String msg)

setErrorCode

public static void setErrorCode(int code)

setErrorThrowable

public static void setErrorThrowable(Throwable t)

isTempFile

public static boolean isTempFile(String fileName)

setStatsMap

public static void setStatsMap(Map<String,List<PigStats>> statsMap)

getMultiInputsCounterName

public static String getMultiInputsCounterName(String fname,
                                               int index)
Returns the counter name for the given input file name

Parameters:
fname - the input file name
Returns:
the counter name

getMultiStoreCounterName

public static String getMultiStoreCounterName(POStore store)
Returns the counter name for the given POStore

Parameters:
store - the POStore
Returns:
the counter name


Copyright © 2007-2012 The Apache Software Foundation