public static void main(String[] args) throws Exception {
        JobParamsInfo jobParamsInfo = parseArgs(args);
        ClusterMode execMode = ClusterMode.valueOf(jobParamsInfo.getMode());

        switch (execMode) {
            case local:
                Main.main(jobParamsInfo.getExecArgs());
                break;
            case yarn:
                new YarnSessionClusterExecutor(jobParamsInfo).exec();
                break;
            case yarnPer:
                new YarnJobClusterExecutor(jobParamsInfo).exec();
                break;
            case standalone:
                new StandaloneExecutor(jobParamsInfo).exec();
                break;
            default:
                throw new RuntimeException("Unsupported operating mode, please use local,yarn,yarnPer");
        }
    }
Date: 2017/2/20
Company: www.dtstack.com
@author xuchao
launcher/src/main/java/com/dtstack/flink/sql/launcher/LauncherMain.java