Search in sources :

Example 1 with ControllerStarter

use of com.linkedin.pinot.controller.ControllerStarter in project pinot by linkedin.

the class PerfBenchmarkDriver method startController.

private void startController() {
    if (!_conf.shouldStartController()) {
        LOGGER.info("Skipping start controller step. Assumes controller is already started.");
        return;
    }
    ControllerConf conf = getControllerConf();
    LOGGER.info("Starting controller at {}", _controllerAddress);
    new ControllerStarter(conf).start();
}
Also used : ControllerConf(com.linkedin.pinot.controller.ControllerConf) ControllerStarter(com.linkedin.pinot.controller.ControllerStarter)

Example 2 with ControllerStarter

use of com.linkedin.pinot.controller.ControllerStarter in project pinot by linkedin.

the class StartControllerCommand method execute.

@Override
public boolean execute() throws Exception {
    if (_controllerHost == null) {
        _controllerHost = NetUtil.getHostAddress();
    }
    ControllerConf conf = readConfigFromFile(_configFileName);
    if (conf == null) {
        if (_configFileName != null) {
            LOGGER.error("Error: Unable to find file {}.", _configFileName);
            return false;
        }
        conf = new ControllerConf();
        conf.setControllerHost(_controllerHost);
        conf.setControllerPort(_controllerPort);
        conf.setDataDir(_dataDir);
        conf.setZkStr(_zkAddress);
        conf.setHelixClusterName(_clusterName);
        conf.setControllerVipHost(_controllerHost);
        conf.setTenantIsolationEnabled(_tenantIsolation);
        conf.setRetentionControllerFrequencyInSeconds(3600 * 6);
        conf.setValidationControllerFrequencyInSeconds(3600);
    }
    LOGGER.info("Executing command: " + toString());
    final ControllerStarter starter = new ControllerStarter(conf);
    starter.start();
    String pidFile = ".pinotAdminController-" + String.valueOf(System.currentTimeMillis()) + ".pid";
    savePID(System.getProperty("java.io.tmpdir") + File.separator + pidFile);
    return true;
}
Also used : ControllerConf(com.linkedin.pinot.controller.ControllerConf) ControllerStarter(com.linkedin.pinot.controller.ControllerStarter)

Example 3 with ControllerStarter

use of com.linkedin.pinot.controller.ControllerStarter in project pinot by linkedin.

the class ControllerTestUtils method startController.

public static ControllerStarter startController(final String clusterName, final String zkStr, final ControllerConf configuration) {
    configuration.setHelixClusterName(clusterName);
    configuration.setZkStr(zkStr);
    ControllerStarter controllerStarter = new ControllerStarter(configuration);
    controllerStarter.start();
    return controllerStarter;
}
Also used : ControllerStarter(com.linkedin.pinot.controller.ControllerStarter)

Aggregations

ControllerStarter (com.linkedin.pinot.controller.ControllerStarter)3 ControllerConf (com.linkedin.pinot.controller.ControllerConf)2