Skip to content

Commit 571ef32

Browse files
standalone bugfix
1 parent ef7702a commit 571ef32

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

flinkconf/flink-conf.yaml

Whitespace-only changes.

flinkx-launcher/src/main/java/com/dtstack/flinkx/launcher/ClusterClientFactory.java

+4-7
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
package com.dtstack.flinkx.launcher;
2020

2121
import org.apache.commons.lang.StringUtils;
22-
import org.apache.flink.client.deployment.ClusterRetrieveException;
23-
import org.apache.flink.client.deployment.StandaloneClusterDescriptor;
2422
import org.apache.flink.client.program.ClusterClient;
2523
import org.apache.flink.configuration.Configuration;
2624
import org.apache.flink.configuration.GlobalConfiguration;
@@ -38,8 +36,8 @@
3836
import java.util.List;
3937
import java.util.Map;
4038
import java.util.Set;
41-
import org.apache.flink.client.program.rest.RestClusterClient;
4239
import org.apache.hadoop.yarn.api.records.ApplicationId;
40+
import org.apache.flink.client.program.StandaloneClusterClient;
4341

4442
/**
4543
* The Factory of ClusterClient
@@ -49,7 +47,7 @@
4947
*/
5048
public class ClusterClientFactory {
5149

52-
public static ClusterClient createClusterClient(LauncherOptions launcherOptions) throws ClusterRetrieveException {
50+
public static ClusterClient createClusterClient(LauncherOptions launcherOptions) throws Exception {
5351
String clientType = launcherOptions.getMode();
5452
if(ClusterMode.standalone.name().equals(clientType)) {
5553
return createStandaloneClient(launcherOptions);
@@ -59,11 +57,10 @@ public static ClusterClient createClusterClient(LauncherOptions launcherOptions)
5957
throw new IllegalArgumentException("Unsupported cluster client type: ");
6058
}
6159

62-
private static RestClusterClient createStandaloneClient(LauncherOptions launcherOptions) throws ClusterRetrieveException {
60+
private static ClusterClient createStandaloneClient(LauncherOptions launcherOptions) throws Exception {
6361
String flinkConfDir = launcherOptions.getFlinkconf();
6462
Configuration config = GlobalConfiguration.loadConfiguration(flinkConfDir);
65-
StandaloneClusterDescriptor descriptor = new StandaloneClusterDescriptor(config);
66-
RestClusterClient clusterClient = descriptor.retrieve(null);
63+
StandaloneClusterClient clusterClient = new StandaloneClusterClient(config);
6764
clusterClient.setDetached(true);
6865
return clusterClient;
6966
}

test/mysq_to_mysql.json

Whitespace-only changes.

0 commit comments

Comments
 (0)