Extract a jar: jar xf <jar-file>
View contents: jar tf <jar-file>
Create:
- All files in current folder:
jar cf <new-file-name> .
- Custom:
jar cf <new-file-name> [input file(s)]
Zookeeper Start: bin/zookeeper-server-start.sh config/zookeeper.properties &
Kafka Server Start: bin/kafka-server-start.sh config/server.properties &
Create Topic: bin/kafka-create-topic.sh --zookeeper localhost:2181 --topic test11
Start Producer: bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test11
Start Consumer: bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test11
Command: bin/kafka-producer-perf-test.sh --broker-list=localhost:9092 --messages 10000000 --topic perf --threads 10 --message-size 1000 --batch-size 200 --compression-codec 1
start.time, end.time, compression, message.size, batch.size, total.data.sent.in.MB, MB.sec, total.data.sent.in.nMsg, nMsg.sec
2014-11-26 14:39:13:801, 2014-11-26 14:42:27:464, 1, 1000, 200, 9536.74, 49.2440, 10000000, 51636.0895
2014-12-05 13:43:43:321, 2014-12-05 13:46:29:254, 1, 1000, 200, 9536.74, 57.4735, 10000000, 60265.2878
Topic with 3 partitions:
Speed with 10 threads: 71 MB/s
Speed with 1 thread: 27 MB/s
sudo lsof -i :2181
lists lists of files using port 2181
Hadoop's namenode has gone into safemode. Leave it: bin/hadoop dfsadmin -safemode leave
ssh-keygen -t rsa
Get broker-list from zookeeper
echo 'kafka-kamal-1:2181,kafka-kamal-2:2181,kafka-kamal-3:2181,kafka-kamal-4:2181' | sed 's/:2181/:9092/g'