Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-1421 Re-think Samza's Window and Join APIs
  3. SAMZA-1423

Implement a RocksDb backed time-series store for storing and retrieving messages time-ranges

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      I'm thinking of the following API for the time-series store:

      /**
       * A key-value store that allows entries to be queried and stored based on time ranges.
       *
       * Implementations of this interface are expected to be thread-safe.
       *
       * @param <K>, the type of key in the store
       * @param <V>, the type of value in the store
       */
      
      public interface TimeSeriesStore<K, V> {
      
        ClosableIterator<KV<V, Long>> get(K key, Long startTimestamp, Long endTimeStamp);
      
        void put(K key, V val, Long timeStamp);
      
        void remove(K key, Long startTimestamp, Long endTimeStamp);
      }
      
      
      /**
       * An iterator that can be closed.
       *
       * <p> Implement close to free resources assigned to the iterator such as open file handles, persistent state etc.
       *
       * @param <V>
       */
      public interface ClosableIterator<V> extends Iterator<V> {
      
        /**
         * Closes this iterator and frees resources assigned to it.
         *
         * It is illegal to invoke {@link #next()} and {@link #hasNext()} after an iterator has been closed.
         */
        public void close();
      }
      
      

      Attachments

        Issue Links

          Activity

            People

              jagadish1989@gmail.com Jagadish
              jagadish1989@gmail.com Jagadish
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: