-
Notifications
You must be signed in to change notification settings - Fork 909
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
Issue 1799: bkctl is broken with default build options #1800
Conversation
*Motivation* `bkctl` is designed in a modularized way for extensibility. it loads command groups via ServiceLoader. However current build profile doesn't leverage this extensibility. Instead it hardcodes all the commands in one service load file. So if `bkctl` is built without `-Dstream`, it will broke. *Changes* - move `ledger` related commands to `tools/ledger` - generate the service load file by concating `commands` files from each module's resources directory. *Results* bkctl works for all build profiles. - without `-Dstream` ``` $ 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 cookie Commands on operating cookies ledger Commands on interacting with ledgers 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 ``` - with `-Dstream` ``` $ 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 cookie Commands on operating cookies 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 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done
run bookkeeper-server bookie tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. The tool output is actually nicer than what you have in the commit message as it groups stuff.
Cookie should probably be under infrastructure, but that's not for this PR.
Usage: bkctl [flags] [command group] [commands]
cookie Commands on operating cookies
Infrastructure commands :
bookie Commands on operating a single bookie
bookies Commands on operating a cluster of bookies
Ledger service commands :
ledger Commands on interacting with ledgers
@@ -60,7 +66,9 @@ Command | Action | |||
`mvn verify` | Performs a wide variety of verification and validation tasks | |||
`mvn apache-rat:check` | Run Maven using the [Apache Rat](http://creadur.apache.org/rat/apache-rat-plugin/) plugin | |||
`mvn compile javadoc:aggregate` | Build Javadocs locally | |||
`mvn package assembly:single` | Build a complete distribution using the Maven [Assembly](http://maven.apache.org/plugins/maven-assembly-plugin/) plugin | |||
`mvn -am -pl bookkeeper-dist/server package` | Build a server distribution using the Maven [Assembly](http://maven.apache.org/plugins/maven-assembly-plugin/) plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why this changed? How is this better than straight "package assembly:single"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not related strictly to this issue, but currently the command is that one
we can fix it on master as follow up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, i see. The previous command doesn't actually work.
Cookie change and grouping change are done by two independent changes. So that’s why cookie was not categorized. A subsequent change is needed to add cookie to infrastructure |
Descriptions of the changes in this PR: *Motivation* `bkctl` is designed in a modularized way for extensibility. it loads command groups via ServiceLoader. However current build profile doesn't leverage this extensibility. Instead it hardcodes all the commands in one service load file. So if `bkctl` is built without `-Dstream`, it will broke. *Changes* - move `ledger` related commands to `tools/ledger` - generate the service load file by concating `commands` files from each module's resources directory. *Results* bkctl works for all build profiles. - without `-Dstream` ``` $ 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 cookie Commands on operating cookies ledger Commands on interacting with ledgers 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 ``` - with `-Dstream` ``` $ 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 cookie Commands on operating cookies 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 ``` Master Issue: apache#1799 Reviewers: Ivan Kelly <ivank@apache.org>, Enrico Olivelli <eolivelli@gmail.com> This closes apache#1800 from sijie/refactor_bkctl, closes apache#1799
Descriptions of the changes in this PR: *Motivation* `bkctl` is designed in a modularized way for extensibility. it loads command groups via ServiceLoader. However current build profile doesn't leverage this extensibility. Instead it hardcodes all the commands in one service load file. So if `bkctl` is built without `-Dstream`, it will broke. *Changes* - move `ledger` related commands to `tools/ledger` - generate the service load file by concating `commands` files from each module's resources directory. *Results* bkctl works for all build profiles. - without `-Dstream` ``` $ 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 cookie Commands on operating cookies ledger Commands on interacting with ledgers 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 ``` - with `-Dstream` ``` $ 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 cookie Commands on operating cookies 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 ``` Master Issue: apache#1799 Reviewers: Ivan Kelly <ivank@apache.org>, Enrico Olivelli <eolivelli@gmail.com> This closes apache#1800 from sijie/refactor_bkctl, closes apache#1799
Descriptions of the changes in this PR:
Motivation
bkctl
is designed in a modularized way for extensibility.it loads command groups via ServiceLoader. However current build
profile doesn't leverage this extensibility. Instead it hardcodes
all the commands in one service load file. So if
bkctl
is builtwithout
-Dstream
, it will broke.Changes
ledger
related commands totools/ledger
commands
files from each module's resources directory.Results
bkctl works for all build profiles.
-Dstream
-Dstream
Master Issue: #1799