Unverified Commit 8ce42006 authored by gaoyan's avatar gaoyan Committed by GitHub

fix k8s native submit bug (#2334)

* fix k8s submit bug
parent 22be7cf2
...@@ -342,6 +342,12 @@ public enum Status { ...@@ -342,6 +342,12 @@ public enum Status {
SYS_RESOURCE_SETTINGS_HDFS_ROOT_USER_NOTE(173, "sys.resource.settings.hdfs.root.user.note"), SYS_RESOURCE_SETTINGS_HDFS_ROOT_USER_NOTE(173, "sys.resource.settings.hdfs.root.user.note"),
SYS_RESOURCE_SETTINGS_HDFS_FS_DEFAULTFS(174, "sys.resource.settings.hdfs.fs.defaultFS"), SYS_RESOURCE_SETTINGS_HDFS_FS_DEFAULTFS(174, "sys.resource.settings.hdfs.fs.defaultFS"),
SYS_RESOURCE_SETTINGS_HDFS_FS_DEFAULTFS_NOTE(175, "sys.resource.settings.hdfs.fs.defaultFS.note"), SYS_RESOURCE_SETTINGS_HDFS_FS_DEFAULTFS_NOTE(175, "sys.resource.settings.hdfs.fs.defaultFS.note"),
/**
* gateway config
*/
GAETWAY_KUBERNETS_TEST_FAILED(180, "gateway.kubernetes.test.failed"),
GAETWAY_KUBERNETS_TEST_SUCCESS(180, "gateway.kubernetes.test.success"),
; ;
private final int code; private final int code;
......
...@@ -228,3 +228,7 @@ sys.resource.settings.hdfs.root.user=HDFS operation user name ...@@ -228,3 +228,7 @@ sys.resource.settings.hdfs.root.user=HDFS operation user name
sys.resource.settings.hdfs.root.user.note=HDFS operation user name sys.resource.settings.hdfs.root.user.note=HDFS operation user name
sys.resource.settings.hdfs.fs.defaultFS=HDFS defaultFS sys.resource.settings.hdfs.fs.defaultFS=HDFS defaultFS
sys.resource.settings.hdfs.fs.defaultFS.note=fs.defaultFS configuration items, such as remote: hdfs://localhost:9000, local: file:/// sys.resource.settings.hdfs.fs.defaultFS.note=fs.defaultFS configuration items, such as remote: hdfs://localhost:9000, local: file:///
#Dinky Gateway
gateway.kubernetes.test.failed= failed to test the Flink configuration:
\ No newline at end of file
...@@ -226,3 +226,6 @@ sys.resource.settings.hdfs.root.user=HDFS操作用户名 ...@@ -226,3 +226,6 @@ sys.resource.settings.hdfs.root.user=HDFS操作用户名
sys.resource.settings.hdfs.root.user.note=HDFS操作用户名 sys.resource.settings.hdfs.root.user.note=HDFS操作用户名
sys.resource.settings.hdfs.fs.defaultFS=HDFS defaultFS sys.resource.settings.hdfs.fs.defaultFS=HDFS defaultFS
sys.resource.settings.hdfs.fs.defaultFS.note=fs.defaultFS 配置项,例如远程:hdfs://localhost:9000,本地:file:/// sys.resource.settings.hdfs.fs.defaultFS.note=fs.defaultFS 配置项,例如远程:hdfs://localhost:9000,本地:file:///
#Dinky Gateway
gateway.kubernetes.test.failed=测试 Flink 配置失败:
...@@ -36,6 +36,7 @@ import org.apache.flink.client.deployment.ClusterDescriptor; ...@@ -36,6 +36,7 @@ import org.apache.flink.client.deployment.ClusterDescriptor;
import org.apache.flink.client.deployment.ClusterSpecification; import org.apache.flink.client.deployment.ClusterSpecification;
import org.apache.flink.client.program.ClusterClient; import org.apache.flink.client.program.ClusterClient;
import org.apache.flink.configuration.CheckpointingOptions; import org.apache.flink.configuration.CheckpointingOptions;
import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.JobManagerOptions; import org.apache.flink.configuration.JobManagerOptions;
import org.apache.flink.configuration.TaskManagerOptions; import org.apache.flink.configuration.TaskManagerOptions;
...@@ -47,12 +48,15 @@ import java.util.Collection; ...@@ -47,12 +48,15 @@ import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import cn.hutool.core.text.StrFormatter;
/** /**
* AbstractGateway * AbstractGateway
* *
...@@ -90,6 +94,14 @@ public abstract class AbstractGateway implements Gateway { ...@@ -90,6 +94,14 @@ public abstract class AbstractGateway implements Gateway {
} }
} }
protected <T> void addConfigParas(ConfigOption<T> key, T value) {
if (Asserts.isNotNull(key) && Asserts.isNotNull(value)) {
this.configuration.set(key, value);
} else {
logger.warn("Gateway config key or value is null, key: {}, value: {}", key, value);
}
}
public SavePointResult savepointCluster() { public SavePointResult savepointCluster() {
return savepointCluster(null); return savepointCluster(null);
} }
...@@ -173,19 +185,19 @@ public abstract class AbstractGateway implements Gateway { ...@@ -173,19 +185,19 @@ public abstract class AbstractGateway implements Gateway {
throw new GatewayException("Couldn't deploy Flink Cluster with User Application Jar."); throw new GatewayException("Couldn't deploy Flink Cluster with User Application Jar.");
} }
protected void resetCheckpointInApplicationMode() { protected void resetCheckpointInApplicationMode(String jobName) {
String uuid = UUID.randomUUID().toString().replace("-", ""); String uuid = UUID.randomUUID().toString();
if (configuration.contains(CheckpointingOptions.CHECKPOINTS_DIRECTORY)) { String checkpointsDirectory = configuration.getString(CheckpointingOptions.CHECKPOINTS_DIRECTORY);
configuration.set( String savepointDirectory = configuration.getString(CheckpointingOptions.SAVEPOINT_DIRECTORY);
Optional.ofNullable(checkpointsDirectory)
.ifPresent(dir -> configuration.set(
CheckpointingOptions.CHECKPOINTS_DIRECTORY, CheckpointingOptions.CHECKPOINTS_DIRECTORY,
configuration.getString(CheckpointingOptions.CHECKPOINTS_DIRECTORY) + "/" + uuid); StrFormatter.format("{}/{}/{}", dir, jobName, uuid)));
}
if (configuration.contains(CheckpointingOptions.SAVEPOINT_DIRECTORY)) { Optional.ofNullable(savepointDirectory)
configuration.set( .ifPresent(dir -> configuration.set(
CheckpointingOptions.SAVEPOINT_DIRECTORY, CheckpointingOptions.SAVEPOINT_DIRECTORY, StrFormatter.format("{}/{}/{}", dir, jobName, uuid)));
configuration.getString(CheckpointingOptions.SAVEPOINT_DIRECTORY) + "/" + uuid);
}
} }
@Override @Override
......
...@@ -41,6 +41,7 @@ import java.util.Collection; ...@@ -41,6 +41,7 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import cn.hutool.core.text.StrFormatter;
import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
...@@ -63,7 +64,6 @@ public class KubernetesApplicationGateway extends KubernetesGateway { ...@@ -63,7 +64,6 @@ public class KubernetesApplicationGateway extends KubernetesGateway {
init(); init();
} }
combineFlinkConfig();
AppConfig appConfig = config.getAppConfig(); AppConfig appConfig = config.getAppConfig();
String[] userJarParas = String[] userJarParas =
Asserts.isNotNull(appConfig.getUserJarParas()) ? appConfig.getUserJarParas() : new String[0]; Asserts.isNotNull(appConfig.getUserJarParas()) ? appConfig.getUserJarParas() : new String[0];
...@@ -84,51 +84,52 @@ public class KubernetesApplicationGateway extends KubernetesGateway { ...@@ -84,51 +84,52 @@ public class KubernetesApplicationGateway extends KubernetesGateway {
clusterClient.listJobs().get(); clusterClient.listJobs().get();
int counts = SystemConfiguration.getInstances().getJobIdWait(); int counts = SystemConfiguration.getInstances().getJobIdWait();
while (jobStatusMessages.size() == 0 && counts > 0) { while (jobStatusMessages.isEmpty() && counts > 0) {
Thread.sleep(1000); Thread.sleep(1000);
counts--; counts--;
try { try {
jobStatusMessages = clusterClient.listJobs().get(); jobStatusMessages = clusterClient.listJobs().get();
logger.info("Get K8s Job list: {}", jobStatusMessages);
} catch (ExecutionException e) { } catch (ExecutionException e) {
logger.error("Get Job list Error: {}", e.getMessage());
if (StrUtil.contains(e.getMessage(), "Number of retries has been exhausted.")) { if (StrUtil.contains(e.getMessage(), "Number of retries has been exhausted.")) {
// refresh the job manager ip address // refresh the job manager ip address
clusterClient.close(); clusterClient.close();
clusterClient = clusterClientProvider.getClusterClient(); clusterClient = clusterClientProvider.getClusterClient();
} else { } else {
LogUtil.getError(e);
throw e; throw e;
} }
} }
if (!jobStatusMessages.isEmpty()) {
if (jobStatusMessages.size() > 0) {
break; break;
} }
} }
if (jobStatusMessages.size() > 0) { // application mode only have one job, so we can get any one to be jobId
String jobId = "";
if (!jobStatusMessages.isEmpty()) {
List<String> jids = new ArrayList<>(); List<String> jids = new ArrayList<>();
for (JobStatusMessage jobStatusMessage : jobStatusMessages) { for (JobStatusMessage jobStatusMessage : jobStatusMessages) {
jids.add(jobStatusMessage.getJobId().toHexString()); jobId = jobStatusMessage.getJobId().toHexString();
jids.add(jobId);
} }
result.setJids(jids); result.setJids(jids);
} }
String jobId = "";
// application mode only have one job, so we can get any one to be jobId
for (JobStatusMessage jobStatusMessage : jobStatusMessages) {
jobId = jobStatusMessage.getJobId().toHexString();
}
// if JobStatusMessage not have job id, it`s maybe wrong with submit,throw exception // if JobStatusMessage not have job id, it`s maybe wrong with submit,throw exception
if (TextUtils.isEmpty(jobId)) { if (TextUtils.isEmpty(jobId)) {
int cost = SystemConfiguration.getInstances().getJobIdWait() - counts; int cost = SystemConfiguration.getInstances().getJobIdWait() - counts;
String clusterId = clusterClient.getClusterId(); String clusterId = clusterClient.getClusterId();
throw new Exception("无法获得jobId请联系管理排查问题,等待时长:" + cost + ",job name:" + clusterId); throw new Exception(
StrFormatter.format("Unable to get JobID,wait time:{}, Job name:{}", cost, clusterId));
} }
result.setId(jobId); result.setId(jobId);
result.setWebURL(clusterClient.getWebInterfaceURL()); result.setWebURL(clusterClient.getWebInterfaceURL());
waitForTaskManagerToBeReady(result.getWebURL(), jobId); waitForTaskManagerToBeReady(result.getWebURL(), jobId);
result.success(); result.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("submit K8s Application error", e);
result.fail(LogUtil.getError(e)); result.fail(LogUtil.getError(e));
} }
return result; return result;
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
package org.dinky.gateway.kubernetes; package org.dinky.gateway.kubernetes;
import org.dinky.assertion.Asserts; import org.dinky.assertion.Asserts;
import org.dinky.data.enums.Status;
import org.dinky.gateway.AbstractGateway; import org.dinky.gateway.AbstractGateway;
import org.dinky.gateway.config.FlinkConfig; import org.dinky.gateway.config.FlinkConfig;
import org.dinky.gateway.config.GatewayConfig;
import org.dinky.gateway.config.K8sConfig; import org.dinky.gateway.config.K8sConfig;
import org.dinky.gateway.exception.GatewayException; import org.dinky.gateway.exception.GatewayException;
import org.dinky.gateway.result.SavePointResult; import org.dinky.gateway.result.SavePointResult;
...@@ -30,9 +30,7 @@ import org.dinky.gateway.result.TestResult; ...@@ -30,9 +30,7 @@ import org.dinky.gateway.result.TestResult;
import org.dinky.utils.TextUtil; import org.dinky.utils.TextUtil;
import org.apache.flink.configuration.ConfigOption; import org.apache.flink.configuration.ConfigOption;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.DeploymentOptions; import org.apache.flink.configuration.DeploymentOptions;
import org.apache.flink.configuration.DeploymentOptionsInternal;
import org.apache.flink.configuration.GlobalConfiguration; import org.apache.flink.configuration.GlobalConfiguration;
import org.apache.flink.configuration.PipelineOptions; import org.apache.flink.configuration.PipelineOptions;
import org.apache.flink.kubernetes.KubernetesClusterClientFactory; import org.apache.flink.kubernetes.KubernetesClusterClientFactory;
...@@ -45,15 +43,14 @@ import org.apache.flink.kubernetes.kubeclient.FlinkKubeClientFactory; ...@@ -45,15 +43,14 @@ import org.apache.flink.kubernetes.kubeclient.FlinkKubeClientFactory;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Collections; import java.util.Collections;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.Assert;
import cn.hutool.core.text.StrFormatter;
import cn.hutool.core.util.ReflectUtil; import cn.hutool.core.util.ReflectUtil;
/** /**
* KubernetesGateway * KubernetesGateway
* *
* @since 2021/12/26 14:09
*/ */
public abstract class KubernetesGateway extends AbstractGateway { public abstract class KubernetesGateway extends AbstractGateway {
...@@ -61,10 +58,6 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -61,10 +58,6 @@ public abstract class KubernetesGateway extends AbstractGateway {
public KubernetesGateway() {} public KubernetesGateway() {}
public KubernetesGateway(GatewayConfig config) {
super(config);
}
public void init() { public void init() {
initConfig(); initConfig();
initKubeClient(); initKubeClient();
...@@ -72,27 +65,35 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -72,27 +65,35 @@ public abstract class KubernetesGateway extends AbstractGateway {
private void initConfig() { private void initConfig() {
String flinkConfigPath = config.getClusterConfig().getFlinkConfigPath(); String flinkConfigPath = config.getClusterConfig().getFlinkConfigPath();
if (!TextUtil.isEmpty(flinkConfigPath)) { FlinkConfig flinkConfig = config.getFlinkConfig();
configuration = GlobalConfiguration.loadConfiguration(flinkConfigPath); K8sConfig k8sConfig = config.getKubernetesConfig();
try {
addConfigParas(
GlobalConfiguration.loadConfiguration(flinkConfigPath).toMap());
} catch (Exception e) {
logger.warn("load locale config yaml failed:{},Skip config it", e.getMessage());
} }
addConfigParas(KubernetesConfigOptions.FLINK_CONF_DIR, flinkConfigPath);
FlinkConfig flinkConfig = config.getFlinkConfig();
flinkConfig.getConfiguration().putAll(config.getKubernetesConfig().getConfiguration());
addConfigParas(flinkConfig.getConfiguration()); addConfigParas(flinkConfig.getConfiguration());
configuration.set(DeploymentOptions.TARGET, getType().getLongValue()); addConfigParas(k8sConfig.getConfiguration());
configuration.set(KubernetesConfigOptions.CLUSTER_ID, flinkConfig.getJobName()); addConfigParas(DeploymentOptions.TARGET, getType().getLongValue());
addConfigParas(KubernetesConfigOptions.CLUSTER_ID, flinkConfig.getJobName());
addConfigParas(
PipelineOptions.JARS,
Collections.singletonList(config.getAppConfig().getUserJarPath()));
K8sConfig k8sConfig = config.getKubernetesConfig();
preparPodTemplate(k8sConfig.getPodTemplate(), KubernetesConfigOptions.KUBERNETES_POD_TEMPLATE); preparPodTemplate(k8sConfig.getPodTemplate(), KubernetesConfigOptions.KUBERNETES_POD_TEMPLATE);
preparPodTemplate(k8sConfig.getJmPodTemplate(), KubernetesConfigOptions.JOB_MANAGER_POD_TEMPLATE); preparPodTemplate(k8sConfig.getJmPodTemplate(), KubernetesConfigOptions.JOB_MANAGER_POD_TEMPLATE);
preparPodTemplate(k8sConfig.getTmPodTemplate(), KubernetesConfigOptions.TASK_MANAGER_POD_TEMPLATE); preparPodTemplate(k8sConfig.getTmPodTemplate(), KubernetesConfigOptions.TASK_MANAGER_POD_TEMPLATE);
if (getType().isApplicationMode()) { if (getType().isApplicationMode()) {
resetCheckpointInApplicationMode(); resetCheckpointInApplicationMode(flinkConfig.getJobName());
} }
} }
public void preparPodTemplate(String podTemplate, ConfigOption<String> option) { private void preparPodTemplate(String podTemplate, ConfigOption<String> option) {
if (TextUtil.isEmpty(podTemplate)) { if (TextUtil.isEmpty(podTemplate)) {
return; return;
} }
...@@ -103,7 +104,7 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -103,7 +104,7 @@ public abstract class KubernetesGateway extends AbstractGateway {
Assert.isTrue(FileUtil.del(filePath)); Assert.isTrue(FileUtil.del(filePath));
} }
FileUtil.writeUtf8String(podTemplate, filePath); FileUtil.writeUtf8String(podTemplate, filePath);
configuration.set(option, filePath); addConfigParas(option, filePath);
} }
private void initKubeClient() { private void initKubeClient() {
...@@ -116,7 +117,7 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -116,7 +117,7 @@ public abstract class KubernetesGateway extends AbstractGateway {
} }
KubernetesClusterClientFactory clusterClientFactory = new KubernetesClusterClientFactory(); KubernetesClusterClientFactory clusterClientFactory = new KubernetesClusterClientFactory();
configuration.set( addConfigParas(
KubernetesConfigOptions.CLUSTER_ID, config.getClusterConfig().getAppId()); KubernetesConfigOptions.CLUSTER_ID, config.getClusterConfig().getAppId());
String clusterId = clusterClientFactory.getClusterId(configuration); String clusterId = clusterClientFactory.getClusterId(configuration);
if (Asserts.isNull(clusterId)) { if (Asserts.isNull(clusterId)) {
...@@ -138,16 +139,14 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -138,16 +139,14 @@ public abstract class KubernetesGateway extends AbstractGateway {
"No job id was specified. Please specify a job to which you would like to" + " savepont."); "No job id was specified. Please specify a job to which you would like to" + " savepont.");
} }
configuration.set( addConfigParas(
KubernetesConfigOptions.CLUSTER_ID, config.getClusterConfig().getAppId()); KubernetesConfigOptions.CLUSTER_ID, config.getClusterConfig().getAppId());
KubernetesClusterClientFactory clusterClientFactory = new KubernetesClusterClientFactory(); KubernetesClusterClientFactory clusterClientFactory = new KubernetesClusterClientFactory();
String clusterId = clusterClientFactory.getClusterId(configuration); String clusterId = clusterClientFactory.getClusterId(configuration);
if (Asserts.isNull(clusterId)) { if (Asserts.isNull(clusterId)) {
throw new GatewayException( throw new GatewayException(
"No cluster id was specified. Please specify a cluster to which you would like" + " to connect."); "No cluster id was specified. Please specify a cluster to which you would like" + " to connect.");
} }
KubernetesClusterDescriptor clusterDescriptor = clusterClientFactory.createClusterDescriptor(configuration); KubernetesClusterDescriptor clusterDescriptor = clusterClientFactory.createClusterDescriptor(configuration);
return runSavePointResult(savePoint, clusterId, clusterDescriptor); return runSavePointResult(savePoint, clusterId, clusterDescriptor);
...@@ -156,11 +155,6 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -156,11 +155,6 @@ public abstract class KubernetesGateway extends AbstractGateway {
public TestResult test() { public TestResult test() {
try { try {
initConfig(); initConfig();
} catch (Exception e) {
logger.error("测试 Flink 配置失败:" + e.getMessage());
return TestResult.fail("测试 Flink 配置失败:" + e.getMessage());
}
try {
initKubeClient(); initKubeClient();
if (client instanceof Fabric8FlinkKubeClient) { if (client instanceof Fabric8FlinkKubeClient) {
Object internalClient = ReflectUtil.getFieldValue(client, "internalClient"); Object internalClient = ReflectUtil.getFieldValue(client, "internalClient");
...@@ -171,11 +165,11 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -171,11 +165,11 @@ public abstract class KubernetesGateway extends AbstractGateway {
ReflectUtil.getFieldValue(versionInfo, "gitVersion"), ReflectUtil.getFieldValue(versionInfo, "gitVersion"),
ReflectUtil.getFieldValue(versionInfo, "platform")); ReflectUtil.getFieldValue(versionInfo, "platform"));
} }
logger.info("配置连接测试成功");
return TestResult.success(); return TestResult.success();
} catch (Exception e) { } catch (Exception e) {
logger.error("测试 Kubernetes 配置失败:", e); logger.error(Status.GAETWAY_KUBERNETS_TEST_FAILED.getMessage(), e);
return TestResult.fail("测试 Kubernetes 配置失败:" + ExceptionUtil.getRootCauseMessage(e)); return TestResult.fail(
StrFormatter.format("{}:{}", Status.GAETWAY_KUBERNETS_TEST_FAILED.getMessage(), e.getMessage()));
} }
} }
...@@ -184,7 +178,7 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -184,7 +178,7 @@ public abstract class KubernetesGateway extends AbstractGateway {
if (Asserts.isNull(client)) { if (Asserts.isNull(client)) {
init(); init();
} }
configuration.set( addConfigParas(
KubernetesConfigOptions.CLUSTER_ID, config.getClusterConfig().getAppId()); KubernetesConfigOptions.CLUSTER_ID, config.getClusterConfig().getAppId());
KubernetesClusterClientFactory clusterClientFactory = new KubernetesClusterClientFactory(); KubernetesClusterClientFactory clusterClientFactory = new KubernetesClusterClientFactory();
String clusterId = clusterClientFactory.getClusterId(configuration); String clusterId = clusterClientFactory.getClusterId(configuration);
...@@ -197,20 +191,7 @@ public abstract class KubernetesGateway extends AbstractGateway { ...@@ -197,20 +191,7 @@ public abstract class KubernetesGateway extends AbstractGateway {
try { try {
clusterDescriptor.killCluster(clusterId); clusterDescriptor.killCluster(clusterId);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); logger.error(e.getMessage(), e);
}
} }
protected void combineFlinkConfig() {
String flinkConfigPath = config.getClusterConfig().getFlinkConfigPath();
Configuration loadConfiguration = GlobalConfiguration.loadConfiguration(flinkConfigPath);
if (loadConfiguration != null) {
loadConfiguration.addAll(configuration);
configuration = loadConfiguration;
}
configuration.set(DeploymentOptionsInternal.CONF_DIR, flinkConfigPath);
configuration.set(
PipelineOptions.JARS,
Collections.singletonList(config.getAppConfig().getUserJarPath()));
} }
} }
...@@ -48,7 +48,6 @@ public class KubernetesSessionGateway extends KubernetesGateway { ...@@ -48,7 +48,6 @@ public class KubernetesSessionGateway extends KubernetesGateway {
init(); init();
} }
combineFlinkConfig();
ClusterSpecification.ClusterSpecificationBuilder clusterSpecificationBuilder = ClusterSpecification.ClusterSpecificationBuilder clusterSpecificationBuilder =
createClusterSpecificationBuilder(); createClusterSpecificationBuilder();
......
...@@ -122,7 +122,7 @@ public abstract class YarnGateway extends AbstractGateway { ...@@ -122,7 +122,7 @@ public abstract class YarnGateway extends AbstractGateway {
if (getType().isApplicationMode()) { if (getType().isApplicationMode()) {
configuration.set(YarnConfigOptions.APPLICATION_TYPE, "Dinky Flink"); configuration.set(YarnConfigOptions.APPLICATION_TYPE, "Dinky Flink");
resetCheckpointInApplicationMode(); resetCheckpointInApplicationMode(flinkConfig.getJobName());
} }
YarnLogConfigUtil.setLogConfigFileInConfig(configuration, clusterConfig.getFlinkConfigPath()); YarnLogConfigUtil.setLogConfigFileInConfig(configuration, clusterConfig.getFlinkConfigPath());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment