Java Code Examples for com.hazelcast.jet.Jet#bootstrappedInstance()

The following examples show how to use com.hazelcast.jet.Jet#bootstrappedInstance() . 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: 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 2
Source File: Lab4.java    From hazelcast-jet-training with Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) {
    JetInstance jet = Jet.bootstrappedInstance();

    // symbol -> company name
    // random symbols from https://www.nasdaq.com
    IMap<String, String> lookupTable = jet.getMap(LOOKUP_TABLE);
    lookupTable.put("AAPL", "Apple Inc. - Common Stock");
    lookupTable.put("GOOGL", "Alphabet Inc.");
    lookupTable.put("MSFT", "Microsoft Corporation");

    Pipeline p = buildPipeline(lookupTable);

    try {
        jet.newJob(p).join();
    } finally {
        jet.shutdown();
    }
}
 
Example 3
Source File: Solution4.java    From hazelcast-jet-training with Apache License 2.0 6 votes vote down vote up
public static void main (String[] args) {
    JetInstance jet = Jet.bootstrappedInstance();

    // symbol -> company name
    IMap<String, String> lookupTable = jet.getMap(LOOKUP_TABLE);
    lookupTable.put("AAPL", "Apple Inc. - Common Stock");
    lookupTable.put("GOOGL", "Alphabet Inc.");
    lookupTable.put("MSFT", "Microsoft Corporation");

    Pipeline p = buildPipeline(lookupTable);
    try {
        jet.newJob(p).join();
    } finally {
        jet.shutdown();
    }
}
 
Example 4
Source File: Lab6.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
    Pipeline p = buildPipeline();

    JetInstance jet = Jet.bootstrappedInstance();

    try {
        Job job = jet.newJob(p);
        job.join();
    } finally {
        jet.shutdown();
    }
}
 
Example 5
Source File: Lab5.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main (String[] args) {
    Pipeline p = buildPipeline();

    JetInstance jet = Jet.bootstrappedInstance();

    try {
        Job job = jet.newJob(p);
        job.join();
    } finally {
        jet.shutdown();
    }
}
 
Example 6
Source File: Solution3.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main (String[] args) {
    JetInstance jet = Jet.bootstrappedInstance();

    jet.getMap(LATEST_TRADES_PER_SYMBOL).addEntryListener(new TradeListener(), true);

    Pipeline p = buildPipeline();
    try {
        jet.newJob(p).join();
    } finally {
        jet.shutdown();
    }
}
 
Example 7
Source File: Solution2.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
    Pipeline p = buildPipeline();

    JetInstance jet = Jet.bootstrappedInstance();

    try {
        jet.newJob(p).join();
    } finally {
        jet.shutdown();
    }
}
 
Example 8
Source File: Solution5.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
    Pipeline p = buildPipeline();

    JetInstance jet = Jet.bootstrappedInstance();

    try {
        Job job = jet.newJob(p);
        job.join();
    } finally {
        jet.shutdown();
    }
}
 
Example 9
Source File: Solution6.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {
    Pipeline p = buildPipeline();

    JetInstance jet = Jet.bootstrappedInstance();

    try {
        Job job = jet.newJob(p);
        job.join();
    } finally {
        jet.shutdown();
    }
}
 
Example 10
Source File: Lab1.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main (String[] args) {
    Pipeline p = buildPipeline();

    JetInstance jet = Jet.bootstrappedInstance();

    try {
        jet.newJob(p).join();
    } finally {
        jet.shutdown();
    }
}
 
Example 11
Source File: Lab3.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main (String[] args) {
    JetInstance jet = Jet.bootstrappedInstance();

    // Subscribe for map events
    jet.getMap(LATEST_TRADES_PER_SYMBOL).addEntryListener(new TradeListener(), true);

    Pipeline p = buildPipeline();
    try {
        jet.newJob(p).join();
    } finally {
        jet.shutdown();
    }
}
 
Example 12
Source File: Lab2.java    From hazelcast-jet-training with Apache License 2.0 5 votes vote down vote up
public static void main (String[] args) {
    Pipeline p = buildPipeline();

    JetInstance jet = Jet.bootstrappedInstance();

    try {
        jet.newJob(p).join();
    } finally {
        jet.shutdown();
    }
}