|
| 1 | +# Wayang Applications |
| 2 | + |
| 3 | +This module provides some example applications for using Apache Wayang in industrie specific scenarios. |
| 4 | + |
| 5 | +## Example 1 |
| 6 | +Our traditional word-count example for Kafka topics is provided in the script: |
| 7 | + |
| 8 | +```bash |
| 9 | +run_wordcount_kafka.sh |
| 10 | +``` |
| 11 | + |
| 12 | +This script needs the configuration files: |
| 13 | + |
| 14 | +```bash |
| 15 | +source .env.sh |
| 16 | +source env.demo1.sh |
| 17 | +``` |
| 18 | + |
| 19 | +Furthermore, the cluster properties are stored in the _default.properties_ file in the module with Kafka-Source and Kafka-Sink components. |
| 20 | + |
| 21 | +**TODO:** We will improve this, by making the path to the Kafka client properties configurable soon. |
| 22 | + |
| 23 | + |
| 24 | +## Prerequisites |
| 25 | + |
| 26 | +The following scripts use Apache Kafka topics as source and sink: |
| 27 | + |
| 28 | +- run_wordcount_kafka.sh |
| 29 | + |
| 30 | +In order to make the demo working, you need a proper cluster setup. |
| 31 | +Over time, we aim on a robust and reusable DEMO environment. |
| 32 | +For the beginning, we use a Confluent cloud cluster, and its specific CLI tool to setup and teardown the topics. |
| 33 | + |
| 34 | +Later on, an improved solution will follow. |
| 35 | + |
| 36 | +For now you need the following tools installed, in addition to the Wayang, Spark, Hadoop libraries: |
| 37 | + |
| 38 | +- Confluent CLI tool. |
| 39 | +- jq |
| 40 | + |
| 41 | +In OSX, both can be installed using homebrew. The installation and setup process for other environment are different. |
| 42 | +```bash |
| 43 | +brew install confluentinc/tap/cli |
| 44 | +brew install jq |
| 45 | +``` |
| 46 | + |
| 47 | +## Configuration |
| 48 | + |
| 49 | +### Application environment |
| 50 | +The file named _.env.sh_ is ignored by git, hence it is the place |
| 51 | +for your personal configuration including credentials and cluster coordinates. |
| 52 | +An example is given in _env_template.sh_. |
| 53 | + |
| 54 | +### DEMO Setup |
| 55 | +The file _env.demo1.sh_ contains additional properties, need in a particlar demo application. |
| 56 | + |
| 57 | +In this file we will never see cluster or user specific details, only properties which are specific to the |
| 58 | +particular application are listed here. |
| 59 | + |
| 60 | + |
0 commit comments