sjwiesman commented on a change in pull request #13885:
URL: https://github.com/apache/flink/pull/13885#discussion_r516245707



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/filesystem/FsStateBackend.java
##########
@@ -524,13 +524,17 @@ public CheckpointStorageAccess 
createCheckpointStorage(JobID jobId) throws IOExc
                HeapPriorityQueueSetFactory priorityQueueSetFactory =
                        new HeapPriorityQueueSetFactory(keyGroupRange, 
numberOfKeyGroups, 128);
 
+               ReadableConfig config = 
env.getTaskManagerInfo().getConfiguration();
+               int fsReadBufferSize = 
config.get(CheckpointingOptions.FS_READ_BUFFER_SIZE);

Review comment:
       Do not do this here, you should use the config passed to the `configure` 
method. Look at how the async flag is set. 

##########
File path: 
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java
##########
@@ -540,6 +540,10 @@ public CheckpointStorageAccess 
createCheckpointStorage(JobID jobId) throws IOExc
 
                ExecutionConfig executionConfig = env.getExecutionConfig();
                StreamCompressionDecorator keyGroupCompressionDecorator = 
getCompressionDecorator(executionConfig);
+
+               ReadableConfig config = 
env.getTaskManagerInfo().getConfiguration();
+               int fsReadBufferSize = 
config.get(CheckpointingOptions.FS_READ_BUFFER_SIZE);

Review comment:
       Same

##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/memory/MemoryStateBackend.java
##########
@@ -331,13 +331,18 @@ public OperatorStateBackend createOperatorStateBackend(
                TaskStateManager taskStateManager = env.getTaskStateManager();
                HeapPriorityQueueSetFactory priorityQueueSetFactory =
                        new HeapPriorityQueueSetFactory(keyGroupRange, 
numberOfKeyGroups, 128);
+
+               ReadableConfig config = 
env.getTaskManagerInfo().getConfiguration();
+               int fsReadBufferSize = 
config.get(CheckpointingOptions.FS_READ_BUFFER_SIZE);

Review comment:
       Same as above, please do this inside of `configure`. 

##########
File path: 
flink-core/src/main/java/org/apache/flink/configuration/CheckpointingOptions.java
##########
@@ -157,4 +157,14 @@
                .withDescription(String.format("The default size of the write 
buffer for the checkpoint streams that write to file systems. " +
                        "The actual write buffer size is determined to be the 
maximum of the value of this option and option '%s'.", 
FS_SMALL_FILE_THRESHOLD.key()));
 
+       /**
+        * The default size of the read buffer for the checkpoint streams that 
read from file systems.
+        */
+       @Documentation.Section(Documentation.Sections.EXPERT_STATE_BACKENDS)
+       public static final ConfigOption<Integer> FS_READ_BUFFER_SIZE = 
ConfigOptions
+               .key("state.backend.fs.read-buffer-size")
+               .intType()

Review comment:
       Shouldn't the type of this be `memory`? I know some of the others aren't 
but that's because they predate us having a memory configuration type. 

##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/state/ttl/mock/MockStateBackend.java
##########
@@ -134,13 +136,18 @@ public CheckpointStreamFactory 
resolveCheckpointStorageLocation(long checkpointI
                MetricGroup metricGroup,
                @Nonnull Collection<KeyedStateHandle> stateHandles,
                CloseableRegistry cancelStreamRegistry) {
+
+               Configuration configuration = 
env.getTaskManagerInfo().getConfiguration();
+               int fsReadBufferSize = 
configuration.getInteger(CheckpointingOptions.FS_READ_BUFFER_SIZE);

Review comment:
       Same




----------------------------------------------------------------
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]


Reply via email to