ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] adoroszlai commented on a change in pull request #12: AMBARI-24838 - Infra Manager: zookeper connection string
Date Mon, 29 Oct 2018 10:53:37 GMT
adoroszlai commented on a change in pull request #12: AMBARI-24838 - Infra Manager: zookeper
connection string
URL: https://github.com/apache/ambari-infra/pull/12#discussion_r228877947
 
 

 ##########
 File path: ambari-infra-manager/src/main/java/org/apache/ambari/infra/job/SolrDAOBase.java
 ##########
 @@ -57,7 +61,10 @@ protected void delete(String deleteQueryText) {
   }
 
   protected CloudSolrClient createClient() {
-    CloudSolrClient client = new CloudSolrClient.Builder().withZkHost(zooKeeperConnectionString).build();
+    ConnectStringParser connectStringParser = new ConnectStringParser(zooKeeperConnectionString);
+    CloudSolrClient client = new CloudSolrClient.Builder(
+            connectStringParser.getServerAddresses().stream().map(InetSocketAddress::toString).collect(Collectors.toList()),
 
 Review comment:
   I think extracting the result of this stream operation to a local variable would improve
readability.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Mime
View raw message