You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by StefanRRichter <gi...@git.apache.org> on 2017/04/27 09:52:19 UTC

[GitHub] flink pull request #3522: [FLINK-5823] [checkpoints] State Backends also han...

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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---