Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static void main(String[] args) throws Exception {
clusterClientHelper.submit(jobDeployer);
}

private static void findDefaultConfigDir(Options launcherOptions) {
private static void findDefaultConfigDir(Options launcherOptions) throws ClusterDeploymentException {
findDefaultFlinkxDistDir(launcherOptions);

if (ClusterMode.local.name().equalsIgnoreCase(launcherOptions.getMode())) {
Expand Down Expand Up @@ -172,7 +172,7 @@ private static void findDefaultFlinkConf(Options launcherOptions) {
}
}

private static void findDefaultFlinkxDistDir(Options launcherOptions) {
private static void findDefaultFlinkxDistDir(Options launcherOptions) throws ClusterDeploymentException {
String distDir = launcherOptions.getFlinkxDistDir();
if (StringUtils.isEmpty(distDir)) {
String flinkxHome = getSystemProperty(KEY_FLINKX_HOME);
Expand All @@ -187,6 +187,9 @@ private static void findDefaultFlinkxDistDir(Options launcherOptions) {
launcherOptions.setFlinkxDistDir(distDir);
}
}
if (StringUtils.isEmpty(distDir)) {
notConfiguredException(KEY_FLINKX_HOME);
}
System.setProperty(ConfigConstants.ENV_FLINK_PLUGINS_DIR, distDir);
}

Expand All @@ -198,4 +201,8 @@ private static String getSystemProperty(String name) {

return property;
}

private static void notConfiguredException(String propertyKey) throws ClusterDeploymentException {
throw new ClusterDeploymentException(propertyKey + " is not configured.");
}
}