WencongLiu commented on code in PR #22975:
URL: https://github.com/apache/flink/pull/22975#discussion_r1270307421


##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartitionFactory.java:
##########
@@ -122,6 +155,9 @@ public ResultPartitionFactory(
         this.hybridShuffleSpilledIndexRegionGroupSize = 
hybridShuffleSpilledIndexRegionGroupSize;
         this.hybridShuffleNumRetainedInMemoryRegionsMax =
                 hybridShuffleNumRetainedInMemoryRegionsMax;
+        this.tieredStorageConfiguration = tieredStorageConfiguration;
+        this.tieredStorageNettyService = tieredStorageNettyService;
+        this.tieredStorageResourceRegistry = tieredStorageResourceRegistry;

Review Comment:
   I've added a new container class `TieredStorage` to combine these arguments.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/shuffle/NettyShuffleMaster.java:
##########
@@ -67,6 +75,17 @@ public NettyShuffleMaster(Configuration conf) {
                 
conf.getInteger(NettyShuffleEnvironmentOptions.NETWORK_SORT_SHUFFLE_MIN_BUFFERS);
         networkBufferSize = ConfigurationParserUtils.getPageSize(conf);
 
+        if (conf.getBoolean(NETWORK_HYBRID_SHUFFLE_ENABLE_NEW_MODE)) {
+            tieredStorageConfiguration =
+                    TieredStorageConfiguration.builder(
+                                    
conf.getString(NETWORK_HYBRID_SHUFFLE_REMOTE_STORAGE_BASE_PATH))
+                            .build();
+            tieredInternalShuffleMaster = new 
TieredInternalShuffleMaster(conf);
+        } else {
+            tieredStorageConfiguration = null;
+            tieredInternalShuffleMaster = null;
+        }

Review Comment:
   `tieredStorageConfiguration` and `tieredInternalShuffleMaster` should be 
`final`.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to