Support pour un talk (format quickie) sur le stream processing avec SQL
For the demo, first start the log generator
mvn -Ploggen exec:java./streaming-sqlQuery examples:
SELECT STREAM * FROM weblogs WHERE status = '500';SELECT STREAM
TUMBLE_END(rowtime, INTERVAL '10' SECOND),
url,
COUNT(*) AS nb_requests,
SUM(nb_bytes) AS total_bytes
FROM weblogs
GROUP BY TUMBLE(rowtime, INTERVAL '10' SECOND), url;SELECT STREAM
HOP_END(rowtime, INTERVAL '5' SECOND, INTERVAL '10' SECOND) AS rowtime,
COUNT(*) AS nb_requests,
SUM(nb_bytes) AS total_bytes
FROM weblogs
GROUP BY HOP(rowtime, INTERVAL '5' SECOND, INTERVAL '10' SECOND);./sqlline
sqlline> !connect jdbc:calcite:model=target/classes/weblogs-model.json admin adminStart the env.
./zk-start.sh
./kafka-start.sh
./storm-start.shSubmit the topology (sql file)
./submit-storm-sql.shStart the log generator (class io.millesabords.demo.streamingsql.producer.KafkaLogProducer
Check the logs pushed in the topic errorlogs
./consumer-error.sh