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