forked from apache/bookkeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISSUE apache#1799: bkctl is broken with default build options
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
- Loading branch information
Showing
31 changed files
with
164 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<artifactId>bookkeeper-tools-parent</artifactId> | ||
<groupId>org.apache.bookkeeper</groupId> | ||
<version>4.9.0-SNAPSHOT</version> | ||
</parent> | ||
<artifactId>bookkeeper-tools-ledger</artifactId> | ||
<name>Apache BookKeeper :: Tools :: Ledger</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.bookkeeper</groupId> | ||
<artifactId>bookkeeper-tools-framework</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.bookkeeper</groupId> | ||
<artifactId>bookkeeper-server</artifactId> | ||
<version>${project.parent.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-log4j12</artifactId> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.bookkeeper</groupId> | ||
<artifactId>buildtools</artifactId> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.bookkeeper</groupId> | ||
<artifactId>bookkeeper-server</artifactId> | ||
<type>test-jar</type> | ||
<version>${project.parent.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
org.apache.bookkeeper.stream.cli.ClusterCommandGroup | ||
org.apache.bookkeeper.stream.cli.NamespaceCommandGroup | ||
org.apache.bookkeeper.stream.cli.TableAdminCommandGroup | ||
org.apache.bookkeeper.stream.cli.TableCommandGroup |