Java Code Examples for org.apache.rocketmq.common.namesrv.NamesrvConfig#setKvConfigPath()
The following examples show how to use
org.apache.rocketmq.common.namesrv.NamesrvConfig#setKvConfigPath() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IntegrationTestBase.java From DDMQ with Apache License 2.0 | 6 votes |
public static NamesrvController createAndStartNamesrv() { String baseDir = createBaseDir(); NamesrvConfig namesrvConfig = new NamesrvConfig(); NettyServerConfig nameServerNettyServerConfig = new NettyServerConfig(); namesrvConfig.setKvConfigPath(baseDir + SEP + "namesrv" + SEP + "kvConfig.json"); namesrvConfig.setConfigStorePath(baseDir + SEP + "namesrv" + SEP + "namesrv.properties"); nameServerNettyServerConfig.setListenPort(9000 + random.nextInt(1000)); NamesrvController namesrvController = new NamesrvController(namesrvConfig, nameServerNettyServerConfig); try { Assert.assertTrue(namesrvController.initialize()); logger.info("Name Server Start:{}", nameServerNettyServerConfig.getListenPort()); namesrvController.start(); } catch (Exception e) { logger.info("Name Server start failed"); System.exit(1); } NAMESRV_CONTROLLERS.add(namesrvController); return namesrvController; }
Example 2
Source File: IntegrationTestBase.java From rocketmq-4.3.0 with Apache License 2.0 | 6 votes |
public static NamesrvController createAndStartNamesrv() { String baseDir = createBaseDir(); NamesrvConfig namesrvConfig = new NamesrvConfig(); NettyServerConfig nameServerNettyServerConfig = new NettyServerConfig(); namesrvConfig.setKvConfigPath(baseDir + SEP + "namesrv" + SEP + "kvConfig.json"); namesrvConfig.setConfigStorePath(baseDir + SEP + "namesrv" + SEP + "namesrv.properties"); nameServerNettyServerConfig.setListenPort(9000 + random.nextInt(1000)); NamesrvController namesrvController = new NamesrvController(namesrvConfig, nameServerNettyServerConfig); try { Assert.assertTrue(namesrvController.initialize()); logger.info("Name Server Start:{}", nameServerNettyServerConfig.getListenPort()); namesrvController.start(); } catch (Exception e) { logger.info("Name Server start failed"); System.exit(1); } NAMESRV_CONTROLLERS.add(namesrvController); return namesrvController; }
Example 3
Source File: IntegrationTestBase.java From rocketmq-read with Apache License 2.0 | 6 votes |
public static NamesrvController createAndStartNamesrv() { String baseDir = createBaseDir(); NamesrvConfig namesrvConfig = new NamesrvConfig(); NettyServerConfig nameServerNettyServerConfig = new NettyServerConfig(); namesrvConfig.setKvConfigPath(baseDir + SEP + "namesrv" + SEP + "kvConfig.json"); namesrvConfig.setConfigStorePath(baseDir + SEP + "namesrv" + SEP + "namesrv.properties"); nameServerNettyServerConfig.setListenPort(9000 + random.nextInt(1000)); NamesrvController namesrvController = new NamesrvController(namesrvConfig, nameServerNettyServerConfig); try { Assert.assertTrue(namesrvController.initialize()); logger.info("Name Server Start:{}", nameServerNettyServerConfig.getListenPort()); namesrvController.start(); } catch (Exception e) { logger.info("Name Server start failed"); System.exit(1); } NAMESRV_CONTROLLERS.add(namesrvController); return namesrvController; }
Example 4
Source File: IntegrationTestBase.java From rocketmq with Apache License 2.0 | 6 votes |
public static NamesrvController createAndStartNamesrv() { String baseDir = createBaseDir(); NamesrvConfig namesrvConfig = new NamesrvConfig(); NettyServerConfig nameServerNettyServerConfig = new NettyServerConfig(); namesrvConfig.setKvConfigPath(baseDir + SEP + "namesrv" + SEP + "kvConfig.json"); namesrvConfig.setConfigStorePath(baseDir + SEP + "namesrv" + SEP + "namesrv.properties"); nameServerNettyServerConfig.setListenPort(9000 + random.nextInt(1000)); NamesrvController namesrvController = new NamesrvController(namesrvConfig, nameServerNettyServerConfig); try { Assert.assertTrue(namesrvController.initialize()); logger.info("Name Server Start:{}", nameServerNettyServerConfig.getListenPort()); namesrvController.start(); } catch (Exception e) { logger.info("Name Server start failed"); System.exit(1); } NAMESRV_CONTROLLERS.add(namesrvController); return namesrvController; }
Example 5
Source File: IntegrationTestBase.java From DDMQ with Apache License 2.0 | 6 votes |
public static NamesrvController createAndStartNamesrv() { String baseDir = createBaseDir(); NamesrvConfig namesrvConfig = new NamesrvConfig(); NettyServerConfig nameServerNettyServerConfig = new NettyServerConfig(); namesrvConfig.setKvConfigPath(baseDir + SEP + "namesrv" + SEP + "kvConfig.json"); namesrvConfig.setConfigStorePath(baseDir + SEP + "namesrv" + SEP + "namesrv.properties"); nameServerNettyServerConfig.setListenPort(9000 + random.nextInt(1000)); NamesrvController namesrvController = new NamesrvController(namesrvConfig, nameServerNettyServerConfig); try { Assert.assertTrue(namesrvController.initialize()); logger.info("Name Server Start:{}", nameServerNettyServerConfig.getListenPort()); namesrvController.start(); } catch (Exception e) { logger.info("Name Server start failed"); System.exit(1); } NAMESRV_CONTROLLERS.add(namesrvController); return namesrvController; }
Example 6
Source File: IntegrationTestBase.java From rocketmq-all-4.1.0-incubating with Apache License 2.0 | 6 votes |
public static NamesrvController createAndStartNamesrv() { String baseDir = createBaseDir(); NamesrvConfig namesrvConfig = new NamesrvConfig(); NettyServerConfig nameServerNettyServerConfig = new NettyServerConfig(); namesrvConfig.setKvConfigPath(baseDir + SEP + "namesrv" + SEP + "kvConfig.json"); namesrvConfig.setConfigStorePath(baseDir + SEP + "namesrv" + SEP + "namesrv.properties"); nameServerNettyServerConfig.setListenPort(9000 + random.nextInt(1000)); NamesrvController namesrvController = new NamesrvController(namesrvConfig, nameServerNettyServerConfig); try { Assert.assertTrue(namesrvController.initialize()); logger.info("Name Server Start:{}", nameServerNettyServerConfig.getListenPort()); namesrvController.start(); } catch (Exception e) { logger.info("Name Server start failed"); System.exit(1); } NAMESRV_CONTROLLERS.add(namesrvController); return namesrvController; }
Example 7
Source File: IntegrationTestBase.java From rocketmq_trans_message with Apache License 2.0 | 6 votes |
public static NamesrvController createAndStartNamesrv() { String baseDir = createBaseDir(); NamesrvConfig namesrvConfig = new NamesrvConfig(); NettyServerConfig nameServerNettyServerConfig = new NettyServerConfig(); namesrvConfig.setKvConfigPath(baseDir + SEP + "namesrv" + SEP + "kvConfig.json"); namesrvConfig.setConfigStorePath(baseDir + SEP + "namesrv" + SEP + "namesrv.properties"); nameServerNettyServerConfig.setListenPort(9000 + random.nextInt(1000)); NamesrvController namesrvController = new NamesrvController(namesrvConfig, nameServerNettyServerConfig); try { Assert.assertTrue(namesrvController.initialize()); logger.info("Name Server Start:{}", nameServerNettyServerConfig.getListenPort()); namesrvController.start(); } catch (Exception e) { logger.info("Name Server start failed"); System.exit(1); } NAMESRV_CONTROLLERS.add(namesrvController); return namesrvController; }
Example 8
Source File: IntegrationTestBase.java From rocketmq with Apache License 2.0 | 6 votes |
public static NamesrvController createAndStartNamesrv() { String baseDir = createBaseDir(); NamesrvConfig namesrvConfig = new NamesrvConfig(); NettyServerConfig nameServerNettyServerConfig = new NettyServerConfig(); namesrvConfig.setKvConfigPath(baseDir + SEP + "namesrv" + SEP + "kvConfig.json"); namesrvConfig.setConfigStorePath(baseDir + SEP + "namesrv" + SEP + "namesrv.properties"); nameServerNettyServerConfig.setListenPort(nextPort()); NamesrvController namesrvController = new NamesrvController(namesrvConfig, nameServerNettyServerConfig); try { Assert.assertTrue(namesrvController.initialize()); logger.info("Name Server Start:{}", nameServerNettyServerConfig.getListenPort()); namesrvController.start(); } catch (Exception e) { logger.info("Name Server start failed", e); System.exit(1); } NAMESRV_CONTROLLERS.add(namesrvController); return namesrvController; }