T
- Type used to return metrics in getMetrics(). This does not impact collection of metrics
at all, is only used in that method.public interface MetricsGatherer<T>
Modifier and Type | Method and Description |
---|---|
void |
addMetric(Key key,
Value val)
Collect and store metrics for the given entry.
|
T |
getMetrics() |
void |
init(Map<String,ArrayList<ByteSequence>> cf)
Initialize the gatherer when it is registered with the RFile Reader
|
void |
printMetrics(boolean hash,
String metricWord,
PrintStream out)
Print the results of the metrics gathering by locality group in the format: Metric name Number
of keys Percentage of keys Number of blocks Percentage of blocks
|
void |
startBlock()
Start a new block within a LocalityGroup.
|
void |
startLocalityGroup(org.apache.hadoop.io.Text cf)
Start a new LocalityGroup.
|
void init(Map<String,ArrayList<ByteSequence>> cf)
cf
- Map of the LocalityGroup names to their column familiesvoid startLocalityGroup(org.apache.hadoop.io.Text cf)
cf
- Text object of the column family of the first entry in the locality groupvoid addMetric(Key key, Value val)
key
- Key object of the entry you are collecting metrics fromval
- Value object of the entry you are collecting metrics fromvoid startBlock()
void printMetrics(boolean hash, String metricWord, PrintStream out)
hash
- Boolean to determine whether the values being printed should be hashedmetricWord
- String of the name of the metric that was collectedout
- PrintStream of where the information should be written toT getMetrics()
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.