Skip to content

Commit

Permalink
Set default DeployMode to DeployMode.CLIENT
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanwenjun committed Nov 3, 2023
1 parent 70cca95 commit e5be4e9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private Common() {

private static final int PLUGIN_LIB_DIR_DEPTH = 3;

private static DeployMode MODE;
private static DeployMode MODE = DeployMode.CLIENT;

private static String SEATUNNEL_HOME;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

package org.apache.seatunnel.engine.e2e;

import org.apache.seatunnel.common.config.Common;
import org.apache.seatunnel.common.config.DeployMode;
import org.apache.seatunnel.engine.client.SeaTunnelClient;
import org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment;
import org.apache.seatunnel.engine.client.job.ClientJobProxy;
Expand Down Expand Up @@ -63,7 +61,6 @@ void beforeClass() throws Exception {
SeaTunnelConfig seaTunnelConfig = ConfigProvider.locateAndGetSeaTunnelConfig();
seaTunnelConfig.getHazelcastConfig().setClusterName(testClusterName);
hazelcastInstance = SeaTunnelServerStarter.createHazelcastInstance(seaTunnelConfig);
Common.setDeployMode(DeployMode.CLIENT);
String filePath = TestUtils.getResource("stream_fakesource_to_file.conf");
JobConfig jobConfig = new JobConfig();
jobConfig.setName("fake_to_file");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import org.apache.seatunnel.shade.com.fasterxml.jackson.databind.JsonNode;
import org.apache.seatunnel.shade.com.typesafe.config.Config;

import org.apache.seatunnel.common.config.Common;
import org.apache.seatunnel.common.config.DeployMode;
import org.apache.seatunnel.common.utils.JsonUtils;
import org.apache.seatunnel.engine.common.Constant;
import org.apache.seatunnel.engine.common.config.JobConfig;
Expand Down Expand Up @@ -97,9 +95,7 @@ private void handleSubmitJob(HttpPostCommand httpPostCommand, String uri)
Config config = RestUtil.buildConfig(requestHandle(httpPostCommand));
JobConfig jobConfig = new JobConfig();
jobConfig.setName(requestParams.get(RestConstant.JOB_NAME));
if (Common.getDeployMode() == null) {
Common.setDeployMode(DeployMode.CLIENT);
}

boolean startWithSavePoint =
Boolean.parseBoolean(requestParams.get(RestConstant.IS_START_WITH_SAVE_POINT));
RestJobExecutionEnvironment restJobExecutionEnvironment =
Expand Down

0 comments on commit e5be4e9

Please sign in to comment.