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

How to set --sink-config when create a sink connector #1157

Open
shibd opened this issue Aug 1, 2023 · 3 comments
Open

How to set --sink-config when create a sink connector #1157

shibd opened this issue Aug 1, 2023 · 3 comments
Assignees

Comments

@shibd
Copy link
Member

shibd commented Aug 1, 2023

I'm trying use this cmd:

pulsarctl sinks create 
--archive builtin://aws-eventbridge --tenant public \
--namespace default --inputs eventbridge-test-2 \
--name eventbridge-pulsarctl-test \
--sink-config "{"accessKeyId":"test","secretAccessKey":"test","region":"ap-northeast-1","eventBusName":"baodi-test","eventBusResourceName":"arn:aws:events:ap-northeast-1:598203581484:event-bus/baodi-test"}"

But the actual configuration does not:

2023-08-01T10:15:18,276+0000 [public/default/eventbridge-pulsarctl-test-aa7ec250-0] INFO  org.apache.pulsar.functions.instance.JavaInstanceRunnable - Starting Java Instance eventbridge-pulsarctl-test-aa7ec250 :
 Details = tenant: "public"
namespace: "default"
name: "eventbridge-pulsarctl-test-aa7ec250"
className: "org.apache.pulsar.functions.api.utils.IdentityFunction"
parallelism: 1
source {
  typeClassName: "org.apache.pulsar.client.api.schema.GenericObject"
  inputSpecs {
    key: "eventbridge-test-2"
    value {
    }
  }
}
sink {
  className: "org.apache.pulsar.io.eventbridge.sink.EventBridgeSink"
  configs: "{}"
  typeClassName: "org.apache.pulsar.client.api.schema.GenericObject"
}
resources {
  cpu: 1.0
  ram: 1073741824
}
componentType: SINK
@shibd
Copy link
Member Author

shibd commented Aug 1, 2023

@jiangpengcheng Please help take a look at it. Thanks

@jiangpengcheng
Copy link
Member

@shibd should use ' instead of " for the argument: '{"accessKeyId":"test","secretAccessKey":"test","region":"ap-northeast-1","eventBusName":"baodi-test","eventBusResourceName":"arn:aws:events:ap-northeast-1:598203581484:event-bus/baodi-test"}'

@shibd
Copy link
Member Author

shibd commented Aug 2, 2023

I see, it seems like we need to modify examples.

    #Create a Pulsar Sink in cluster mode with sink config
    pulsarctl sink create
	--sink-config "{"publishTopic":"publishTopic", "key":"pulsar"}"
	// Other sink parameters

@shibd shibd self-assigned this Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants