public class VisMetricsGatherer extends Object implements MetricsGatherer<Map<String,ArrayList<VisibilityMetric>>>
Modifier and Type | Field and Description |
---|---|
protected Map<String,com.google.common.util.concurrent.AtomicLongMap<String>> |
blocks |
protected ArrayList<String> |
localityGroups |
protected Map<String,com.google.common.util.concurrent.AtomicLongMap<String>> |
metric |
protected ArrayList<Integer> |
numBlocks |
protected ArrayList<Long> |
numEntries |
Constructor and Description |
---|
VisMetricsGatherer() |
Modifier and Type | Method and Description |
---|---|
void |
addMetric(Key key,
Value val)
Collect and store metrics for the given entry.
|
Map<String,ArrayList<VisibilityMetric>> |
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 oneCF)
Start a new LocalityGroup.
|
public void init(Map<String,ArrayList<ByteSequence>> cf)
MetricsGatherer
init
in interface MetricsGatherer<Map<String,ArrayList<VisibilityMetric>>>
cf
- Map of the LocalityGroup names to their column familiespublic void startLocalityGroup(org.apache.hadoop.io.Text oneCF)
MetricsGatherer
startLocalityGroup
in interface MetricsGatherer<Map<String,ArrayList<VisibilityMetric>>>
oneCF
- Text object of the column family of the first entry in the locality grouppublic void addMetric(Key key, Value val)
MetricsGatherer
addMetric
in interface MetricsGatherer<Map<String,ArrayList<VisibilityMetric>>>
key
- Key object of the entry you are collecting metrics fromval
- Value object of the entry you are collecting metrics frompublic void startBlock()
MetricsGatherer
startBlock
in interface MetricsGatherer<Map<String,ArrayList<VisibilityMetric>>>
public void printMetrics(boolean hash, String metricWord, PrintStream out)
MetricsGatherer
printMetrics
in interface MetricsGatherer<Map<String,ArrayList<VisibilityMetric>>>
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 topublic Map<String,ArrayList<VisibilityMetric>> getMetrics()
getMetrics
in interface MetricsGatherer<Map<String,ArrayList<VisibilityMetric>>>
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.