org.apache.pig
Class ResourceStatistics.ResourceFieldStatistics

java.lang.Object
  extended by org.apache.pig.ResourceStatistics.ResourceFieldStatistics
All Implemented Interfaces:
Serializable
Enclosing class:
ResourceStatistics

public static class ResourceStatistics.ResourceFieldStatistics
extends Object
implements Serializable

Statistics for a given field in the data.

See Also:
Serialized Form

Field Summary
 Object[] mostCommonValues
          We need some way to represent a histogram of values in the field, as those will be useful.
 float[] mostCommonValuesFreq
          an array that matches the mostCommonValues array, and lists the frequencies of those values as a fraction (0 through 1) of the total number of records
 Long numDistinctValues
           
static long serialVersionUID
           
 Object[] valueHistogram
          an ordered array of values, from min val to max val such that the number of records with values between valueHistogram[i] and and valueHistogram[i+1] is roughly equal for all values of i.
 int version
           
 
Constructor Summary
ResourceStatistics.ResourceFieldStatistics()
           
 
Method Summary
 boolean equals(Object anOther)
           
 Object[] getMostCommonValues()
           
 float[] getMostCommonValuesFreq()
           
 Long getNumDistinctValues()
           
 Object[] getValueHistogram()
           
 int getVersion()
           
 int hashCode()
          A naive hashCode implementation following the example in IBM's developerworks: http://www.ibm.com/developerworks/java/library/j-jtp05273.html
 ResourceStatistics.ResourceFieldStatistics setMostCommonValues(Object[] mostCommonValues)
           
 ResourceStatistics.ResourceFieldStatistics setMostCommonValuesFreq(float[] mostCommonValuesFreq)
           
 ResourceStatistics.ResourceFieldStatistics setNumDistinctValues(Long numDistinctValues)
           
 ResourceStatistics.ResourceFieldStatistics setValueHistogram(Object[] valueHistogram)
           
 ResourceStatistics.ResourceFieldStatistics setVersion(int version)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

version

public int version

numDistinctValues

public Long numDistinctValues

mostCommonValues

public Object[] mostCommonValues
We need some way to represent a histogram of values in the field, as those will be useful. However, we can't count on being able to hold such histograms in memory. Have to figure out how they can be kept on disk and represented here. for now.. don't create so many buckets you can't hold them in memory an ordered array of the most common values, in descending order of frequency


mostCommonValuesFreq

public float[] mostCommonValuesFreq
an array that matches the mostCommonValues array, and lists the frequencies of those values as a fraction (0 through 1) of the total number of records


valueHistogram

public Object[] valueHistogram
an ordered array of values, from min val to max val such that the number of records with values between valueHistogram[i] and and valueHistogram[i+1] is roughly equal for all values of i. NOTE: if mostCommonValues is non-empty, the values in that array should not be included in the histogram. Adjust accordingly.

Constructor Detail

ResourceStatistics.ResourceFieldStatistics

public ResourceStatistics.ResourceFieldStatistics()
Method Detail

getVersion

public int getVersion()

setVersion

public ResourceStatistics.ResourceFieldStatistics setVersion(int version)

getNumDistinctValues

public Long getNumDistinctValues()

setNumDistinctValues

public ResourceStatistics.ResourceFieldStatistics setNumDistinctValues(Long numDistinctValues)

getMostCommonValues

public Object[] getMostCommonValues()

setMostCommonValues

public ResourceStatistics.ResourceFieldStatistics setMostCommonValues(Object[] mostCommonValues)

getMostCommonValuesFreq

public float[] getMostCommonValuesFreq()

setMostCommonValuesFreq

public ResourceStatistics.ResourceFieldStatistics setMostCommonValuesFreq(float[] mostCommonValuesFreq)

getValueHistogram

public Object[] getValueHistogram()

setValueHistogram

public ResourceStatistics.ResourceFieldStatistics setValueHistogram(Object[] valueHistogram)

equals

public boolean equals(Object anOther)
Overrides:
equals in class Object

hashCode

public int hashCode()
A naive hashCode implementation following the example in IBM's developerworks: http://www.ibm.com/developerworks/java/library/j-jtp05273.html

Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © ${year} The Apache Software Foundation