Class SizeStatisticsCollectorCursor

  • All Implemented Interfaces:
    RecordCursor<SizeStatisticsCollectorCursor.SizeStatisticsResults>, AutoCloseable, Iterator<SizeStatisticsCollectorCursor.SizeStatisticsResults>

    @API(EXPERIMENTAL)
    public class SizeStatisticsCollectorCursor
    extends Object
    implements RecordCursor<SizeStatisticsCollectorCursor.SizeStatisticsResults>
    A cursor that collects various distribution statistics on the keys and values within a record store or within an index. The cursor performs a full scan of the subspace backing whatever it is collecting statistics on. It should therefore be run relatively sparingly, and it should not be expected to finish within a single transaction. Note that this class makes no attempt at keeping its results transactional. As a result, if this is run on an actively mutating data set, there are no guarantees that the values it returns were ever actually true for any version in the transaction history. However, as long as the data set is not too volatile, it should produce an approximate answer for the statistics it yields.

    Note that the cursor emits only a single cursor result containing a value. That value represents full statistics for all keys and values in the specified subspace. Any cursor results emitted prior to that are a manifestation of hitting an execution limit while scanning the subspace. These results provide a continuation that can be used to resume aggregating the remaining keys and values of the subspace.