AHeise commented on a change in pull request #19285:
URL: https://github.com/apache/flink/pull/19285#discussion_r840464444
##########
File path:
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/PulsarSourceBuilder.java
##########
@@ -473,9 +473,14 @@
if (!configBuilder.contains(PULSAR_CONSUMER_NAME)) {
LOG.warn(
"We recommend set a readable consumer name through
setConsumerName(String) in production mode.");
+ } else {
+ String consumerName = configBuilder.get(PULSAR_CONSUMER_NAME);
+ if (!consumerName.contains("%s")) {
+ configBuilder.override(PULSAR_CONSUMER_NAME, consumerName + "
- %s");
Review comment:
same as above
##########
File path:
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/common/config/PulsarClientFactory.java
##########
@@ -200,15 +200,17 @@ private static Authentication
createAuthentication(PulsarConfiguration configura
String authParamsString =
configuration.get(PULSAR_AUTH_PARAMS);
return sneakyClient(
() ->
AuthenticationFactory.create(authPluginClassName, authParamsString));
- } else if (configuration.contains(PULSAR_AUTH_PARAM_MAP)) {
- Map<String, String> paramsMap =
configuration.get(PULSAR_AUTH_PARAM_MAP);
+ } else {
+ Map<String, String> paramsMap =
configuration.getProperties(PULSAR_AUTH_PARAM_MAP);
+ if (paramsMap.isEmpty()) {
Review comment:
can this also be `null`?
##########
File path:
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/sink/PulsarSinkBuilder.java
##########
@@ -315,6 +315,11 @@
if (!configBuilder.contains(PULSAR_PRODUCER_NAME)) {
LOG.warn(
"We recommend set a readable producer name through
setProducerName(String) in production mode.");
+ } else {
+ String producerName = configBuilder.get(PULSAR_PRODUCER_NAME);
+ if (!producerName.contains("%s")) {
+ configBuilder.override(PULSAR_PRODUCER_NAME, producerName + "
- %s");
Review comment:
What is the `%s` supposed to do? I haven't found anything in the Pulsar
docs. Could you add a comment to clarify?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]