use of com.ibm.streamsx.topology.context.StreamsContext in project streamsx.topology by IBMStreams.
the class StatefulApp method main.
public static void main(String[] args) throws InterruptedException, ExecutionException, Exception {
String contextType = Type.DISTRIBUTED.name();
if (args.length == 1)
contextType = args[0];
Topology topology = new Topology();
createApp(topology, false, true);
Map<String, Object> config = new HashMap<>();
@SuppressWarnings("unchecked") StreamsContext<BigInteger> context = (StreamsContext<BigInteger>) StreamsContextFactory.getStreamsContext(contextType);
BigInteger jobId = context.submit(topology, config).get();
System.out.println("Submitted job with jobId=" + jobId);
}
use of com.ibm.streamsx.topology.context.StreamsContext in project streamsx.topology by IBMStreams.
the class StatefulAppCR method main.
public static void main(String[] args) throws InterruptedException, ExecutionException, Exception {
String contextType = Type.DISTRIBUTED.name();
if (args.length == 1)
contextType = args[0];
Topology topology = new Topology();
createApp(topology, true);
Map<String, Object> config = new HashMap<>();
@SuppressWarnings("unchecked") StreamsContext<BigInteger> context = (StreamsContext<BigInteger>) StreamsContextFactory.getStreamsContext(contextType);
BigInteger jobId = context.submit(topology, config).get();
System.out.println("Submitted job with jobId=" + jobId);
}
Aggregations