xunliu commented on code in PR #4267:
URL: https://github.com/apache/gravitino/pull/4267#discussion_r1694843943
##########
integration-test-common/src/test/java/org/apache/gravitino/integration/test/container/ContainerSuite.java:
##########
@@ -98,29 +104,59 @@ public Network getNetwork() {
}
public void startHiveContainer() {
- startHiveContainer(
- ImmutableMap.<String, String>builder().put("HADOOP_USER_NAME",
"anonymous").build());
+ if (hiveContainer == null) {
+ synchronized (ContainerSuite.class) {
+ if (hiveContainer == null) {
+ // Start Hive container
+ HiveContainer.Builder hiveBuilder =
+ HiveContainer.builder()
+ .withHostName("gravitino-ci-hive")
+ .withEnvVars(
+ ImmutableMap.<String, String>builder()
+ .put("HADOOP_USER_NAME", "anonymous")
+ .build())
+ .withNetwork(network);
+ HiveContainer container = closer.register(hiveBuilder.build());
+ container.start();
+ hiveContainer = container;
+ }
+ }
+ }
}
/**
- * To start the Hive container, you can to specify environment variables:
HIVE_RUNTIME_VERSION:
- * Hive version, currently support `hive2`(default) and `hive3`
DOCKER_ENV_RANGER_SERVER_URL:
- * Ranger server URL DOCKER_ENV_RANGER_HIVE_REPOSITORY_NAME: Ranger Hive
repository name
- * DOCKER_ENV_RANGER_HDFS_REPOSITORY_NAME: Ranger HDFS repository name
+ * To start and enable Ranger plugin in Hive container, <br>
+ * you can specify environment variables: <br>
+ * 1. HIVE_RUNTIME_VERSION: Hive version, currently support `hive2`(default)
and `hive3` <br>
Review Comment:
DONE.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]