Skip to content

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 wolfstudy requested review from sijie and zymap September 10, 2019 03:01
@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.

"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.

3 participants