Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMBARI-24838 - Infra Manager: zookeper connection string #12

Merged

Conversation

kasakrisz
Copy link
Contributor

@kasakrisz kasakrisz commented Oct 29, 2018

What changes were proposed in this pull request?

Infra Manager can not connect to zookeeper if it is installed into a node where there is no zookeeper server instance.
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.

zkhost0:port[,zkhost1:port...zkhostn:port][/solr_znode]

How was this patch tested?

ITs passed

Manually:

  1. Deploy Ambari and a cluster: zookeeper, infra solr, logsearch
  2. Deploy Infra manager to a node where no zookeeper server is installed
  3. Run archive_service_logs job
  4. Check that archive files exists in the specified destination directory

@kasakrisz kasakrisz self-assigned this Oct 29, 2018
@kasakrisz kasakrisz added the bug Something isn't working label Oct 29, 2018
@asfgit
Copy link

asfgit commented Oct 29, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Infra-Github-PR-Builder/18/
Test PASSed.

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()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think extracting the result of this stream operation to a local variable would improve readability.

@asfgit
Copy link

asfgit commented Oct 29, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Infra-Github-PR-Builder/19/
Test PASSed.

Copy link
Contributor

@oleewere oleewere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants