diff --git a/docs/layouts/shortcodes/generated/expert_forst_section.html b/docs/layouts/shortcodes/generated/expert_forst_section.html index e28f17e855ad7..81ec199945840 100644 --- a/docs/layouts/shortcodes/generated/expert_forst_section.html +++ b/docs/layouts/shortcodes/generated/expert_forst_section.html @@ -20,12 +20,6 @@ Integer When the number of eviction that a block in hot link is moved to cold link reaches this value, the block will be blocked from being promoted to the head of the LRU list. The default value is '3'. - -
state.backend.forst.checkpoint.transfer.thread.num
- 4 - Integer - The number of threads used to transfer files during checkpoint (writing or copying files to the checkpoint storage) and restore (transferring state files back to the ForSt working directory). Consider increasing this value when snapshotting or restoring large state. Note that the pool is created per state backend instance. Setting it too high can saturate network bandwidth or trigger rate limiting depending on the remote storage; setting it too low can lead to long checkpoint durations or timeouts for large state. The default value is '4'. -
state.backend.forst.executor.inline-coordinator
false diff --git a/docs/layouts/shortcodes/generated/forst_configuration.html b/docs/layouts/shortcodes/generated/forst_configuration.html index 7c5d99395ab31..f66c1af4d8b3b 100644 --- a/docs/layouts/shortcodes/generated/forst_configuration.html +++ b/docs/layouts/shortcodes/generated/forst_configuration.html @@ -38,12 +38,6 @@ MemorySize An upper-bound of the size that can be used for cache. User should specify at least one cache size limit to enable the cache, either this option or the 'state.backend.forst.cache.reserve-size' option. They can be set simultaneously, and in this case, cache will grow if meet the requirements of both two options. The default value is '0 bytes', meaning that this option is disabled. - -
state.backend.forst.checkpoint.transfer.thread.num
- 4 - Integer - The number of threads used to transfer files during checkpoint (writing or copying files to the checkpoint storage) and restore (transferring state files back to the ForSt working directory). Consider increasing this value when snapshotting or restoring large state. Note that the pool is created per state backend instance. Setting it too high can saturate network bandwidth or trigger rate limiting depending on the remote storage; setting it too low can lead to long checkpoint durations or timeouts for large state. The default value is '4'. -
state.backend.forst.executor.inline-coordinator
false diff --git a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStKeyedStateBackendBuilder.java b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStKeyedStateBackendBuilder.java index 68aa391871275..d9b2bc3dd58c4 100644 --- a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStKeyedStateBackendBuilder.java +++ b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStKeyedStateBackendBuilder.java @@ -442,7 +442,7 @@ private ForStRestoreOperation getForStRestoreOperation( long lastCompletedCheckpointId) { ForStStateDataTransfer stateTransfer = new ForStStateDataTransfer( - optionsContainer.getDataTransferThreadNum(), + ForStStateDataTransfer.DEFAULT_THREAD_NUM, optionsContainer.getFileSystem()); if (enableIncrementalCheckpointing) { diff --git a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStOptions.java b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStOptions.java index 0ecc7cdc9c8d7..8a816e3e1b13e 100644 --- a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStOptions.java +++ b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStOptions.java @@ -300,19 +300,4 @@ public class ForStOptions { + " Only valid when '" + EXECUTOR_WRITE_IO_INLINE.key() + "' is false."); - - @Documentation.Section(Documentation.Sections.EXPERT_FORST) - public static final ConfigOption CHECKPOINT_TRANSFER_THREAD_NUM = - ConfigOptions.key("state.backend.forst.checkpoint.transfer.thread.num") - .intType() - .defaultValue(4) - .withDescription( - "The number of threads used to transfer files during checkpoint (writing or copying " - + "files to the checkpoint storage) and restore (transferring state files back to " - + "the ForSt working directory). Consider increasing this value when snapshotting or " - + "restoring large state. Note that the pool is created per state backend instance. " - + "Setting it too high can saturate network bandwidth or trigger rate limiting depending " - + "on the remote storage; setting it too low can lead to long checkpoint durations " - + "or timeouts for large state. " - + "The default value is '4'."); } diff --git a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStResourceContainer.java b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStResourceContainer.java index 6d7b225af2372..cb29cf1857cb1 100644 --- a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStResourceContainer.java +++ b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStResourceContainer.java @@ -324,10 +324,6 @@ public int getWriteIoParallelism() { return configuration.get(ForStOptions.EXECUTOR_WRITE_IO_PARALLELISM); } - public int getDataTransferThreadNum() { - return configuration.get(ForStOptions.CHECKPOINT_TRANSFER_THREAD_NUM); - } - /** * Prepare local and remote directories. * diff --git a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/datatransfer/ForStStateDataTransfer.java b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/datatransfer/ForStStateDataTransfer.java index 852fa08405e4b..0305f8cd02e9a 100644 --- a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/datatransfer/ForStStateDataTransfer.java +++ b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/datatransfer/ForStStateDataTransfer.java @@ -64,6 +64,9 @@ public class ForStStateDataTransfer implements Closeable { private static final Logger LOG = LoggerFactory.getLogger(ForStStateDataTransfer.class); + // TODO: Add ConfigOption replace this field after ForSt checkpoint implementation stable + public static final int DEFAULT_THREAD_NUM = 4; + protected final ExecutorService executorService; @Nullable private final ForStFlinkFileSystem forStFs; diff --git a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/restore/ForStIncrementalRestoreOperation.java b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/restore/ForStIncrementalRestoreOperation.java index ca3d683a48410..f205fe21b9f0d 100644 --- a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/restore/ForStIncrementalRestoreOperation.java +++ b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/restore/ForStIncrementalRestoreOperation.java @@ -265,7 +265,7 @@ public ForStRestoreResult restore() throws Exception { private void transferAllStateHandles(List specs) throws Exception { try (ForStStateDataTransfer transfer = new ForStStateDataTransfer( - optionsContainer.getDataTransferThreadNum(), + ForStStateDataTransfer.DEFAULT_THREAD_NUM, optionsContainer.getFileSystem())) { transfer.transferAllStateDataToDirectory( optionsContainer.getPathContainer(), diff --git a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/sync/ForStSyncKeyedStateBackendBuilder.java b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/sync/ForStSyncKeyedStateBackendBuilder.java index 0f6dcac1e7367..0e83b22a0ced2 100644 --- a/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/sync/ForStSyncKeyedStateBackendBuilder.java +++ b/flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/sync/ForStSyncKeyedStateBackendBuilder.java @@ -465,7 +465,7 @@ public ForStSyncKeyedStateBackendBuilder setRecoveryClaimMode( ForStStateDataTransfer stateTransfer = new ForStStateDataTransfer( - optionsContainer.getDataTransferThreadNum(), + ForStStateDataTransfer.DEFAULT_THREAD_NUM, optionsContainer.getFileSystem()); if (enableIncrementalCheckpointing) { diff --git a/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendConfigTest.java b/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendConfigTest.java index ef478795dd3dd..1505057f8e2f2 100644 --- a/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendConfigTest.java +++ b/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStStateBackendConfigTest.java @@ -815,19 +815,6 @@ void testConfigureQueryTimeAfterNumEntries() throws Exception { } } - @Test - public void testConfigureCheckpointTransferThreadNumber() throws Exception { - ForStStateBackend forStStateBackend = new ForStStateBackend(); - Configuration configuration = new Configuration(); - configuration.setString(ForStOptions.CHECKPOINT_TRANSFER_THREAD_NUM.key(), "10"); - forStStateBackend = forStStateBackend.configure(configuration, getClass().getClassLoader()); - - try (ForStResourceContainer resourceContainer = - forStStateBackend.createOptionsAndResourceContainer(null)) { - assertEquals(10, resourceContainer.getDataTransferThreadNum()); - } - } - private void verifySetParameter(Runnable setter) { assertThatThrownBy(setter::run).isInstanceOf(IllegalArgumentException.class); } diff --git a/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/snapshot/ForStIncrementalSnapshotStrategyTest.java b/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/snapshot/ForStIncrementalSnapshotStrategyTest.java index 92411da631fb2..034df702554ac 100644 --- a/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/snapshot/ForStIncrementalSnapshotStrategyTest.java +++ b/flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/snapshot/ForStIncrementalSnapshotStrategyTest.java @@ -33,7 +33,6 @@ import org.apache.flink.runtime.state.v2.RegisteredKeyValueStateBackendMetaInfo; import org.apache.flink.state.forst.ForStExtension; import org.apache.flink.state.forst.ForStOperationUtils; -import org.apache.flink.state.forst.ForStOptions; import org.apache.flink.state.forst.datatransfer.ForStStateDataTransfer; import org.apache.flink.testutils.junit.utils.TempDirUtils; @@ -200,8 +199,7 @@ private ForStIncrementalSnapshotStrategy createSnapshotStrategy() CompositeKeySerializationUtils.computeRequiredBytesInKeyGroupPrefix(2), UUID.randomUUID(), new TreeMap<>(), - new ForStStateDataTransfer( - ForStOptions.CHECKPOINT_TRANSFER_THREAD_NUM.defaultValue()), + new ForStStateDataTransfer(ForStStateDataTransfer.DEFAULT_THREAD_NUM), -1); } @@ -233,8 +231,7 @@ private ForStNativeFullSnapshotStrategy createFullSnapshotStrategy() new KeyGroupRange(0, 1), CompositeKeySerializationUtils.computeRequiredBytesInKeyGroupPrefix(2), UUID.randomUUID(), - new ForStStateDataTransfer( - ForStOptions.CHECKPOINT_TRANSFER_THREAD_NUM.defaultValue())); + new ForStStateDataTransfer(ForStStateDataTransfer.DEFAULT_THREAD_NUM)); } private FsCheckpointStreamFactory createFsCheckpointStreamFactory() throws IOException {