Skip to content
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

Add source command for pulsarctl #45

Merged
merged 7 commits into from
Sep 11, 2019
Merged

Conversation

wolfstudy
Copy link
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
Copy link
Contributor Author

@sijie @zymap PTAL, thanks

Copy link
Member

@sijie sijie left a comment

Choose a reason for hiding this comment

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

Please check the permissions.

@@ -8,7 +8,8 @@ import (
"github.com/streamnative/pulsarctl/pkg/ctl/cluster"
"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
Member

Choose a reason for hiding this comment

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

wrong indent?

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
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?

"\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
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://?

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
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?


func deleteSourcesCmd(vc *cmdutils.VerbCmd) {
desc := pulsar.LongDescription{}
desc.CommandUsedFor = "This command is used for delete a Pulsar IO source connector."
Copy link
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."

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
Member

Choose a reason for hiding this comment

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

permission?

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
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
Contributor Author

@sijie done PTAL again, thanks.

@sijie
Copy link
Member

sijie commented Sep 10, 2019

@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