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 2020/04/22 09:36:40 UTC
[GitHub] [pulsar] codelipenghui commented on a change in pull request #6757: [#6748][sql] Fix is misleading in presto configuration
codelipenghui commented on a change in pull request #6757:
URL: https://github.com/apache/pulsar/pull/6757#discussion_r412826336
##########
File path: conf/presto/catalog/pulsar.properties
##########
@@ -20,7 +20,8 @@
# name of the connector to be displayed in the catalog
connector.name=pulsar
# the url of Pulsar broker service
-pulsar.broker-service-url=http://localhost:8080
+pulsar.broker-service-url=http://localhost:8080 # DEPRECATED
Review comment:
It's better to move ` # DEPRECATED` to the above line.
##########
File path: pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarConnectorConfig.java
##########
@@ -76,14 +77,24 @@
@NotNull
public String getBrokerServiceUrl() {
- return brokerServiceUrl;
+ if(StringUtils.isEmpty(webServiceUrl))
+ {
+ return brokerServiceUrl;
+ }
+ else{
+ return webServiceUrl;
+ }
}
-
- @Config("pulsar.broker-service-url")
+ @Config("pulsar.broker-service-url")
public PulsarConnectorConfig setBrokerServiceUrl(String brokerServiceUrl) {
this.brokerServiceUrl = brokerServiceUrl;
return this;
}
+ @Config("pulsar.web-service-url")
+ public PulsarConnectorConfig setBrokerServiceUrl(String webServiceUrl) {
Review comment:
```suggestion
public PulsarConnectorConfig setWebServiceUrl(String webServiceUrl) {
```
##########
File path: site2/website/versioned_docs/version-2.2.0/sql-deployment-configurations.md
##########
@@ -16,7 +16,7 @@ The configurations for the connector and its default values are discribed below.
connector.name=pulsar
# the url of Pulsar broker service
-pulsar.broker-service-url=http://localhost:8080
+pulsar.web-service-url=http://localhost:8080
Review comment:
I think we don't need to change the documentation of 2.2.0 version right?
##########
File path: pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarConnectorConfig.java
##########
@@ -76,14 +77,24 @@
@NotNull
public String getBrokerServiceUrl() {
- return brokerServiceUrl;
+ if(StringUtils.isEmpty(webServiceUrl))
+ {
+ return brokerServiceUrl;
+ }
+ else{
+ return webServiceUrl;
+ }
Review comment:
Please format the code.
----------------------------------------------------------------
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