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


##########
integration-test-common/src/test/java/org/apache/gravitino/integration/test/MiniGravitino.java:
##########
@@ -230,19 +259,40 @@ Map<String, String> getIcebergRestServiceConfigs() throws 
IOException {
     return customConfigs;
   }
 
-  private Map<String, String> getLanceRestServiceConfigs() throws IOException {
+  private Map<String, String> getLanceRestServiceConfigs(Map<String, String> 
configMap)
+      throws IOException {
+    if (context.ignoreLanceAuxRestService) {
+      return new HashMap<>();
+    }
+
     Map<String, String> customConfigs = new HashMap<>();
 
     String lanceJarPath = Paths.get("lance", "lance-rest-server", "build", 
"libs").toString();
     String lanceConfigPath =
         Paths.get("lance", "lance-rest-server", "src", "main", 
"resources").toString();
     customConfigs.put(
-        "gravitino.lance-rest." + 
AuxiliaryServiceManager.AUX_SERVICE_CLASSPATH,
+        LANCE_CONFIG_PREFIX + AuxiliaryServiceManager.AUX_SERVICE_CLASSPATH,
         String.join(",", lanceJarPath, lanceConfigPath));
 
     customConfigs.put(
-        "gravitino.lance-rest." + 
JettyServerConfig.WEBSERVER_HTTP_PORT.getKey(),
+        LANCE_CONFIG_PREFIX + JettyServerConfig.WEBSERVER_HTTP_PORT.getKey(),
         String.valueOf(RESTUtils.findAvailablePort(4000, 5000)));
+
+    if (GRAVITINO_NAMESPACE_BACKEND.equals(
+        configMap.getOrDefault(NAMESPACE_BACKEND.getKey(), 
NAMESPACE_BACKEND.getDefaultValue()))) {
+      // Set the Lance REST service to use the Gravitino server URI
+      String gravitinoUri =
+          String.format(
+              "http://%s:%s";,
+              "localhost",
+              configMap.get(
+                  GravitinoServer.WEBSERVER_CONF_PREFIX
+                      + JettyServerConfig.WEBSERVER_HTTP_PORT.getKey()));
+      customConfigs.put(LANCE_CONFIG_PREFIX + NAMESPACE_BACKEND_URI.getKey(), 
gravitinoUri);
+
+      String metalakeName = 
GravitinoITUtils.genRandomName("LanceRESTService_metalake");
+      customConfigs.put(LANCE_CONFIG_PREFIX + METALAKE_NAME.getKey(), 
metalakeName);

Review Comment:
   Shall we create the metalake here before using Lance namespace server?



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