Understand different compression codecs available for compression of messages and their performance
lab 3
30 mins
$ ~/apps/kafka/bin/kafka-topics.sh --bootstrap-server localhost:9092 --create \
--topic compression --replication-factor 1 --partitions 2
- Inspect file :
src/main/java/x/lab04_benchmark/BenchmarkCompressionSchemes.java
- Fix all TODO items, using Eclipse (or any other editor).
- Right click on 'src/main/java/x/lab04_benchmark/BenchmarkCompressionSchemes.java'
- Run as 'Java Application'
- Producer console output will show total time and throughput. Copy this output to notepad/excel
- Edit BenchmarkCompressionSchemes.java and change the codec
- Re-run Step 3 above and record benchmark times for this codec
- Create a table showing performance numbers for different codecs
Compression can help to reduce the size of data we are sending out.
Can you figure out a way to find the amount of data sent by the producer?
You may want to use OS level tools to measure this?
Share what you find with the class.