2022 年字节青训营大数据专场结营项目三 - Rabbit 队 - 简易分布式存储系统实现
- docker
- protobuf
- for Arch Linux, just
yay -S protoc-gen-go protoc-gen-go-grpc
- for Arch Linux, just
make setup
it will:
- run the script to generate files for protobuf
- go build to generate executable file
- run zipkin in docker for distributed tracing
- start the namenode and datanode servers
make SDSS-ctl
./bin/SDSS-ctl List /
./bin/SDSS-ctl Mkdir /doc/
./bin/SDSS-ctl Put LICENSE /doc/LICENSE
./bin/SDSS-ctl Get /doc/LICENSE /tmp/LICENSE
diff /tmp/LICENSE LICENSE
./bin/SDSS-ctl Stat /doc/LICENSE
access http://127.0.0.1:9411/zipkin to see the visual RPC communication between servers
make kill
it will:
- kill and remove the zipkin docker container
- kill all the namenode and datanode servers
build images for namenode and datanode
docker build -f docker/namenode/Dockerfile -t vgalaxy/namenode .
docker build -f docker/datanode/Dockerfile -t vgalaxy/datanode .
start the namenode and datanode servers in host network
docker run -d --network=host vgalaxy/namenode -addr localhost:8000 -replicaid 1
docker run -d --network=host vgalaxy/namenode -addr localhost:8001 -replicaid 2
docker run -d --network=host vgalaxy/namenode -addr localhost:8002 -replicaid 3
docker run -d --network=host vgalaxy/datanode -addr localhost:9000
docker run -d --network=host vgalaxy/datanode -addr localhost:9001
docker run -d --network=host vgalaxy/datanode -addr localhost:9002
Before running the tests, zipkin should be set up for distributed tracing.
Thanks to all the people who already contributed!
SDSS is under the MIT License. See the LICENSE file for details.