tillrohrmann commented on a change in pull request #9501: [FLINK-12697] [State 
Backends] Support on-disk state storage for spill-able heap backend
URL: https://github.com/apache/flink/pull/9501#discussion_r334024258
 
 

 ##########
 File path: 
flink-state-backends/flink-statebackend-heap-spillable/src/main/java/org/apache/flink/runtime/state/heap/CopyOnWriteSkipListStateMap.java
 ##########
 @@ -590,10 +542,9 @@ private int compareByteBufferAndNode(ByteBuffer 
keyByteBuffer, int keyOffset, in
         * equal to, or greater than the second.
         */
        private int compareNamespaceAndNode(ByteBuffer namespaceByteBuffer, int 
namespaceOffset, int namespaceLen, long targetNode) {
-               Chunk chunk = 
spaceAllocator.getChunkById(SpaceUtils.getChunkIdByAddress(targetNode));
-               int offsetInChunk = 
SpaceUtils.getChunkOffsetByAddress(targetNode);
-               ByteBuffer targetKeyByteBuffer = 
chunk.getByteBuffer(offsetInChunk);
-               int offsetInByteBuffer = 
chunk.getOffsetInByteBuffer(offsetInChunk);
+               Tuple2<ByteBuffer, Integer> tuple2 = 
getNodeByteBufferAndOffset(targetNode);
 
 Review comment:
   I would introduce a dedicated value class.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to