com.hazelcast.jet.config.ProcessingGuarantee Java Examples

The following examples show how to use com.hazelcast.jet.config.ProcessingGuarantee. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FlightTelemetry.java    From hazelcast-jet-demos with Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) {
    if (FlightDataSource.API_AUTHENTICATION_KEY.equals("YOUR_API_KEY_HERE")) {
         System.err.println("API_AUTHENTICATION_KEY not set in FlightDataSource.java");
         System.exit(1);
    }

    JetInstance jet = getJetInstance();

    Pipeline pipeline = buildPipeline();
    addListener(jet.getMap(TAKE_OFF_MAP), a -> System.out.println("New aircraft taking off: " + a));
    addListener(jet.getMap(LANDING_MAP), a -> System.out.println("New aircraft landing " + a));

    try {
        Job job = jet.newJob(pipeline, new JobConfig().setName("FlightTelemetry").setProcessingGuarantee(ProcessingGuarantee.EXACTLY_ONCE));
        job.join();
    } finally {
        Jet.shutdownAll();
    }
}
 
Example #2
Source File: TradeAnalysis.java    From hazelcast-jet-training with Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) {
    Pipeline p = buildPipeline();

    JetInstance jet = Jet.bootstrappedInstance();

    try {
        JobConfig jobConfig = new JobConfig()
                .setAutoScaling(true)
                .setName("TradeAnalysis")
                .setProcessingGuarantee(ProcessingGuarantee.EXACTLY_ONCE);

        jet.newJob(p, jobConfig).join();
    } finally {
        Jet.shutdownAll();
    }
}
 
Example #3
Source File: PulsarSourceTest.java    From hazelcast-jet-contrib with Apache License 2.0 4 votes vote down vote up
@Test
public void integrationTest_noSnapshotting() throws InterruptedException {
    integrationTest(ProcessingGuarantee.NONE);
}
 
Example #4
Source File: PulsarSourceTest.java    From hazelcast-jet-contrib with Apache License 2.0 4 votes vote down vote up
@Test
public void integrationTest_withSnapshotting() throws InterruptedException {
    integrationTest(ProcessingGuarantee.EXACTLY_ONCE);
}