use of com.linkedin.pinot.broker.broker.BrokerServerBuilder in project pinot by linkedin.
the class FileBasedServerBrokerStarters method startAll.
public void startAll() throws Exception {
final PropertiesConfiguration broker = brokerProperties();
final PropertiesConfiguration server = serverProperties();
log(broker, "broker");
log(server, "server");
System.out.println("************************ 1");
serverInstance = new ServerInstance();
System.out.println("************************ 2");
serverInstance.init(new ServerConf(server), new MetricsRegistry());
System.out.println("************************ 3");
bld = new BrokerServerBuilder(broker, null, null, null);
System.out.println("************************ 4");
bld.buildNetwork();
System.out.println("************************ 5");
bld.buildHTTP();
System.out.println("************************ 6");
startServer();
startBroker();
}
use of com.linkedin.pinot.broker.broker.BrokerServerBuilder in project pinot by linkedin.
the class HelixBrokerStarter method startBroker.
private BrokerServerBuilder startBroker(Configuration config) throws Exception {
if (config == null) {
config = DefaultHelixBrokerConfig.getDefaultBrokerConf();
}
final BrokerServerBuilder brokerServerBuilder = new BrokerServerBuilder(config, _helixExternalViewBasedRouting, _helixExternalViewBasedRouting.getTimeBoundaryService(), _liveInstancesListener);
brokerServerBuilder.buildNetwork();
brokerServerBuilder.buildHTTP();
_helixExternalViewBasedRouting.setBrokerMetrics(brokerServerBuilder.getBrokerMetrics());
brokerServerBuilder.start();
LOGGER.info("Pinot broker ready and listening on port {} for API requests", config.getProperty("pinot.broker.client.queryPort"));
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
try {
brokerServerBuilder.stop();
} catch (final Exception e) {
LOGGER.error("Caught exception while running shutdown hook", e);
}
}
});
return brokerServerBuilder;
}
Aggregations