jerryshao commented on code in PR #4267:
URL: https://github.com/apache/gravitino/pull/4267#discussion_r1690722860


##########
integration-test-common/src/test/java/org/apache/gravitino/integration/test/container/ContainerSuite.java:
##########
@@ -98,29 +101,47 @@ 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 the enable ranger plugin's Hive container, <br>
+   * you can to specify environment variables: <br>

Review Comment:
   "To start and enable Ranger plugin in Hive container, you can specify..."



-- 
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]

Reply via email to