Skip to content

Add source command for pulsarctl - #45

Merged
wolfstudy merged 7 commits into
masterfrom
xiaolong/source-command
Sep 11, 2019
Merged

Add source command for pulsarctl#45
wolfstudy merged 7 commits into
masterfrom
xiaolong/source-command

Conversation

@wolfstudy

Copy link
Copy Markdown
Contributor

Signed-off-by: xiaolong.ran ranxiaolong716@gmail.com

Add source command for pulsarctl

  • createSourcesCmd
  • updateSourcesCmd
  • deleteSourcesCmd
  • getSourcesCmd
  • listSourcesCmd
  • stopSourcesCmd
  • startSourcesCmd
  • restartSourcesCmd
  • statusSourcesCmd

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@wolfstudy wolfstudy self-assigned this Sep 9, 2019
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@wolfstudy
wolfstudy requested review from sijie and zymap September 10, 2019 03:01
@wolfstudy

Copy link
Copy Markdown
Contributor Author

@sijie @zymap PTAL, thanks

@sijie sijie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please check the permissions.

Comment thread main.go
"github.com/streamnative/pulsarctl/pkg/ctl/completion"
"github.com/streamnative/pulsarctl/pkg/ctl/functions"
"github.com/streamnative/pulsarctl/pkg/ctl/tenant"
"github.com/streamnative/pulsarctl/pkg/ctl/sources"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wrong indent?

Comment thread pkg/ctl/sources/create.go Outdated
func createSourcesCmd(vc *cmdutils.VerbCmd) {
desc := pulsar.LongDescription{}
desc.CommandUsedFor = "Submit a Pulsar IO source connector to run in a Pulsar cluster."
desc.CommandPermission = "This command requires super-user permissions."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why super-user permissions?

Comment thread pkg/ctl/sources/create.go Outdated
"\t--name <the name of Pulsar Source> \n" +
"\t--destination-topic-name kafka-topic \n" +
"\t--classname org.apache.pulsar.io.kafka.KafkaBytesSource \n" +
"\t--archive file:/http: + /examples/api-examples.nar",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this example is confusing. is it file:// or http://?

Comment thread pkg/ctl/sources/delete.go Outdated
func deleteSourcesCmd(vc *cmdutils.VerbCmd) {
desc := pulsar.LongDescription{}
desc.CommandUsedFor = "This command is used for delete a Pulsar IO source connector."
desc.CommandPermission = "This command requires super-user permissions."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

please check if the permission is correct?

Comment thread pkg/ctl/sources/delete.go Outdated

func deleteSourcesCmd(vc *cmdutils.VerbCmd) {
desc := pulsar.LongDescription{}
desc.CommandUsedFor = "This command is used for delete a Pulsar IO source connector."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
desc.CommandUsedFor = "This command is used for delete a Pulsar IO source connector."
desc.CommandUsedFor = "This command is used for deleting a Pulsar IO source connector."

Comment thread pkg/ctl/sources/get.go Outdated
func getSourcesCmd(vc *cmdutils.VerbCmd) {
desc := pulsar.LongDescription{}
desc.CommandUsedFor = "Gets the information about a Pulsar IO source connector"
desc.CommandPermission = "This command requires super-user permissions."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

permission?

Comment thread pkg/ctl/sources/list.go Outdated
func listSourcesCmd(vc *cmdutils.VerbCmd) {
desc := pulsar.LongDescription{}
desc.CommandUsedFor = "List all running Pulsar IO source connectors"
desc.CommandPermission = "This command requires super-user permissions."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

permission?

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@wolfstudy

Copy link
Copy Markdown
Contributor Author

@sijie done PTAL again, thanks.

@sijie

sijie commented Sep 10, 2019

Copy link
Copy Markdown
Member

@wolfstudy please rebase

Signed-off-by: xiaolong.ran <ranxiaolong716@gmail.com>
@wolfstudy
wolfstudy merged commit 4c8bdff into master Sep 11, 2019
@sijie sijie mentioned this pull request Sep 11, 2019
29 tasks
@sijie
sijie deleted the xiaolong/source-command branch September 11, 2019 07:37
@sijie sijie added this to the 0.0.1 milestone Sep 11, 2019
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
Signed-off-by: xiaolong.ran ranxiaolong716@gmail.com

Add source command for pulsarctl

- createSourcesCmd
- updateSourcesCmd
- deleteSourcesCmd
- getSourcesCmd
- listSourcesCmd
- stopSourcesCmd
- startSourcesCmd
- restartSourcesCmd
- statusSourcesCmd
tisonkun pushed a commit to apache/pulsar-client-go that referenced this pull request Aug 16, 2023
Signed-off-by: xiaolong.ran ranxiaolong716@gmail.com

Add source command for pulsarctl

- createSourcesCmd
- updateSourcesCmd
- deleteSourcesCmd
- getSourcesCmd
- listSourcesCmd
- stopSourcesCmd
- startSourcesCmd
- restartSourcesCmd
- statusSourcesCmd
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