wangyang0918 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_r324554365
##########
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:
What do you mean configured wrongly? In standalone mode, it is configured by
user. In Yarn/mesos mode, it will be set automatically. Also it have default
value and will not be null.
----------------------------------------------------------------
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