Amazon MSK (Kafka)
How to Connect Pinot with Amazon Managed Streaming for Apache Kafka (Amazon MSK)
Was this helpful?
Was this helpful?
ZOOKEEPER_CONNECT_STRING="z-3.pinot-quickstart-msk-d.ky727f.c3.kafka.us-west-2.amazonaws.com:2181,z-1.pinot-quickstart-msk-d.ky727f.c3.kafka.us-west-2.amazonaws.com:2181,z-2.pinot-quickstart-msk-d.ky727f.c3.kafka.us-west-2.amazonaws.com:2181"
BROKER_LIST_STRING="b-1.pinot-quickstart-msk-d.ky727f.c3.kafka.us-west-2.amazonaws.com:9092,b-2.pinot-quickstart-msk-d.ky727f.c3.kafka.us-west-2.amazonaws.com:9092"kubectl exec -it pod/pinot-controller-0 -n pinot-quickstart bashapt-get update
apt-get install wget -y
wget https://archive.apache.org/dist/kafka/2.2.1/kafka_2.12-2.2.1.tgz
tar -xzf kafka_2.12-2.2.1.tgz
cd kafka_2.12-2.2.1bin/kafka-topics.sh \
--zookeeper ${ZOOKEEPER_CONNECT_STRING} \
--create \
--topic pullRequestMergedEventsAwsMskDemo \
--replication-factor 1 \
--partitions 1Created topic "pullRequestMergedEventsAwsMskDemo".kubectl apply -f github-events-aws-msk-demo.yamlbin/kafka-console-consumer.sh \
--bootstrap-server ${BROKER_LIST_STRING} \
--topic pullRequestMergedEventsAwsMskDemokubectl get pod -n pinot-quickstart |grep pinot-github-events-data-into-msk-kafkapinot-github-events-data-into-msk-kafka-68948fb4cd-rrzlf 1/1 Running 0 14mpodname=`kubectl get pod -n pinot-quickstart |grep pinot-github-events-data-into-msk-kafka|awk '{print $1}'`
kubectl exec -it ${podname} -n pinot-quickstart bashbin/pinot-admin.sh AddTable \
-controllerHost pinot-controller \
-tableConfigFile /var/pinot/examples/pullRequestMergedEventsAwsMskDemo_realtime_table_config.json \
-schemaFile /var/pinot/examples/pullRequestMergedEventsAwsMskDemo_schema.json \
-execExecuting command: AddTable -tableConfigFile /var/pinot/examples/pullRequestMergedEventsAwsMskDemo_realtime_table_config.json -schemaFile /var/pinot/examples/pullRequestMergedEventsAwsMskDemo_schema.json -controllerHost pinot-controller -controllerPort 9000 -exec
Sending request: http://pinot-controller:9000/schemas to controller: pinot-controller-0.pinot-controller-headless.pinot-quickstart.svc.cluster.local, version: Unknown
{"status":"Table pullRequestMergedEventsAwsMskDemo_REALTIME succesfully added"}