org.apache.pig.backend.hadoop.executionengine.mapReduceLayer
Class FileBasedOutputSizeReader

java.lang.Object
  extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.FileBasedOutputSizeReader
All Implemented Interfaces:
PigStatsOutputSizeReader

public class FileBasedOutputSizeReader
extends Object
implements PigStatsOutputSizeReader

Class that computes the size of output for file-based systems.


Field Summary
 
Fields inherited from interface org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigStatsOutputSizeReader
OUTPUT_SIZE_READER_KEY
 
Constructor Summary
FileBasedOutputSizeReader()
           
 
Method Summary
 long getOutputSize(POStore sto, org.apache.hadoop.conf.Configuration conf)
          Returns the total size of output files in bytes
 boolean supports(POStore sto, org.apache.hadoop.conf.Configuration conf)
          Returns whether the given POStore is supported by this output size reader or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBasedOutputSizeReader

public FileBasedOutputSizeReader()
Method Detail

supports

public boolean supports(POStore sto,
                        org.apache.hadoop.conf.Configuration conf)
Returns whether the given POStore is supported by this output size reader or not. We check whether the uri scheme of output file is one of hdfs, local, and s3.

Specified by:
supports in interface PigStatsOutputSizeReader
Parameters:
sto - POStore
conf - Configuration

getOutputSize

public long getOutputSize(POStore sto,
                          org.apache.hadoop.conf.Configuration conf)
                   throws IOException
Returns the total size of output files in bytes

Specified by:
getOutputSize in interface PigStatsOutputSizeReader
Parameters:
sto - POStore
conf - configuration
Throws:
IOException


Copyright © 2007-2012 The Apache Software Foundation