[
https://issues.apache.org/jira/browse/FLINK-9981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16565789#comment-16565789
]
ASF GitHub Bot commented on FLINK-9981:
---------------------------------------
azagrebin commented on a change in pull request #6438: [FLINK-9981] Tune
performance of RocksDB implementation
URL: https://github.com/apache/flink/pull/6438#discussion_r206983891
##########
File path:
flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/KeyGroupPartitionedPriorityQueueWithRocksDBStoreTest.java
##########
@@ -18,36 +18,54 @@
package org.apache.flink.contrib.streaming.state;
-import org.apache.flink.runtime.state.heap.CachingInternalPriorityQueueSet;
+import org.apache.flink.core.memory.ByteArrayInputStreamWithPos;
+import org.apache.flink.core.memory.ByteArrayOutputStreamWithPos;
+import org.apache.flink.runtime.state.InternalPriorityQueue;
+import org.apache.flink.runtime.state.InternalPriorityQueueTestBase;
import org.apache.flink.runtime.state.heap.KeyGroupPartitionedPriorityQueue;
-import
org.apache.flink.runtime.state.heap.KeyGroupPartitionedPriorityQueueTest;
-import org.apache.flink.runtime.state.heap.TreeOrderedSetCache;
import org.junit.Rule;
/**
- * Test of {@link KeyGroupPartitionedPriorityQueue} powered by a {@link
RocksDBOrderedSetStore}.
+ * Test of {@link KeyGroupPartitionedPriorityQueue} powered by a {@link
RocksDBCachingPriorityQueueSet}.
*/
-public class KeyGroupPartitionedPriorityQueueWithRocksDBStoreTest extends
KeyGroupPartitionedPriorityQueueTest {
+public class KeyGroupPartitionedPriorityQueueWithRocksDBStoreTest extends
InternalPriorityQueueTestBase {
@Rule
public final RocksDBResource rocksDBResource = new RocksDBResource();
@Override
- protected KeyGroupPartitionedPriorityQueue.PartitionQueueSetFactory<
- TestElement,
CachingInternalPriorityQueueSet<TestElement>> newFactory(
- int initialCapacity) {
-
- return (keyGroupId, numKeyGroups, elementComparator) -> {
-
CachingInternalPriorityQueueSet.OrderedSetCache<TestElement> cache =
- new
TreeOrderedSetCache<>(TEST_ELEMENT_COMPARATOR, 32);
-
CachingInternalPriorityQueueSet.OrderedSetStore<TestElement> store =
-
RocksDBOrderedSetStoreTest.createRocksDBOrderedStore(
- rocksDBResource,
- TestElementSerializer.INSTANCE,
- keyGroupId,
- numKeyGroups);
- return new CachingInternalPriorityQueueSet<>(cache,
store);
+ protected InternalPriorityQueue<TestElement> newPriorityQueue(int
initialCapacity) {
+ return new KeyGroupPartitionedPriorityQueue<>(
+ KEY_EXTRACTOR_FUNCTION,
+ TEST_ELEMENT_PRIORITY_COMPARATOR,
+ newFactory(initialCapacity),
+ KEY_GROUP_RANGE,
KEY_GROUP_RANGE.getNumberOfKeyGroups());
+ }
+
+ @Override
+ protected boolean testSetSemanticsAgainstDuplicateElements() {
+ return true;
+ }
+
+ private KeyGroupPartitionedPriorityQueue.PartitionQueueSetFactory<
+ TestElement, RocksDBCachingPriorityQueueSet<TestElement>>
newFactory(int initialCapacity) {
Review comment:
Do we want this currently unused `initialCapacity` parameter?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Tune performance of RocksDB implementation
> ------------------------------------------
>
> Key: FLINK-9981
> URL: https://issues.apache.org/jira/browse/FLINK-9981
> Project: Flink
> Issue Type: Sub-task
> Components: State Backends, Checkpointing
> Affects Versions: 1.6.0
> Reporter: Stefan Richter
> Assignee: Stefan Richter
> Priority: Major
> Labels: pull-request-available
>
> General performance tuning/polishing for the RocksDB implementation. We can
> figure out how caching/seeking can be improved.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)