Skip to content

Commit

Permalink
[Fix-2778] [gateway] Fix starting the flink 1.15 session fails
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwenmo committed Dec 25, 2023
1 parent 6d068bf commit 500e02b
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.dinky.cluster.FlinkCluster;
import org.dinky.cluster.FlinkClusterInfo;
import org.dinky.data.dto.ClusterInstanceDTO;
import org.dinky.data.exception.DinkyException;
import org.dinky.data.model.ClusterConfiguration;
import org.dinky.data.model.ClusterInstance;
import org.dinky.gateway.config.GatewayConfig;
Expand Down Expand Up @@ -203,13 +204,17 @@ public ClusterInstance deploySessionCluster(Integer id) {
GatewayConfig.build(FlinkClusterConfig.create(clusterCfg.getType(), clusterCfg.getConfigJson()));
gatewayConfig.setType(gatewayConfig.getType().getSessionType());
GatewayResult gatewayResult = JobManager.deploySessionCluster(gatewayConfig);
return registersCluster(ClusterInstanceDTO.autoRegistersClusterDTO(
gatewayResult.getWebURL().replace("http://", ""),
gatewayResult.getId(),
clusterCfg.getName() + "_" + LocalDateTime.now(),
clusterCfg.getName() + LocalDateTime.now(),
id,
null));
if (gatewayResult.isSuccess()) {
Asserts.checkNullString(gatewayResult.getWebURL(), "Unable to obtain Web URL.");
return registersCluster(ClusterInstanceDTO.autoRegistersClusterDTO(
gatewayResult.getWebURL().replace("http://", ""),
gatewayResult.getId(),
clusterCfg.getName() + "_" + LocalDateTime.now(),
clusterCfg.getName() + LocalDateTime.now(),
id,
null));
}
throw new DinkyException("Deploy session cluster error: " + gatewayResult.getError());
}

/**
Expand Down

0 comments on commit 500e02b

Please sign in to comment.