New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BP-27: New BookKeeper CLI #1000
Comments
This was referenced Jan 31, 2018
jiazhai
pushed a commit
that referenced
this issue
Feb 2, 2018
Descriptions of the changes in this PR: `BookieShell` is the current bookkeeper cli for interacting and operating a bookkeeper cluster. However, this class is getting bigger with more commands added to it. It is facing a few problems for maintenance and extensibility. - All commands sit in one gaint shell class. It is hard to tell if a command is used for managing a bookie only or if a command is used for managing a cluster. - Lack of unit tests. This class has very few test coverage. Most of the commands (introduced in early days) don't have a unit test. - Lack of extensibility. If a new function component (for example, dlog) is introduced, it is a bit hard to extend this CLI to have commands for new function component. All these problems lead to the proposal here. This proposal is to propose refactoring/redesigning the bookkeeper CLI to allow better managebility for maintenance, better test coverage and better extensibility for new function components. Master Issue: #1000 Author: Sijie Guo <sijie@apache.org> Reviewers: Ivan Kelly <ivank@apache.org>, Jia Zhai <None> This closes #1093 from sijie/BP_27_new_bookkeeper_cli
sijie
added a commit
that referenced
this issue
Feb 16, 2018
Descriptions of the changes in this PR: This is first implementation of BP-27 (#1000). This change includes: - introduce a bookkeeper-tools module for keep the commands and also for developing the new CLI - introduce 4 command groups: `cluster`, `bookie`, `client`, `metadata`. - move 3 command: `listbookies` under `cluster` group, `lastmark` under `bookie` group, `simpletest` under `client` group. - unit tests for those 3 command. Author: Sijie Guo <sijie@apache.org> Reviewers: Charan Reddy Guttapalem <reddycharan18@gmail.com>, Yiming Zang <yzang2016@gmail.com> This closes #1094 from sijie/bookie_shell_refactor
sijie
added a commit
that referenced
this issue
Feb 27, 2018
Descriptions of the changes in this PR: *Motivation* since 4.7, we are shipping the binary distribution using bookkeeper-dist modules. so it is making more sense to have {bin,conf} directory at root module, rather than bookkeeper-server module. *Solution* - move bookkeeper-server/bin to bin - move bookkeeper-server/conf to conf - update the new bookkeeper cli related files as "experimental" This change is needed for integrating with dlog scripts for BP-26 and new bookkeeper cli for BP-27. Master Issue: #1147 Related Issues: - BP-26 #1024 - BP-27 #1000 Author: Sijie Guo <sijie@apache.org> Reviewers: Ivan Kelly <ivank@apache.org> This closes #1210 from sijie/move_bin_conf, closes #1147
made a rough group based on the 4 groups: bookie, cluster, metadata, client.
|
sijie
added a commit
that referenced
this issue
Jun 4, 2018
…ther Descriptions of the changes in this PR: *Motivation* There are multiple CLI tools spreading across multiple places, e.g. new bookkeeper cli, stream storage cli and dlog. There have similar implementations. It would be better to consolidate all these tools in one place `bookkeeper-tools`. This is a PR to prepare moving `stream/cli` to be part of bookkeeper-tools. *Solution* - Abstract the CLI logic in bookkeeper-tools into a simple tools framework that can be reused in a extensible way to unify multiple tools together. - organize the tools module into tools/framework and tools/all *Result* Example output of the tool using this framework is listed as below: ``` $ bin/bkctl bkctl interacts and operates Apache BookKeeper clusters Usage: bkctl [flags] [command group] [commands] Commands: bookie Commands on operating a single bookie bookies Commands on operating a cluster of bookies cluster Commands on administrating bookkeeper clusters ledger Commands on interacting with ledgers namespace Commands on operating namespaces table Commands on interacting with tables tables Commands on operating tables help Display help information about it Flags: -c, --conf Configuration file -n, --namespace Namespace scope to run commands (only valid for table service for now) -u, --service-uri Service Uri -h, --help Display help information Use "bkctl [command] --help" or "bkctl help [command]" for more information about a command ``` *result from help sub-command* ``` $ bin/bkctl help table Commands on interacting with tables Usage: bkctl table [command] [command options] Commands: get Get key/value pair from a table inc Increment the amount of a key in a table put Put key/value pair to a table help Display help information about it Use "bkctl table [command] --help" or "bkctl table help [command]" for more information about a command ``` *result from help sub-sub-command* ``` $ bin/bkctl table help inc Increment the amount of a key in a table Usage: bkctl table inc [flags] <table> <key> <amount> Flags: -h, --help Display help information ``` Master Issue: #1000 Author: Sijie Guo <sijie@apache.org> Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Jia Zhai <None> This closes #1471 from sijie/tools_framework
All the bookkeeper CLI commands have been implemented in bkctl. Close it now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BP
This is the master ticket for tracking BP-27:
BookieShell
is becoming a gaint class to contain all the sub command. It is a good time to think about how to break this class down:bookie
,cluster
,metadata
.This BP proposes refactoring the bookkeeper commands in
BookieShell
in new CLI tool.Proposal PR - #1093
The text was updated successfully, but these errors were encountered: