public class HBaseStatsAggregator extends Object implements StatsAggregator
Constructor and Description |
---|
HBaseStatsAggregator() |
Modifier and Type | Method and Description |
---|---|
String |
aggregateStats(String rowID,
String key)
Aggregates temporary stats from HBase;
|
boolean |
cleanUp(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(org.apache.hadoop.conf.Configuration hiveconf,
Task sourceTask)
Does the necessary HBase initializations.
|
public boolean connect(org.apache.hadoop.conf.Configuration hiveconf, Task sourceTask)
connect
in interface StatsAggregator
hiveconf
- HiveConf that contains the connection parameters.public String aggregateStats(String rowID, String key)
aggregateStats
in interface StatsAggregator
rowID
- 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.key
- a string noting the key to be published. Ex: "numRows".public boolean closeConnection()
StatsAggregator
closeConnection
in interface StatsAggregator
public boolean cleanUp(String rowID)
StatsAggregator
cleanUp
in interface StatsAggregator
rowID
- a prefix of the keys used in StatsPublisher to publish stats. It is the same
as the first parameter in aggregateStats().Copyright © 2017 The Apache Software Foundation. All rights reserved.