Skip to content

Instantly share code, notes, and snippets.

# List all the consumer groups
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--list
# Describe a specific consumer group
bin/kafka-consumer-groups.sh --bootstrap-server kafka1:9092 \
--describe \
--group application1
# Describe the active members of the group
# Create a topic if a topic with the same name does NOT exist
bin/kafka-topics.sh --zookeeper zookeeper1:2181/kafka \
--create \
--topic topic-1 \
--replication-factor 1 \
--partitions 3 \
--if-not-exists
# Alter the number of partitions (can only go up)
bin/kafka-topics.sh --zookeeper zookeeper1:2181/kafka \
@saqazhar
saqazhar / query_athena.py
Created October 4, 2019 09:29 — forked from sysboss/query_athena.py
SQL Query Amazon Athena using Python
#!/usr/bin/env python3
#
# Query AWS Athena using SQL
# Copyright (c) Alexey Baikov <sysboss[at]mail.ru>
#
# This snippet is a basic example to query Athen and load the results
# to a variable.
#
# Requirements:
# > pip3 install boto3 botocore retrying