当前位置: 首页>>代码示例>>Java>>正文


Java CompleteTopologyParam类代码示例

本文整理汇总了Java中org.apache.storm.testing.CompleteTopologyParam的典型用法代码示例。如果您正苦于以下问题:Java CompleteTopologyParam类的具体用法?Java CompleteTopologyParam怎么用?Java CompleteTopologyParam使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CompleteTopologyParam类属于org.apache.storm.testing包,在下文中一共展示了CompleteTopologyParam类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupOnce

import org.apache.storm.testing.CompleteTopologyParam; //导入依赖的package包/类
@BeforeClass
public static void setupOnce() throws Exception {
    System.out.println("------> Creating Sheep \uD83D\uDC11\n");

    clusterParam = new MkClusterParam();
    clusterParam.setSupervisors(1);
    Config daemonConfig = new Config();
    daemonConfig.put(Config.STORM_LOCAL_MODE_ZMQ, false);
    clusterParam.setDaemonConf(daemonConfig);
    makeConfigFile();

    Config conf = new Config();
    conf.setNumWorkers(1);

    completeTopologyParam = new CompleteTopologyParam();
    completeTopologyParam.setStormConf(conf);
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:18,代码来源:StableAbstractStormTest.java

示例2: verifyEmittedValues

import org.apache.storm.testing.CompleteTopologyParam; //导入依赖的package包/类
@Test
public void verifyEmittedValues() {
	MkClusterParam clusterParam = new MkClusterParam();
	clusterParam.setSupervisors(1);

	withSimulatedTimeLocalCluster(clusterParam, new TestJob() {
		
		@Override
		public void run(ILocalCluster cluster) throws JsonProcessingException {
			
			MockedSources mockedSources = new MockedSources();
			mockedSources.addMockData(builder.getSpoutId(), new Values(SWITCH_ID));

			Config config = new Config();
			config.setDebug(true);

			CompleteTopologyParam topologyParam = new CompleteTopologyParam();
			topologyParam.setMockedSources(mockedSources);
			topologyParam.setStormConf(config);

			Map<?, ?> result = completeTopology(cluster, builder.build(), topologyParam);
			assertTrue(multiseteq(new Values(new Values(SWITCH_ID)),
					readTuples(result, builder.getSpoutId())));
			assertTrue(multiseteq(new Values(new Values(SWITCH_ID)),
					readTuples(result, builder.getConfirmationBoltId())));
		}
		
	});
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:30,代码来源:TopologyTest.java


注:本文中的org.apache.storm.testing.CompleteTopologyParam类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。