Skip to content

Conversation

@zymap
Copy link
Member

@zymap zymap commented Nov 14, 2019


Master Issue: #127

Motivation

Support bookkeeper bookie commands in Pulsarctl

Modifications

Add bookkeeper bookie commands

Output

➜  pulsarctl-yong git:(bookies_cmd) ./pulsarctl bookkeeper bookie
Operations about bookie

Usage: pulsarctl bookkeeper bookie [flags]

Commands:
  expand      Expand storage for a bookie
  gc          Trigger GC for a bookie
  gcdetails   Get the details of the running GC
  gcstatus    Get the status of the running GC
  info        Get the bookie disk usage info of a cluster
  lastlogmarker  Get the last log marker
  list        List all the available bookies
  listdiskfile  Get all the files on the disk of the current bookie
  state       Get the state of the bookie

Aliases: bookie, bookies

Common flags:
  -s, --admin-service-url string    The admin web service url that pulsarctl connects to. (default "http://localhost:8080")
      --auth-params string          Authentication parameters are used to configure the public and private key files required by tls
                                     For example: "tlsCertFile:val1,tlsKeyFile:val2"
      --bookie-service-url string   The bookie web service url that pulsarctl connects to. (default "http://localhost:8080")
  -C, --color string                toggle colorized logs (true,false,fabulous) (default "true")
  -h, --help                        help for this command
      --tls-allow-insecure          Allow TLS insecure connection
      --tls-trust-cert-pat string   Allow TLS trust cert file path
      --token string                Using the token to authentication
      --token-file string           Using the token file to authentication
  -v, --verbose int                 set log level, use 0 to silence, 4 for debugging (default 3)

Use 'pulsarctl bookkeeper bookie [command] --help' for more information about a command.

@zymap zymap added this to the 0.2.0 milestone Nov 14, 2019
@zymap zymap self-assigned this Nov 14, 2019
@zymap zymap mentioned this pull request Nov 14, 2019
5 tasks
---

Master Issue: streamnative#127

*Motivation*

Support bookkeeper bookie commands in Pulsarctl

*Modifications*

Add bookkeeper bookie commands
@sijie
Copy link
Member

sijie commented Nov 19, 2019

@zymap can you rebase this pull request?

@zymap
Copy link
Member Author

zymap commented Nov 19, 2019

@sijie sure

@zymap
Copy link
Member Author

zymap commented Nov 19, 2019

@sijie Done. PTAL.

"github.com/streamnative/pulsarctl/pkg/bookkeeper/bkdata"
)

type Bookie interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split the operations into two interfaces, one for cluster-wise operations, one for bookie-specific operations.

"github.com/stretchr/testify/assert"
)

func TestListArgError(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please include tests for normal cases.

index FileType = "index"
)

func ParseFileType(fileType string) (FileType, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no tests for this method?

ro BookieType = "ro"
)

func ParseBookieType(t string) (BookieType, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tests for this method?

@zymap
Copy link
Member Author

zymap commented Nov 21, 2019

@sijie I don't add the test because the test needs BookKeeper HTTP service and the service seems do not start when I start a standalone. So I need to create a simple cluster to test the HTTP service.

Sorry that I do not explain why the test is not added. I will add the test later soon.

@sijie
Copy link
Member

sijie commented Nov 21, 2019

So I need to create a simple cluster to test the HTTP service.

Please do this first. Let's not merge this pull request until the test framework is set up and tests are added.

@zymap zymap changed the title [BK-SUPPORT-PART-3] Support bookkeeper bookie commands [WIP][BK-SUPPORT-PART-3] Support bookkeeper bookie commands Nov 25, 2019
@zymap
Copy link
Member Author

zymap commented Nov 26, 2019

0.2.0 will release soon. Let's move this to 0.3.0

@zymap zymap modified the milestones: 0.2.0, 0.3.0 Nov 26, 2019
@zymap zymap changed the title [WIP][BK-SUPPORT-PART-3] Support bookkeeper bookie commands [BK-SUPPORT-PART-3] Support bookkeeper bookie commands Jan 8, 2020
@zymap
Copy link
Member Author

zymap commented Jan 8, 2020

@sijie PTAL. Thanks

@sijie sijie merged commit bf27b1c into streamnative:master Jan 13, 2020
@zymap zymap deleted the bookies_cmd branch January 13, 2020 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants