[ 
https://issues.apache.org/jira/browse/AMBARI-24838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16666997#comment-16666997
 ] 

ASF GitHub Bot commented on AMBARI-24838:
-----------------------------------------

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:
us...@infra.apache.org


> Infra Manager: zookeper connection string
> -----------------------------------------
>
>                 Key: AMBARI-24838
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24838
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-infra
>    Affects Versions: 2.8.0
>            Reporter: Krisztian Kasa
>            Assignee: Krisztian Kasa
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 2.8.0
>
>
> Infra Manager can not connect to zookeeper if it is installed into a node 
> where there is no zookeeper server instance, or the local instance is down.
> * This is caused by that the infra manager stack code does not set the 
> zookeeper quorum and the CloudSolrClient falls back to localhost:2181
> * Also the builder which is used for construct an 
> org.apache.solr.client.solrj.impl.CloudSolrClient instance is deprecated: it 
> does not handle the zookeper connection string fromat which sould be set in 
> the stack code.
> {code}
> zkhost0:port[,zkhost1:port...zkhostn:port][/solr_znode]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to