Interface Summarizer.Collector

Enclosing interface:
Summarizer

public static interface Summarizer.Collector
When Accumulo calls methods in this interface, it will call accept(Key, Value) zero or more times and then call summarize(Summarizer.StatisticConsumer) once. After calling summarize(Summarizer.StatisticConsumer), it will not use the collector again.
Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(Key k, Value v)
    During compactions, Accumulo passes each Key Value written to the file to this method.
    void
    After Accumulo has written some Key Values, it will call this method to generate some statistics about what was previously passed to accept(Key, Value).
  • Method Details

    • accept

      void accept(Key k, Value v)
      During compactions, Accumulo passes each Key Value written to the file to this method.
    • summarize

      void summarize(Summarizer.StatisticConsumer sc)
      After Accumulo has written some Key Values, it will call this method to generate some statistics about what was previously passed to accept(Key, Value).

      In order for summary data to be useful for decision making about data, it needs to be quickly accessible. In order to be quickly accessible, it needs to fit in the tablet server cache as described in TableOperations.summaries(String) and the compaction strategy documentation. Therefore its advisable to generate small summaries. If the summary data generated is too large it will not be stored. The maximum summary size is set using the per table property table.file.summary.maxSize. The number of files that exceeded the summary size is reported by Summary.FileStatistics.getLarge().

      Parameters:
      sc - Emit statistics to this Object.