All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.datastax.insight.core.mesos.MCDLauncher Maven / Gradle / Ivy

package com.datastax.insight.core.mesos;

import com.datastax.util.lang.ProcessUtil;
import com.datastax.util.lang.SystemUtil;

/**
 * Mesos Cluster Dispatcher Launcher
 */
public class MCDLauncher {
    final static String START_SH ="/sbin/start-mesos-dispatcher.sh";
    final static String STOP_SH ="/sbin/stop-mesos-dispatcher.sh";

    public final static String DEFAULT_CLUSTER_URL="mesos://"+ SystemUtil.getHostName()+":7077";

    public static void launch(String sparkDir,String mesosUrl, String host){
        String cmd=sparkDir+ START_SH +" -m "+mesosUrl + " -h " + host;
        new ProcessUtil().executeBlock(cmd);
    }

    public static void stop(String sparkDir){
        String cmd=sparkDir+ STOP_SH;
        new ProcessUtil().executeBlock(cmd);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy