Interface SummaryRetriever
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionendRow
(CharSequence endRow) The end row is inclusive.endRow
(org.apache.hadoop.io.Text endRow) The end row is inclusive.flush
(boolean shouldFlush) Forces a flush of data in memory to files before summary data is retrieved.retrieve()
startRow
(CharSequence startRow) The start row is not inclusive.startRow
(org.apache.hadoop.io.Text startRow) The start row is not inclusive.Allows specifying a set of summaries, generated using the specified configs, to retrieve.withConfiguration
(SummarizerConfiguration... config) Allows specifying a set of summaries, generated using the specified configs, to retrieve.withMatchingConfiguration
(String regex) Filters which summary data is retrieved.
-
Method Details
-
flush
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
The start row is not inclusive. Calling this method is optional. -
startRow
The start row is not inclusive. Calling this method is optional. -
endRow
The end row is inclusive. Calling this method is optional. -
endRow
The end row is inclusive. Calling this method is optional. -
withMatchingConfiguration
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 methodswithConfiguration(Collection)
andwithConfiguration(SummarizerConfiguration...)
allow selecting sets of summary data based on exactSummarizerConfiguration
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 aSummarizerConfiguration
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
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
List<Summary> retrieve() throws AccumuloException, AccumuloSecurityException, TableNotFoundException- Returns:
- a map of counter groups to counts
- Throws:
AccumuloException
AccumuloSecurityException
TableNotFoundException
-