Class AggregatingFormatter
- java.lang.Object
-
- org.apache.accumulo.core.util.format.DefaultFormatter
-
- org.apache.accumulo.core.util.format.AggregatingFormatter
-
- Direct Known Subclasses:
ShardedTableDistributionFormatter
,StatisticsDisplayFormatter
public abstract class AggregatingFormatter extends DefaultFormatter
Formatter that will aggregate entries for various display purposes.
-
-
Field Summary
-
Fields inherited from class org.apache.accumulo.core.util.format.DefaultFormatter
config
-
-
Constructor Summary
Constructors Constructor Description AggregatingFormatter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
aggregateStats(Map.Entry<Key,Value> next)
Generate statistics from eachMap.Entry
, called for each entry to be iterated over.protected abstract String
getStats()
Finalize the aggregation and return the result.String
next()
-
Methods inherited from class org.apache.accumulo.core.util.format.DefaultFormatter
appendText, checkState, formatEntry, formatEntry, formatEntry, formatEntry, getScannerIterator, hasNext, initialize, isDoTimestamps, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
next
public String next()
- Specified by:
next
in interfaceIterator<String>
- Overrides:
next
in classDefaultFormatter
-
aggregateStats
protected abstract void aggregateStats(Map.Entry<Key,Value> next)
Generate statistics from eachMap.Entry
, called for each entry to be iterated over.- Parameters:
next
- the next entry to aggregate
-
getStats
protected abstract String getStats()
Finalize the aggregation and return the result. Called once at the end.- Returns:
- the aggregation results, suitable for printing to the console
-
-