bigtop-manager-stack/bigtop-manager-stack-extra/src/main/java/org/apache/bigtop/manager/stack/extra/v1_0_0/seatunnel/SeaTunnelMasterScript.java [57:81]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public ShellResult start(Params params) {
        configure(params);
        SeaTunnelParams seatunnelParams = (SeaTunnelParams) params;
        String cmd = MessageFormat.format("{0}/bin/seatunnel-cluster.sh -d -r master", seatunnelParams.serviceHome());
        try {
            ShellResult shellResult = LinuxOSUtils.sudoExecCmd(cmd, seatunnelParams.user());
            if (shellResult.getExitCode() != 0) {
                throw new StackException("Failed to start seatunnel master: {0}", shellResult.getErrMsg());
            }
            long startTime = System.currentTimeMillis();
            long maxWaitTime = 5000;
            long pollInterval = 500;

            while (System.currentTimeMillis() - startTime < maxWaitTime) {
                ShellResult statusResult = status(params);
                if (statusResult.getExitCode() == 0) {
                    return statusResult;
                }
                Thread.sleep(pollInterval);
            }
            return status(params);
        } catch (Exception e) {
            throw new StackException(e);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



bigtop-manager-stack/bigtop-manager-stack-extra/src/main/java/org/apache/bigtop/manager/stack/extra/v1_0_0/seatunnel/SeaTunnelWorkerScript.java [57:81]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public ShellResult start(Params params) {
        configure(params);
        SeaTunnelParams seatunnelParams = (SeaTunnelParams) params;
        String cmd = MessageFormat.format("{0}/bin/seatunnel-cluster.sh -d -r worker", seatunnelParams.serviceHome());
        try {
            ShellResult shellResult = LinuxOSUtils.sudoExecCmd(cmd, seatunnelParams.user());
            if (shellResult.getExitCode() != 0) {
                throw new StackException("Failed to start seatunnel worker: {0}", shellResult.getErrMsg());
            }
            long startTime = System.currentTimeMillis();
            long maxWaitTime = 5000;
            long pollInterval = 500;

            while (System.currentTimeMillis() - startTime < maxWaitTime) {
                ShellResult statusResult = status(params);
                if (statusResult.getExitCode() == 0) {
                    return statusResult;
                }
                Thread.sleep(pollInterval);
            }
            return status(params);
        } catch (Exception e) {
            throw new StackException(e);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



