Search in sources :

Example 6 with ServerConf

use of com.linkedin.pinot.server.conf.ServerConf in project pinot by linkedin.

the class IntegrationTest method setUp.

@BeforeTest
public void setUp() throws Exception {
    //Process Command Line to get config and port
    FileUtils.deleteDirectory(new File("/tmp/pinot/test1"));
    setupSegmentList();
    File confFile = new File(TestUtils.getFileFromResourceUrl(InstanceServerStarter.class.getClassLoader().getResource("conf/" + PINOT_PROPERTIES)));
    // build _serverConf
    PropertiesConfiguration serverConf = new PropertiesConfiguration();
    serverConf.setDelimiterParsingDisabled(false);
    serverConf.load(confFile);
    _serverConf = new ServerConf(serverConf);
    LOGGER.info("Trying to create a new ServerInstance!");
    _serverInstance = new ServerInstance();
    LOGGER.info("Trying to initial ServerInstance!");
    _serverInstance.init(_serverConf, new MetricsRegistry());
    LOGGER.info("Trying to start ServerInstance!");
    _serverInstance.start();
    _queryExecutor = _serverInstance.getQueryExecutor();
    FileBasedInstanceDataManager instanceDataManager = (FileBasedInstanceDataManager) _serverInstance.getInstanceDataManager();
    for (int i = 0; i < 2; ++i) {
        instanceDataManager.getTableDataManager("testTable");
        instanceDataManager.getTableDataManager("testTable").addSegment(_indexSegmentList.get(i));
    }
}
Also used : MetricsRegistry(com.yammer.metrics.core.MetricsRegistry) ServerConf(com.linkedin.pinot.server.conf.ServerConf) FileBasedInstanceDataManager(com.linkedin.pinot.core.data.manager.offline.FileBasedInstanceDataManager) ServerInstance(com.linkedin.pinot.server.starter.ServerInstance) File(java.io.File) PropertiesConfiguration(org.apache.commons.configuration.PropertiesConfiguration) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

ServerConf (com.linkedin.pinot.server.conf.ServerConf)6 PropertiesConfiguration (org.apache.commons.configuration.PropertiesConfiguration)6 ServerInstance (com.linkedin.pinot.server.starter.ServerInstance)4 MetricsRegistry (com.yammer.metrics.core.MetricsRegistry)4 File (java.io.File)3 Configuration (org.apache.commons.configuration.Configuration)2 BrokerServerBuilder (com.linkedin.pinot.broker.broker.BrokerServerBuilder)1 DataManager (com.linkedin.pinot.common.data.DataManager)1 FileBasedInstanceDataManager (com.linkedin.pinot.core.data.manager.offline.FileBasedInstanceDataManager)1 InstanceServerStarter (com.linkedin.pinot.server.integration.InstanceServerStarter)1 AdminApiApplication (com.linkedin.pinot.server.starter.helix.AdminApiApplication)1 ConfigurationException (org.apache.commons.configuration.ConfigurationException)1 BeforeTest (org.testng.annotations.BeforeTest)1 Test (org.testng.annotations.Test)1