All Projects → trK54Ylmz → kafka-spark-streaming-example

trK54Ylmz / kafka-spark-streaming-example

Licence: other
Simple examle for Spark Streaming over Kafka topic

Programming Languages

java
68154 projects - #9 most used programming language
HTML
75241 projects
scala
5932 projects

Projects that are alternatives of or similar to kafka-spark-streaming-example

Core
Build platforms that flexibly mix SQL, batch, and stream processing paradigms
Stars: ✭ 231 (+126.47%)
Mutual labels:  stream-processing
ReDe
A Redis dehydrator module
Stars: ✭ 63 (-38.24%)
Mutual labels:  stream-processing
streamsx.kafka
Repository for integration with Apache Kafka
Stars: ✭ 13 (-87.25%)
Mutual labels:  stream-processing
Watermill
Building event-driven applications the easy way in Go.
Stars: ✭ 3,504 (+3335.29%)
Mutual labels:  stream-processing
frizzle
The magic message bus
Stars: ✭ 14 (-86.27%)
Mutual labels:  stream-processing
Elkeid-HUB
Elkeid HUB is a rule/event processing engine maintained by the Elkeid Team that supports streaming/offline (not yet supported by the community edition) data processing. The original intention is to solve complex data/event processing and external system linkage requirements through standardized rules.
Stars: ✭ 62 (-39.22%)
Mutual labels:  stream-processing
Incubator Streampipes
Apache StreamPipes - A self-service (Industrial) IoT toolbox to enable non-technical users to connect, analyze and explore IoT data streams.
Stars: ✭ 209 (+104.9%)
Mutual labels:  stream-processing
vector
A high-performance observability data pipeline.
Stars: ✭ 12,138 (+11800%)
Mutual labels:  stream-processing
xlstream
Turns XLSX into a readable stream.
Stars: ✭ 148 (+45.1%)
Mutual labels:  stream-processing
beepbeep-3
An event stream processor anyone can use
Stars: ✭ 20 (-80.39%)
Mutual labels:  stream-processing
Amadeus
Harmonious distributed data analysis in Rust.
Stars: ✭ 240 (+135.29%)
Mutual labels:  stream-processing
Psi
Platform for Situated Intelligence
Stars: ✭ 249 (+144.12%)
Mutual labels:  stream-processing
sp
Stream Processors on Kafka in Golang
Stars: ✭ 29 (-71.57%)
Mutual labels:  stream-processing
Fluent Bit
Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
Stars: ✭ 3,223 (+3059.8%)
Mutual labels:  stream-processing
openPDC
Open Source Phasor Data Concentrator
Stars: ✭ 109 (+6.86%)
Mutual labels:  stream-processing
Pipelinedb
High-performance time-series aggregation for PostgreSQL
Stars: ✭ 2,447 (+2299.02%)
Mutual labels:  stream-processing
FlinkExperiments
Experiments with Apache Flink.
Stars: ✭ 3 (-97.06%)
Mutual labels:  stream-processing
distogram
A library to compute histograms on distributed environments, on streaming data
Stars: ✭ 19 (-81.37%)
Mutual labels:  stream-processing
dagger
Dagger is an easy-to-use, configuration over code, cloud-native framework built on top of Apache Flink for stateful processing of real-time streaming data.
Stars: ✭ 238 (+133.33%)
Mutual labels:  stream-processing
football-events
Event-Driven microservices with Kafka Streams
Stars: ✭ 57 (-44.12%)
Mutual labels:  stream-processing

kafka · spark streaming example

Build Status

This is a simple dashboard example on Kafka and Spark Streaming

Prerequisites

Java 1.8 or newer version required because lambda expression used for few cases

  1. Java >= 1.8 (Oracle JDK has been tested)
  2. Maven >= 3
  3. Apache Spark >= 2.0.2
  4. Kafka >= 0.10.1.0

Installation

First of all, clone the git repository,

$ git clone [email protected]:trK54Ylmz/kafka-spark-streaming-example.git

after you need to use Maven for creating uber jar files,

$ mvn clean package -DskipTests

until that moment we had created jar files and now we'll install Kafka and MySQL,

$ wget http://www-us.apache.org/dist/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz
$ # or wget http://www-eu.apache.org/dist/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz
$ tar -xf kafka_2.11-0.10.1.0.tgz
$ cd kafka_2.11-0.10.1.0
$ nohup ./bin/zookeeper-server-start.sh ./config/zookeeper.properties > /tmp/kafka-zookeeper.out 2>&1 &
$ nohup ./bin/kafka-server-start.sh ./config/server.properties > /tmp/kafka-server.out 2>&1 &

Kafka is ready we can continue to install MySQL,

$ sudo apt-get install mysql-server # for Ubuntu, Debian
$ sudo yum install mysql-server && sudo systemctl start mysqld # for CentOS, RHEL
$ brew install mysql && mysql.server restart # for macOS

and finally create MySQL database and table,

CREATE DATABASE IF NOT EXISTS dashboard_test;

USE dashboard_test;

CREATE TABLE IF NOT EXISTS events (
 market VARCHAR(24) NOT NULL DEFAULT '',
 rate FLOAT DEFAULT NULL,
 dt DATETIME NOT NULL,
 PRIMARY KEY (market, dt)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

Usage

1 - Start the Spark streaming service and it'll process events from Kafka topic to MySQL,

$ cd kafka-spark-streaming-example
$ java -Dconfig=./config/common.conf -jar streaming/target/spark-streaming-0.1.jar

2 - Start the Kafka producer and it'll write events to Kafka topic,

$ java -Dconfig=./config/common.conf -jar producer/target/kafka-producer-0.1.jar

3 - Start the web server so you can see the dashboard

$ java -Dconfig=./config/common.conf -jar web/target/web-0.1.jar

4 - If everything look fine, please enter the dashboard address,

open http://localhost:8080 # default value : 8080

screen

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].