bigtop-manager-stack/bigtop-manager-stack-extra/src/main/java/org/apache/bigtop/manager/stack/extra/v1_0_0/seatunnel/SeaTunnelMasterScript.java [97:112]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public ShellResult status(Params params) {
        SeaTunnelParams seatunnelParams = (SeaTunnelParams) params;
        String cmd =
                MessageFormat.format("ps -ef | grep -v grep | grep {0} | grep master", seatunnelParams.serviceHome());
        try {
            List<String> builderParameters = Arrays.asList("sh", "-c", cmd);
            ShellResult result = ShellExecutor.execCommand(builderParameters);
            if (result.getExitCode() == 0) {
                return ShellResult.success();
            } else {
                return new ShellResult(-1, "", "SeaTunnel master is not running");
            }
        } 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 [97:112]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public ShellResult status(Params params) {
        SeaTunnelParams seatunnelParams = (SeaTunnelParams) params;
        String cmd =
                MessageFormat.format("ps -ef | grep -v grep | grep {0} | grep worker", seatunnelParams.serviceHome());
        try {
            List<String> builderParameters = Arrays.asList("sh", "-c", cmd);
            ShellResult result = ShellExecutor.execCommand(builderParameters);
            if (result.getExitCode() == 0) {
                return ShellResult.success();
            } else {
                return new ShellResult(-1, "", "SeaTunnel worker is not running");
            }
        } catch (Exception e) {
            throw new StackException(e);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



