RocMarshal commented on a change in pull request #17692:
URL: https://github.com/apache/flink/pull/17692#discussion_r763635002
##########
File path:
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/SharedBuffer.java
##########
@@ -73,33 +88,105 @@
private final MapState<NodeId, Lockable<SharedBufferNode>> entries;
/** The cache of eventsBuffer State. */
- private final Map<EventId, Lockable<V>> eventsBufferCache = new
HashMap<>();
+ private final Cache<EventId, Lockable<V>> eventsBufferCache;
/** The cache of sharedBufferNode. */
- private final Map<NodeId, Lockable<SharedBufferNode>> entryCache = new
HashMap<>();
+ private final Cache<NodeId, Lockable<SharedBufferNode>> entryCache;
+
+ private final Timer cacheStatisticsTimer;
+ @VisibleForTesting
public SharedBuffer(KeyedStateStore stateStore, TypeSerializer<V>
valueSerializer) {
+ this(stateStore, valueSerializer, new Configuration());
+ }
+
+ public SharedBuffer(
+ KeyedStateStore stateStore,
+ TypeSerializer<V> valueSerializer,
+ ExecutionConfig.GlobalJobParameters globalJobParameters) {
Review comment:
@AHeise Thanks a lot for the reply. And I updated it bases on your
comments. PTAL.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]