Copilot commented on code in PR #9206: URL: https://github.com/apache/gravitino/pull/9206#discussion_r2555694048
########## dev/docker/lance-rest-server/rewrite_config.py: ########## @@ -0,0 +1,77 @@ +#!/usr/bin/env bash Review Comment: The shebang line is incorrect for a Python script. It should be `#!/usr/bin/env python` or `#!/usr/bin/env python3` instead of `#!/usr/bin/env bash`. ```suggestion #!/usr/bin/env python3 ``` ########## docs/docker-image-details.md: ########## @@ -121,6 +121,25 @@ Changelog - Supports associate&disassociate tag, policy to metadata - Supports submit&cancel jobs. +## Apache Gravitino Lance REST server Docker image + +You can deploy the standalone Gravitino Lance REST server with the Docker image. + +```shell +docker run --rm -d -p 9102:9102 apache/gravitino-lance-rest:latest -e LANCE_REST_GRAVITINO_METALAKE_NAME=test -e LANCE_REST_PORT=9102 Review Comment: The docker run command syntax is incorrect. Environment variables should be passed with `-e` flags before the image name, not after. The correct syntax should be: `docker run --rm -d -p 9102:9102 -e LANCE_REST_GRAVITINO_METALAKE_NAME=test -e LANCE_REST_PORT=9102 apache/gravitino-lance-rest:latest` ```suggestion docker run --rm -d -p 9102:9102 -e LANCE_REST_GRAVITINO_METALAKE_NAME=test -e LANCE_REST_PORT=9102 apache/gravitino-lance-rest:latest ``` ########## docs/docker-image-details.md: ########## @@ -121,6 +121,25 @@ Changelog - Supports associate&disassociate tag, policy to metadata - Supports submit&cancel jobs. +## Apache Gravitino Lance REST server Docker image + +You can deploy the standalone Gravitino Lance REST server with the Docker image. + +```shell +docker run --rm -d -p 9102:9102 apache/gravitino-lance-rest:latest -e LANCE_REST_GRAVITINO_METALAKE_NAME=test -e LANCE_REST_PORT=9102 +``` + +Currently, Gravitino Lance REST server supports setting the following environment variables +- LANCE_REST_GRAVITINO_METALAKE_NAME: It will overwrite the configuration "gravitino.lance-rest.gravitino.metalake-name" in configuration file `conf/gravitino-lance-rest-server-config`. **You should set it to your Gravitino metalake name.** +- LANCE_REST_NAMESPACE_BACKEND: It will overwrite the configuration "gravitino.lance-rest.namespace-backend" in configuration file `conf/gravitino-lance-rest-server-config`. The default value is "gravitino" and you should not change it as of now. +- LANCE_REST_GRAVITINO_URI: It will overwrite the configuration "gravitino.lance-rest.gravitino-uri" in configuration file `conf/gravitino-lance-rest-server-config`. The default value is "http://localhost:8090" and you can change it to your Gravitino server address. +- LANCE_REST_HOST: It will overwrite the configuration "gravitino.lance-rest.host" in configuration file `conf/gravitino-lance-rest-server-config`. The default value is `0.0.0.0`. +- LANCE_REST_PORT: It will overwrite the configuration "gravitino.lance-rest.httpPort" in configuration file `conf/gravitino-lance-rest-server-config`. The default value is `9101`. Review Comment: The configuration key reference is inconsistent. According to the `rewrite_config.py` env_map, `LANCE_REST_GRAVITINO_METALAKE_NAME` maps to 'gravitino.metalake-name', which with the prefix becomes 'gravitino.lance-rest.gravitino.metalake-name'. However, the file path reference `conf/gravitino-lance-rest-server-config` is missing the `.conf` extension based on the pattern in `rewrite_config.py` line 58 which uses `conf/gravitino-lance-rest-server.conf`. ```suggestion - LANCE_REST_GRAVITINO_METALAKE_NAME: It will overwrite the configuration "gravitino.lance-rest.gravitino.metalake-name" in configuration file `conf/gravitino-lance-rest-server.conf`. **You should set it to your Gravitino metalake name.** - LANCE_REST_NAMESPACE_BACKEND: It will overwrite the configuration "gravitino.lance-rest.namespace-backend" in configuration file `conf/gravitino-lance-rest-server.conf`. The default value is "gravitino" and you should not change it as of now. - LANCE_REST_GRAVITINO_URI: It will overwrite the configuration "gravitino.lance-rest.gravitino-uri" in configuration file `conf/gravitino-lance-rest-server.conf`. The default value is "http://localhost:8090" and you can change it to your Gravitino server address. - LANCE_REST_HOST: It will overwrite the configuration "gravitino.lance-rest.host" in configuration file `conf/gravitino-lance-rest-server.conf`. The default value is `0.0.0.0`. - LANCE_REST_PORT: It will overwrite the configuration "gravitino.lance-rest.httpPort" in configuration file `conf/gravitino-lance-rest-server.conf`. The default value is `9101`. ``` ########## docs/docker-image-details.md: ########## @@ -121,6 +121,25 @@ Changelog - Supports associate&disassociate tag, policy to metadata - Supports submit&cancel jobs. +## Apache Gravitino Lance REST server Docker image + +You can deploy the standalone Gravitino Lance REST server with the Docker image. + +```shell +docker run --rm -d -p 9102:9102 apache/gravitino-lance-rest:latest -e LANCE_REST_GRAVITINO_METALAKE_NAME=test -e LANCE_REST_PORT=9102 +``` + +Currently, Gravitino Lance REST server supports setting the following environment variables +- LANCE_REST_GRAVITINO_METALAKE_NAME: It will overwrite the configuration "gravitino.lance-rest.gravitino.metalake-name" in configuration file `conf/gravitino-lance-rest-server-config`. **You should set it to your Gravitino metalake name.** +- LANCE_REST_NAMESPACE_BACKEND: It will overwrite the configuration "gravitino.lance-rest.namespace-backend" in configuration file `conf/gravitino-lance-rest-server-config`. The default value is "gravitino" and you should not change it as of now. +- LANCE_REST_GRAVITINO_URI: It will overwrite the configuration "gravitino.lance-rest.gravitino-uri" in configuration file `conf/gravitino-lance-rest-server-config`. The default value is "http://localhost:8090" and you can change it to your Gravitino server address. +- LANCE_REST_HOST: It will overwrite the configuration "gravitino.lance-rest.host" in configuration file `conf/gravitino-lance-rest-server-config`. The default value is `0.0.0.0`. +- LANCE_REST_PORT: It will overwrite the configuration "gravitino.lance-rest.httpPort" in configuration file `conf/gravitino-lance-rest-server-config`. The default value is `9101`. Review Comment: All configuration file path references should use `.conf` extension (i.e., `conf/gravitino-lance-rest-server.conf`) to match the actual path defined in `rewrite_config.py` line 58. ```suggestion - LANCE_REST_GRAVITINO_METALAKE_NAME: It will overwrite the configuration "gravitino.lance-rest.gravitino.metalake-name" in configuration file `conf/gravitino-lance-rest-server.conf`. **You should set it to your Gravitino metalake name.** - LANCE_REST_NAMESPACE_BACKEND: It will overwrite the configuration "gravitino.lance-rest.namespace-backend" in configuration file `conf/gravitino-lance-rest-server.conf`. The default value is "gravitino" and you should not change it as of now. - LANCE_REST_GRAVITINO_URI: It will overwrite the configuration "gravitino.lance-rest.gravitino-uri" in configuration file `conf/gravitino-lance-rest-server.conf`. The default value is "http://localhost:8090" and you can change it to your Gravitino server address. - LANCE_REST_HOST: It will overwrite the configuration "gravitino.lance-rest.host" in configuration file `conf/gravitino-lance-rest-server.conf`. The default value is `0.0.0.0`. - LANCE_REST_PORT: It will overwrite the configuration "gravitino.lance-rest.httpPort" in configuration file `conf/gravitino-lance-rest-server.conf`. The default value is `9101`. ``` -- 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]
