Leader balance (#731)
Basic leader balance for storage, keep trying to trans leader from host with most leader to host with least leader, until all balanced. Modify/Add two command in console: 1. "show host" will also display total leader count and leader count in each space 2. add command "balance leader", which will try to balance leader between different hosts
Showing
- src/executor/BalanceExecutor.cpp 64 additions, 0 deletionssrc/executor/BalanceExecutor.cpp
- src/executor/BalanceExecutor.h 38 additions, 0 deletionssrc/executor/BalanceExecutor.h
- src/executor/CMakeLists.txt 1 addition, 0 deletionssrc/executor/CMakeLists.txt
- src/executor/Executor.cpp 4 additions, 0 deletionssrc/executor/Executor.cpp
- src/executor/ShowExecutor.cpp 42 additions, 7 deletionssrc/executor/ShowExecutor.cpp
- src/executor/test/SchemaTest.cpp 8 additions, 5 deletionssrc/executor/test/SchemaTest.cpp
- src/parser/AdminSentences.cpp 10 additions, 0 deletionssrc/parser/AdminSentences.cpp
- src/parser/AdminSentences.h 23 additions, 0 deletionssrc/parser/AdminSentences.h
- src/parser/Sentence.h 1 addition, 0 deletionssrc/parser/Sentence.h
- src/parser/parser.yy 9 additions, 1 deletionsrc/parser/parser.yy
- src/parser/scanner.lex 4 additions, 0 deletionssrc/parser/scanner.lex
- src/parser/test/ParserTest.cpp 9 additions, 0 deletionssrc/parser/test/ParserTest.cpp
- src/parser/test/ScannerTest.cpp 6 additions, 0 deletionssrc/parser/test/ScannerTest.cpp
Please register or sign in to comment