use of org.apache.storm.flux.model.TopologyDef in project storm by apache.
the class FluxParser method parseInputStream.
public static TopologyDef parseInputStream(InputStream inputStream, boolean dumpYaml, boolean processIncludes, String propertiesFile, boolean envSub) throws IOException {
Yaml yaml = yaml();
if (inputStream == null) {
LOG.error("Unable to load input stream");
System.exit(1);
}
TopologyDef topology = loadYaml(yaml, inputStream, propertiesFile, envSub);
if (dumpYaml) {
dumpYaml(topology, yaml);
}
if (processIncludes) {
return processIncludes(yaml, topology, propertiesFile, envSub);
} else {
return topology;
}
}
use of org.apache.storm.flux.model.TopologyDef in project storm by apache.
the class TCKTest method testTopologySourceWithGetMethodName.
@Test
public void testTopologySourceWithGetMethodName() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/existing-topology-reflection.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();
}
use of org.apache.storm.flux.model.TopologyDef in project storm by apache.
the class TCKTest method testTopologySourceWithMethodName.
@Test
public void testTopologySourceWithMethodName() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/existing-topology-method-override.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();
}
use of org.apache.storm.flux.model.TopologyDef in project storm by apache.
the class TCKTest method testTopologySourceWithReflection.
@Test
public void testTopologySourceWithReflection() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/existing-topology-reflection.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();
}
use of org.apache.storm.flux.model.TopologyDef in project storm by apache.
the class TCKTest method testTCK.
@Test
public void testTCK() throws Exception {
TopologyDef topologyDef = FluxParser.parseResource("/configs/tck.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();
}
Aggregations