use of org.apache.storm.flux.model.ExecutionContext in project storm by apache.
the class TCKTest method testKafkaSpoutConfig.
@Test
public void testKafkaSpoutConfig() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/kafka_test.yaml", false, true, null, false);
Config conf = FluxBuilder.buildConfig(topologyDef);
ExecutionContext context = new ExecutionContext(topologyDef, conf);
StormTopology topology = FluxBuilder.buildTopology(context);
assertNotNull(topology);
topology.validate();
}
use of org.apache.storm.flux.model.ExecutionContext in project storm by apache.
the class TCKTest method testShellComponents.
@Test
public void testShellComponents() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/shell_test.yaml", false, true, null, false);
Config conf = FluxBuilder.buildConfig(topologyDef);
ExecutionContext context = new ExecutionContext(topologyDef, conf);
StormTopology topology = FluxBuilder.buildTopology(context);
assertNotNull(topology);
topology.validate();
}
use of org.apache.storm.flux.model.ExecutionContext in project storm by apache.
the class TCKTest method testHdfs.
@Test
public void testHdfs() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/hdfs_test.yaml", false, true, null, false);
Config conf = FluxBuilder.buildConfig(topologyDef);
ExecutionContext context = new ExecutionContext(topologyDef, conf);
StormTopology topology = FluxBuilder.buildTopology(context);
assertNotNull(topology);
topology.validate();
}
use of org.apache.storm.flux.model.ExecutionContext in project storm by apache.
the class TCKTest method testBadHbase.
@Test(expected = IllegalArgumentException.class)
public void testBadHbase() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/bad_hbase.yaml", false, true, null, false);
Config conf = FluxBuilder.buildConfig(topologyDef);
ExecutionContext context = new ExecutionContext(topologyDef, conf);
StormTopology topology = FluxBuilder.buildTopology(context);
assertNotNull(topology);
topology.validate();
}
use of org.apache.storm.flux.model.ExecutionContext in project storm by apache.
the class TCKTest method testTopologySourceWithConfigParam.
@Test
public void testTopologySourceWithConfigParam() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/existing-topology-reflection-config.yaml", false, true, null, false);
assertTrue(topologyDef.validate());
Config conf = FluxBuilder.buildConfig(topologyDef);
ExecutionContext context = new ExecutionContext(topologyDef, conf);
StormTopology topology = FluxBuilder.buildTopology(context);
assertNotNull(topology);
topology.validate();
}
Aggregations