use of com.ctrip.xpipe.redis.meta.server.cluster.impl.ArrangeTaskTrigger in project x-pipe by ctripcorp.
the class TestMetaServer method doStart.
@Override
public void doStart() throws Exception {
System.setProperty(DefaultDcMetaCache.MEMORY_META_SERVER_DAO_KEY, configFile);
System.setProperty("TOTAL_SLOTS", String.valueOf(total_slots));
SpringApplication application = new SpringApplication(TestMetaServer.class);
application.setBannerMode(Mode.OFF);
application.setEnvironment(createEnvironment());
context = application.run(new String[] {});
TestZkClient client = context.getBean(TestZkClient.class);
DefaultZkConfig zkConfig = new DefaultZkConfig();
zkConfig.setZkSessionTimeoutMillis(zkSessionTimeoutMillis);
client.setZkConfig(zkConfig);
client.setZkAddress(zkConnectionStr);
UnitTestServerConfig config = context.getBean(UnitTestServerConfig.class);
config.setZkAddress(zkConnectionStr);
config.setMetaServerId(serverId);
config.setMetaServerPort(serverPort);
ArrangeTaskTrigger arrangeTaskTrigger = context.getBean(ArrangeTaskTrigger.class);
arrangeTaskTrigger.setWaitForRestartTimeMills(waitForRestartTimeMills);
manager = context.getBean(SpringComponentRegistry.class);
manager.initialize();
manager.start();
}
Aggregations