TisonKun commented on a change in pull request #9598:
[FLINK-13633][coordination] Move submittedJobGraph and completedCheckpoint to
cluster-id subdirectory of high-availability storage
URL: https://github.com/apache/flink/pull/9598#discussion_r325075925
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
##########
@@ -354,13 +362,23 @@ public static ZooKeeperCheckpointIDCounter
createCheckpointIDCounter(
Configuration configuration,
String prefix) throws IOException {
+ return new
FileSystemStateStorageHelper<T>(getClusterHighAvailabilityStoragePath(configuration),
prefix);
+ }
+
+ /**
+ * Get high availability storage path of current flink cluster.
+ * @param configuration {@link Configuration} object
+ * @return high availability storage path of current flink cluster
+ */
+ private static String
getClusterHighAvailabilityStoragePath(Configuration configuration) {
String rootPath =
configuration.getValue(HighAvailabilityOptions.HA_STORAGE_PATH);
if (rootPath == null || StringUtils.isBlank(rootPath)) {
throw new IllegalConfigurationException("Missing
high-availability storage path for metadata." +
" Specify via configuration key '" +
HighAvailabilityOptions.HA_STORAGE_PATH + "'.");
} else {
- return new FileSystemStateStorageHelper<T>(rootPath,
prefix);
+ final String clusterId =
configuration.getValue(HighAvailabilityOptions.HA_CLUSTER_ID);
Review comment:
I think it is done partially because Till check the clusterId is not empty
or whitespace-only. I remember my concern here previous that if the path
concatenate is not a valid path it might fail later.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services