Interface SummaryRetriever


public interface SummaryRetriever
This interface allows configuring where and which summary data to retrieve before retrieving it.
Since:
2.0.0
  • Method Details

    • flush

      SummaryRetriever flush(boolean shouldFlush)
      Forces a flush of data in memory to files before summary data is retrieved. Data recently written to Accumulo may be in memory. Summary data is only retrieved from files. Therefore recently written data may not be represented in summaries, unless this options is set to true. This is optional and defaults to false.
      Returns:
      this
    • startRow

      SummaryRetriever startRow(org.apache.hadoop.io.Text startRow)
      The start row is not inclusive. Calling this method is optional.
    • startRow

      SummaryRetriever startRow(CharSequence startRow)
      The start row is not inclusive. Calling this method is optional.
    • endRow

      SummaryRetriever endRow(org.apache.hadoop.io.Text endRow)
      The end row is inclusive. Calling this method is optional.
    • endRow

      The end row is inclusive. Calling this method is optional.
    • withMatchingConfiguration

      SummaryRetriever withMatchingConfiguration(String regex)
      Filters which summary data is retrieved. By default all summary data present is retrieved. If only a subset of summary data is needed, then its best to be selective in order to avoid polluting summary data cache.

      Each set of summary data is generated using a specific SummarizerConfiguration. The methods withConfiguration(Collection) and withConfiguration(SummarizerConfiguration...) allow selecting sets of summary data based on exact SummarizerConfiguration matches. This method enables less exact matching using regular expressions.

      The regular expression passed to this method is used in the following way on the server side to match SummarizerConfiguration object. When a SummarizerConfiguration matches, the summary data generated using that configuration is returned.

       
          boolean doesConfigurationMatch(SummarizerConfiguration conf, String regex) {
            // This is how conf is converted to a String in tablet servers for matching.
            // The options are sorted to make writing regular expressions easier.
            String confString = conf.getClassName()+" "+new TreeMap<>(conf.getOptions());
            return Pattern.compile(regex).matcher(confString).matches();
          }
       
       
    • withConfiguration

      SummaryRetriever withConfiguration(SummarizerConfiguration... config)
      Allows specifying a set of summaries, generated using the specified configs, to retrieve. By default will retrieve all present.

      Using this method to be more selective may pull less data in to the tablet servers summary cache.

    • withConfiguration

      Allows specifying a set of summaries, generated using the specified configs, to retrieve. By default will retrieve all present.

      Using this method to be more selective may pull less data in to the tablet servers summary cache.

    • retrieve

      Returns:
      a map of counter groups to counts
      Throws:
      AccumuloException
      AccumuloSecurityException
      TableNotFoundException