Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/1153#discussion_r41408810 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java --- @@ -153,6 +176,143 @@ public static ZooKeeperLeaderElectionService createLeaderElectionService( } /** + * Creates a {@link ZooKeeperSubmittedJobGraphs} instance. + * + * @param client The {@link CuratorFramework} ZooKeeper client to use + * @param configuration {@link Configuration} object + * @return {@link ZooKeeperSubmittedJobGraphs} instance + */ + public static ZooKeeperSubmittedJobGraphs createSubmittedJobGraphs( + CuratorFramework client, + Configuration configuration) throws Exception { + + checkNotNull(configuration, "Configuration"); + + // State backend + String stateBackend = configuration.getString( + ConfigConstants.STATE_BACKEND, + ConfigConstants.DEFAULT_STATE_BACKEND); + + if (!stateBackend.toLowerCase().equals("filesystem")) { + throw new IllegalConfigurationException(String.format( + "You currently have to configure the filesystem state backend in order for " + + "ZooKeeper recovery to work. Flink will use this backend to store " + + "meta data to recover jobs. Please set '%s' to 'FILESYSTEM' in the " + + "configuration and set the recovery path via key '%s'.", + ConfigConstants.STATE_BACKEND, + ConfigConstants.STATE_BACKEND_FS_RECOVERY_PATH)); + } + + // State backend root dir + String stateBackendPath = configuration.getString( + ConfigConstants.STATE_BACKEND_FS_RECOVERY_PATH, + ""); + + if (stateBackendPath.equals("")) { + throw new IllegalConfigurationException(String.format( + "You have to specify a path for the file system state backend for storing " + + "recovery information. Please set the configuration key '%s'.", + ConfigConstants.STATE_BACKEND_FS_RECOVERY_PATH)); + } --- End diff -- Resolved
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---