public class JDBCStatsAggregator extends java.lang.Object implements StatsAggregator
| Constructor and Description |
|---|
JDBCStatsAggregator() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
aggregateStats(java.lang.String fileID,
java.lang.String statType)
This method aggregates a given statistic from all tasks (partial stats).
|
boolean |
cleanUp(java.lang.String rowID)
This method is called after all statistics have been aggregated.
|
boolean |
closeConnection()
This method closes the connection to the temporary storage.
|
boolean |
connect(Configuration hiveconf)
This method connects to the temporary storage.
|
public boolean connect(Configuration hiveconf)
StatsAggregatorconnect in interface StatsAggregatorhiveconf - HiveConf that contains the connection parameters.public java.lang.String aggregateStats(java.lang.String fileID,
java.lang.String statType)
StatsAggregatoraggregateStats in interface StatsAggregatorfileID - a prefix of the keys used in StatsPublisher to publish stats.
Any rows that starts with the same prefix will be aggregated. For example, if
the StatsPublisher uses the following compound key to publish stats:
the output directory name (unique per FileSinkOperator) +
the partition specs (only for dynamic partitions) +
taskID (last component of task file)
The keyPrefix for aggregation could be first 2 components. This will aggregates stats
across all tasks for each partition.statType - a string noting the key to be published. Ex: "numRows".public boolean closeConnection()
StatsAggregatorcloseConnection in interface StatsAggregatorpublic boolean cleanUp(java.lang.String rowID)
StatsAggregatorcleanUp in interface StatsAggregatorrowID - a prefix of the keys used in StatsPublisher to publish stats. It is the same
as the first parameter in aggregateStats().Copyright © 2012 The Apache Software Foundation