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

[MO] - expose internal ZooKeeper to be able connect via external comp… #30

Merged
merged 11 commits into from
Feb 20, 2022

Conversation

see-quick
Copy link
Member

@see-quick see-quick commented Feb 18, 2022

…onents (ZkClient etc.)

StrimziKafkaContainer

Currently, in StrimziKafkaContainer we are not able to connect to internal ZooKeeper, which is running inside the same container as Kafka. This PR exposes such ZooKeeper and adds a few test cases to proper check implementation.

// start container with implicit internal ZooKeeper
systemUnderTest = new StrimziKafkaContainer()
     .waitForRunning();
systemUnderTest.start();

// Creates a socket address from a hostname and a port number
final String[] hostNameWithPort = systemUnderTest.getInternalZooKeeperConnect().split(":");

// connect to the ZooKeeper from external Socket
SocketAddress socketAddress = new InetSocketAddress(hostNameWithPort[0], Integer.parseInt(hostNameWithPort[1]));

Moreover adds a few helpful stuff such as:

StrimziKafkaCluster

  1. Constructor only specified number of brokers
  2. Better logs description

StrimziZooKeeperCluster

  1. adds an option to specify the custom ZooKeeper properties file

Signed-off-by: morsak xorsak02@stud.fit.vutbr.cz

@see-quick see-quick self-assigned this Feb 18, 2022
@see-quick see-quick added the enhancement New feature or request label Feb 18, 2022
@see-quick see-quick requested a review from scholzj February 18, 2022 09:49
@scholzj scholzj added this to the 0.101.0 milestone Feb 18, 2022
morsak added 11 commits February 20, 2022 09:19
…onents (ZkClient etc.)

Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
…utes has no value/

Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
…new construor \+ predicates

Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Signed-off-by: morsak <xorsak02@stud.fit.vutbr.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants