Github user satishd commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2218#discussion_r128991661
  
    --- Diff: 
storm-client/src/jvm/org/apache/storm/topology/base/BaseStatefulWindowedBolt.java
 ---
    @@ -151,6 +158,38 @@
             return this;
         }
     
    +    /**
    +     * If set, the stateful windowed bolt would use the backend state for 
window persistence and
    +     * only keep a sub-set of events in memory as specified by {@link 
#withMaxEventsInMemory(long)}.
    +     */
    +    public BaseStatefulWindowedBolt<T> withPersistence() {
    +        persistent = true;
    +        return this;
    +    }
    +
    +    /**
    +     * The maximum number of window events to keep in memory. This is 
meaningful only if
    +     * {@link #withPersistence()} is also set. As the number of events in 
memory grows close
    +     * to the maximum, the events that are less likely to be used again 
are evicted and persisted.
    +     * The default value for this is {@code 1,000,000}.
    +     *
    +     * @param maxEventsInMemory the maximum number of window events to 
keep in memory
    +     */
    +    public BaseStatefulWindowedBolt<T> withMaxEventsInMemory(long 
maxEventsInMemory) {
    --- End diff --
    
    We can explore later limiting with memory size as that would give better 
handle to the user on memory resources, which can be with onheap/offheap cache. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to