Github user StefanRRichter commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3522#discussion_r113657592
  
    --- Diff: 
flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBStateBackend.java
 ---
    @@ -222,11 +227,40 @@ public CheckpointStreamFactory 
createStreamFactory(JobID jobId,
     
        @Override
        public CheckpointStreamFactory createSavepointStreamFactory(
    -                   JobID jobId,
                        String operatorIdentifier,
                        String targetLocation) throws IOException {
     
    -           return 
checkpointStreamBackend.createSavepointStreamFactory(jobId, operatorIdentifier, 
targetLocation);
    +           return 
checkpointStreamBackend.createSavepointStreamFactory(operatorIdentifier, 
targetLocation);
    +   }
    +
    +   @Override
    +   public boolean supportsExternalizedMetadata() {
    +           return checkpointStreamBackend.supportsExternalizedMetadata();
    +   }
    +
    +   @Nullable
    +   @Override
    +   public String getMetadataPersistenceLocation() {
    +           return checkpointStreamBackend.getMetadataPersistenceLocation();
    +   }
    +
    +   @Override
    +   public CheckpointMetadataStreamFactory 
createCheckpointMetadataStreamFactory(
    +                   JobID jobID,
    +                   long checkpointId) throws IOException {
    +           return 
checkpointStreamBackend.createCheckpointMetadataStreamFactory(jobID, 
checkpointId);
    +   }
    +
    +   @Override
    +   public CheckpointMetadataStreamFactory 
createSavepointMetadataStreamFactory(
    +                   JobID jobID,
    +                   @Nullable String targetLocation) throws IOException {
    +           return 
checkpointStreamBackend.createSavepointMetadataStreamFactory(jobID, 
targetLocation);
    +   }
    +
    +   @Override
    +   public StreamStateHandle resolveCheckpointLocation(String pointer) 
throws IOException {
    --- End diff --
    
    I would suggest to introduce an actual class for the concept of pointers to 
improve type safety and readability. Through subclasses, it can also be easier 
to reason about what kinds of pointer a backend accepts or rejects, compared to 
think about how a string was parsed and failed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to