Hazelcast Jet Code Samples
A repository of code samples for Hazelcast Jet. It covers the high-level APIs (pipelines and java.util.stream) as well as the lower-level Core API. This is the basic layout of the directories:
batch: batch jobs with high-level APIs
streaming: streaming jobs with high-level APIs
pcf: a sample application on the Pivotal Cloud Foundry infrastructure
core-api/batch: batch jobs with the Core API
core-api/streaming: streaming jobs with the Core API
sample-data: a module containing the sample data shared by several samples
refman: code snippets used in the Reference Manual
Analyzes access log files from an HTTP server. Demonstrates the usage of file sources and sinks.
This sample shows, how to enrich batch of items with additional information by matching them by key
Uses the co-group transform to perform a full outer join of three streams on a common join key (a many-to-many relationship).
Demonstrates implementation of a Hazelcast
ITopicsink with a sample which does text filtering on the books with the Pipeline API.
Demonstrates the usage of Hazelcast
IListas data sources and sinks.
Several basic samples using the java.util.stream API.
The sample builds an inverted index on a corpus of about a 100 MB of book material and then presents you with a GUI dialog where you can enter your search terms. The GUI poignantly demonstrates the speed of the search by instantly responding to every keystroke and displaying a result list.
Analyzes a set of documents and finds the number of occurrences of each word they contain.
A Word Count job with the Hadoop File System as both source and sink.
Shows how to use the File Watcher streaming source. It continuously monitors HTTP access log files for new content and applies a sliding window aggregation that tracks the frequency of visits to each page.
Illustrates the effects of different processing guarantees that a Jet job can be configured with a simple application which uses Jet with the event journal reader for to perform rolling average calculations and illustrates the differences in processing guarantees.
Demonstrates Jet's job management capabilities with job submission, job tracking and scaling-up.
Demonstrates the usage of a Kafka topic as a Jet data source. Pours the data from a Kafka topic to a Hazelcast
Consumes and filters events generated from Hazelcast
ICache's Event Journal.
Demonstrates the session window vertex to track the behavior of the users of an online shop application.
Two code samples showing the usage of a TCP/IP socket as a source and a sink.
A simple demonstration of Jet's sliding window aggregation on an infinite stream
Uses the hash-join transform to enrich an infinite stream of trade events. Attaches to each event the associated product and broker objects.
Demonstrates cascaded sliding windows where the second one's source is the output of the first one. The first one calculates the frequency of trading each stock and the second one finds the hottest-trading stocks.
Uses the co-group transform to perform a full outer join of three streams on a common join key (a many-to-many relationship)
The directory spring contains a sample project which shows how to integrate Hazelcast Jet with Spring.
Pivotal Cloud Foundry
The directory pcf contains a sample Spring Boot application which shows how to use Hazelcast Jet in Pivotal Cloud Foundry environment.
Refer to the core-api readme for details on its contents.
Hazelcast is available under the Apache 2 License. Please see the Licensing section for more information.
Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved.
Visit www.hazelcast.com for more info.