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));
}
}
Aggregations