Class EventTimestampIndexer


  • public class EventTimestampIndexer
    extends Object
    Assigns indexes to event timestamps in order satisfy Cortex's time ordering constraint for samples.

    For each time series samples must be written ordered by time. This class assigns index numbers to event timestamps that can be used as label values to differentiate different time series. Index numbers are guaranteed to be increasing for each event timestamp and event timestamps are guaranteed to be increasing for each index number.

    • Constructor Detail

      • EventTimestampIndexer

        public EventTimestampIndexer()
    • Method Detail

      • findIndex

        public int findIndex​(org.joda.time.Instant eventTimestamp)
        Find an index for the given event timestamp that can be used as a label value for a sample of that event timestamp.
      • newestEventTimestamp

        public org.joda.time.Instant newestEventTimestamp()