- workflow依赖的第三方库
- openssl
https://github.com/openssl/openssl
apt install libssl-dev
- zlib
https://github.com/madler/zlib
git clone https://github.com/madler/zlib.git
./configure
make -j4
make install
- lz4 (版本>=1.7.5)
https://github.com/lz4/lz4
git clone https://github.com/lz4/lz4.git
make -j4
make install
- zstd
https://github.com/facebook/zstd
git clone https://github.com/facebook/zstd.git
make -j4
make install
- snappy (当前workflow0.10.5版本只能使用snappy1.1.8)
https://github.com/google/snappy
git clone https://github.com/google/snappy.git
# 修改gitmodules的内容,将snappy库依赖的第三放库指向国内的gitee网站
vim .gitmodules
[submodule "third_party/benchmark"]
path = third_party/benchmark
url = https://gitee.com/mirrors/benchmark.git
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://gitee.com/mirrors/googletest.git
git submodule update --init
tar -zxvf snappy-1.1.8.tar.gz
cp -rf $$PATH/snappy/third_party $$PATH/snappy-1.1.8/
mkdir build
cd build
cmake ../ && make -j4
make install
- 编译workflow开源库
git clone https://gitee.com/sogou/workflow.git
cd workflow
make KAFKA=y
cd tutorial
make KAFKA=y
- 编译workflow库生成文件信
- 使用workflow中的kafka_cli测试kafka
./kafka_cli kafka://127.0.0.1:9092 p
查看kafka中是否有kafka_cli创建的主题:
./bin/kafka-topics.sh --bootstrap-server 127.0.0.1:9092 --list