Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Adapt new version of Doris & Fix issue of excute shell timeout exception #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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 @@ -447,7 +447,7 @@ private void executePkgShellScriptWithBash(String scriptName, String runningDir,
}

private int executeShell(String shellCmd, Map<String, String> environment) throws Exception {
return ShellUtil.executeShellWithoutOutput(shellCmd, new int[]{0}, 1, environment);
return ShellUtil.executeShellWithoutOutput(shellCmd, new int[]{0}, ServerAndAgentConstant.SHELL_TIME_OUT, environment);
}

private void createDataPath(String path) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static int executeShellWithoutOutput(String shellCmd, int[] succExitValue

CommandLine cmdLine = CommandLine.parse(shellCmd);
DefaultExecutor executor = new DefaultExecutor();
// If the running time exceeds 1 minute, it will be judged as execution failure
// If the running time exceeds shellTimeout minute, it will be judged as execution failure
ExecuteWatchdog watchdog = new ExecuteWatchdog(shellTimeout * 60 * 1000);
executor.setWatchdog(watchdog);
executor.setExitValues(succExitValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private ServerAndAgentConstant() {
public static final String BAIDU_BROKER_PID_FILE = "baidu_doris_broker.pid";

public static final String FE_PID_NAME = "PaloFe";
public static final String BE_PID_NAME = "palo_be";
public static final String BE_PID_NAME = "doris_be";
public static final String BROKER_PID_NAME = "BrokerBootstrap";

public static final String FE_START_SCRIPT = "start_fe.sh";
Expand All @@ -66,6 +66,7 @@ private ServerAndAgentConstant() {
public static final String BAIDU_BROKER_CONF_FILE = "baidu_doris_broker.conf";

public static final String PACKAGE_DOWNLOAD_SCRIPT = "download_doris.sh";
public static final int SHELL_TIME_OUT = 2;

// TODO:Later, it will be defined uniformly through the cluster module service template
public static final String FE_JDBC_SERVICE = "fe_jdbc";
Expand Down