org.apache.accumulo.core.util.format
Class AggregatingFormatter

java.lang.Object
  extended by org.apache.accumulo.core.util.format.DefaultFormatter
      extended by org.apache.accumulo.core.util.format.AggregatingFormatter
All Implemented Interfaces:
Iterator<String>, Formatter
Direct Known Subclasses:
ShardedTableDistributionFormatter, StatisticsDisplayFormatter

public abstract class AggregatingFormatter
extends DefaultFormatter

Formatter that will aggregate entries for various display purposes.


Constructor Summary
AggregatingFormatter()
           
 
Method Summary
protected abstract  void aggregateStats(Map.Entry<Key,Value> next)
          Generate statistics from each Map.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
checkState, formatEntry, formatEntry, getScannerIterator, hasNext, initialize, isDoTimestamps, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregatingFormatter

public AggregatingFormatter()
Method Detail

next

public String next()
Specified by:
next in interface Iterator<String>
Overrides:
next in class DefaultFormatter

aggregateStats

protected abstract void aggregateStats(Map.Entry<Key,Value> next)
Generate statistics from each Map.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


Copyright © 2015 Apache Accumulo Project. All rights reserved.