You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/24 19:56:15 UTC
[GitHub] [pulsar] dlg99 commented on a change in pull request #11056: [pulsar-io] pass pulsar client via context to connector
dlg99 commented on a change in pull request #11056:
URL: https://github.com/apache/pulsar/pull/11056#discussion_r658230332
##########
File path: pulsar-io/kafka-connect-adaptor/src/main/java/org/apache/pulsar/io/kafka/connect/PulsarOffsetBackingStore.java
##########
@@ -136,9 +141,6 @@ void processMessage(Message<byte[]> message) {
@Override
public void start() {
try {
- client = PulsarClient.builder()
- .serviceUrl(serviceUrl)
- .build();
log.info("Successfully created pulsar client to {}", serviceUrl);
Review comment:
this log line is irrelevant now
##########
File path: pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/BaseContext.java
##########
@@ -191,4 +192,11 @@
* @param value The value of the metric
*/
void recordMetric(String metricName, double value);
+
+ /**
+ * Get the pulsar client.
+ *
+ * @return the instance of pulsar client
+ */
+ PulsarClient getPulsarClient();
Review comment:
add default implementation throwing NotImpelmentedException?
##########
File path: pulsar-io/kafka-connect-adaptor/src/main/java/org/apache/pulsar/io/kafka/connect/PulsarOffsetBackingStore.java
##########
@@ -136,9 +141,6 @@ void processMessage(Message<byte[]> message) {
@Override
public void start() {
try {
- client = PulsarClient.builder()
- .serviceUrl(serviceUrl)
- .build();
log.info("Successfully created pulsar client to {}", serviceUrl);
Review comment:
please remove `serviceUrl` - it is no longer needed and adjust the rest of logging accordingly.
Can remove it from the config definitions as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org