You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/11 13:46:15 UTC

[GitHub] [flink] dmvk commented on a change in pull request #18306: [FLINK-25445] No need to create local recovery dirs when disabled loc…

dmvk commented on a change in pull request #18306:
URL: https://github.com/apache/flink/pull/18306#discussion_r782148099



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/LocalRecoveryConfig.java
##########
@@ -31,11 +29,10 @@
     private final boolean localRecoveryEnabled;
 
     /** Encapsulates the root directories and the subtask-specific path. */
-    @Nonnull private final LocalRecoveryDirectoryProvider localStateDirectories;
+    private final LocalRecoveryDirectoryProvider localStateDirectories;
 
     public LocalRecoveryConfig(
-            boolean localRecoveryEnabled,
-            @Nonnull LocalRecoveryDirectoryProvider directoryProvider) {
+            boolean localRecoveryEnabled, LocalRecoveryDirectoryProvider directoryProvider) {

Review comment:
       ```suggestion
               boolean localRecoveryEnabled, @Nullable LocalRecoveryDirectoryProvider directoryProvider) {
   ```

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/LocalRecoveryConfig.java
##########
@@ -44,7 +41,6 @@ public boolean isLocalRecoveryEnabled() {
         return localRecoveryEnabled;
     }
 
-    @Nonnull
     public LocalRecoveryDirectoryProvider getLocalStateDirectoryProvider() {

Review comment:
       Would it make sense to change the signature to `Optional<LocalRecoveryDirectoryProvider> getLocalStateDirectoryProvider()` to make sure the change is properly reflected in all places?
   
   Other option would be adding some explicit exception when getting a null provider.




-- 
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-unsubscribe@flink.apache.org

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