本文整理汇总了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);
}
示例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())));
}
});
}