Currently SamzaSQL shell depends on Samza version 0.14.1.
tar -xvzf apache-samza-0.14.1-src.tgz
cd apache-samza-0.14.1-src/
gradle -b bootstrap.gradle
./gradlew clean build
./gradlew publishToMavenLocal
git clone https://github.com/weiqingy/samza-sql-shell.git
./gradlew clean releaseTarGz
samza-sql-shell build creates a tar-ball under samza-sql-shell/build/distributions/. Untar it by running the below commands.
cd samza-sql-shell/build/distributions/
tar -xvzf *.tgz
This is Kafka quick start.
bin/zookeeper-server-start.sh config/zookeeper.properties
bin/kafka-server-start.sh config/server.properties
bin/kafka-topics.sh --list --zookeeper localhost:2181
./bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic ProfileChangeStream
./bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic ProfileChangeStream_sink
For example, you can use samza-tools-0.14.1 to generate data for Kafka topics like “ProfileChangeStream”.
cd samza-tools-0.14.1
./scripts/generate-kafka-events.sh -t ProfileChangeStream -e ProfileChange
cd samza-sql-shell-<version>
./scripts/samza-shell.sh
Input your SQL statements in the shell:
select * from kafka.ProfileChangeStream
insert into kafka.ProfileChangeStream_sink select * from kafka.ProfileChangeStream
select * from kafka.ProfileChangeStream_sink
...