Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#3750] feat: Support running in frontend (#3749)

Cheng Pan0179dc29cc7b
diff --git a/README.md b/README.md
index d961d63d99..7850589919 100644
--- a/README.md
+++ b/README.md
@@ -86,6 +86,14 @@ To stop the Gravitino server, please run:
./bin/gravitino.sh stop
```
+Alternatively, to run the Gravitino server in frontend, please run:
+
+```shell
+./bin/gravitino.sh run
+```
+
+And press `CTRL+C` to stop the Gravitino server.
+
### Using Trino with Gravitino
Gravitino provides a Trino connector to access the metadata in Gravitino. To use Trino with Gravitino, please follow the [trino-gravitino-connector doc](docs/trino-connector/index.md).
diff --git a/bin/gravitino.sh b/bin/gravitino.sh
index 065aa1603b..79bd239e2b 100755
--- a/bin/gravitino.sh
+++ b/bin/gravitino.sh
@@ -5,7 +5,7 @@
#
#set -ex
USAGE="-e Usage: bin/gravitino.sh [--config <conf-dir>]\n\t
- {start|stop|restart|status}"
+ {start|run|stop|restart|status}"
if [[ "$1" == "--config" ]]; then
shift
@@ -110,6 +110,10 @@ function start() {
check_process_status
}
+function run() {
+ ${JAVA_RUNNER} ${JAVA_OPTS} ${GRAVITINO_DEBUG_OPTS} -cp ${GRAVITINO_CLASSPATH} ${GRAVITINO_SERVER_NAME}
+}
+
function stop() {
local pid
@@ -164,6 +168,9 @@ case "${1}" in
start)
start
;;
+ run)
+ run
+ ;;
stop)
stop
;;
diff --git a/docs/how-to-install.md b/docs/how-to-install.md
index de3ff653d5..699d1a2466 100644
--- a/docs/how-to-install.md
+++ b/docs/how-to-install.md
@@ -99,12 +99,18 @@ it automatically.
#### Start Gravitino server
-After configuring the Gravitino server, start the Gravitino server by running:
+After configuring the Gravitino server, start the Gravitino server on daemon by running:
```shell
./bin/gravitino.sh start
```
+Alternatively, to run the Gravitino server in frontend, please run:
+
+```shell
+./bin/gravitino.sh run
+```
+
You can access the Gravitino Web UI by typing [http://localhost:8090](http://localhost:8090) in your browser. or you
can run