This repo implements a new prototype of distributed task scheduler.
Please run make check
to build tools and format the code.
Simply run make
to compile.
Use make unit_test
to run unit test and integrated test.
Master is set to process the requests from outside and to schedule and dispatch tasks.
Executor is the worker process to run the tasks. It receives submit tasks
request from Master.
Master-Client is set to interact with master. Right now it only supports submit-job
command.
the job of demo workload is devided to two parts:
- Producer
- Producer task produces data continously. Every record has a table-id, ddl-version and a mark indicating whether it is a ddl record or data record.
Producer Task
shuffles records to differentBinlog task
to downstream side. - Binlog task serves as a server to provide recorder. It is only in charge to data transferring.
- Producer task produces data continously. Every record has a table-id, ddl-version and a mark indicating whether it is a ddl record or data record.
- Consumer
- receive task receives records from a single grpc stream which connects to a Binlog task. It passes on data to
Syncer Task
. - Syncer task processes
DDL
record. It is supposed to wait all the other DDL with same version compeleted. - Sink task writes the record to a local file, and records the ending time.
- receive task receives records from a single grpc stream which connects to a Binlog task. It passes on data to
./bin/master --config ./cmd/master/example.toml
We can also start multiple masters
# start two server masters
./bin/master --config ./cmd/master/example1.toml &
./bin/master --config ./cmd/master/example2.toml &
# join a new one
./bin/master --config ./cmd/master/example3.toml &
./bin/executor --config ./cmd/executor/example.toml
change the worker-addr
field in toml, and start another executor.
./bin/master-client submit-job --master-addr 127.0.0.1:10240 --config ./cmd/master-client/bench-example.toml
Then the tasks will be scheduled automatically.