Skip to content

Support connecting to HiveServer2 with ZooKeeper Service Discovery enabled in GraalVM Native Image#33768

Merged
terrymanu merged 1 commit into
apache:masterfrom
linghengqian:hive-graalvm
Nov 24, 2024
Merged

Support connecting to HiveServer2 with ZooKeeper Service Discovery enabled in GraalVM Native Image#33768
terrymanu merged 1 commit into
apache:masterfrom
linghengqian:hive-graalvm

Conversation

@linghengqian

@linghengqian linghengqian commented Nov 22, 2024

Copy link
Copy Markdown
Member

For #29052.

Changes proposed in this pull request:

  • Support connecting to HiveServer2 with ZooKeeper Service Discovery enabled in GraalVM Native Image.
  • The testcontainers java documentation was missing a reference to the postgresql jdbc driver. This PR adds it.
  • Simplifies the description of Docker Compose in HiveServer2 documentation to improve focus.

Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.
  • I have updated the Release Notes of the current development version. For more details, see Update Release Note

@linghengqian linghengqian changed the title Supports configuring ShardingSphere under GraalVM Native Image to connect to HiveServer2 with ZooKeeper Service Discovery enabled Support connecting to HiveServer2 with ZooKeeper Service Discovery enabled in GraalVM Native Image Nov 22, 2024
@linghengqian linghengqian force-pushed the hive-graalvm branch 3 times, most recently from 738821b to c1c6527 Compare November 22, 2024 20:13
@linghengqian linghengqian marked this pull request as ready for review November 23, 2024 07:02
@linghengqian linghengqian added this to the 5.5.2 milestone Nov 23, 2024
Comment on lines +123 to +137
int randomPortSecond = InstanceSpec.getRandomPort();
try (
GenericContainer<?> hiveServer2SecondContainer = new FixedHostPortGenericContainer<>("apache/hive:4.0.1")
.withNetwork(NETWORK)
.withEnv("SERVICE_NAME", "hiveserver2")
.withEnv("SERVICE_OPTS", "-Dhive.server2.support.dynamic.service.discovery=true" + " "
+ "-Dhive.zookeeper.quorum=" + ZOOKEEPER_CONTAINER.getNetworkAliases().get(0) + ":2181" + " "
+ "-Dhive.server2.thrift.bind.host=0.0.0.0" + " "
+ "-Dhive.server2.thrift.port=" + randomPortSecond)
.withFixedExposedPort(randomPortSecond, randomPortSecond)
.dependsOn(ZOOKEEPER_CONTAINER)) {
hiveServer2SecondContainer.start();
extracted(hiveServer2SecondContainer.getMappedPort(randomPortSecond));
testShardingService.processSuccessInHive();
}

@linghengqian linghengqian Nov 23, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@terrymanu terrymanu merged commit 533d3c3 into apache:master Nov 24, 2024
@linghengqian linghengqian deleted the hive-graalvm branch November 24, 2024 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants