This is an automated email from the ASF dual-hosted git repository.

liuxun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino-playground.git


The following commit(s) were added to refs/heads/main by this push:
     new 101173c  fix(README.md): fix outdated playground commands (#114)
101173c is described below

commit 101173cc6141aa89b9d0a638bd53f2e142b27f92
Author: Eric Chang <[email protected]>
AuthorDate: Mon Dec 23 20:22:10 2024 +0800

    fix(README.md): fix outdated playground commands (#114)
    
    Fix outdated playground commands in `README.md`.
    
    Resolves #113
---
 README.md     |  6 +++---
 playground.sh | 39 ++++++++++++++++++++-------------------
 2 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/README.md b/README.md
index 5f21797..13c3f13 100644
--- a/README.md
+++ b/README.md
@@ -65,16 +65,16 @@ cd gravitino-playground
 ### Start
 
 ```
-./playground.sh docker start
+./playground.sh start
 ```
 
 ### Check status
 ```shell 
-./playground.sh docker status
+./playground.sh status
 ```
 ### Stop playground
 ```shell
-./playground.sh docker stop
+./playground.sh stop
 ```
 
 ## Experiencing Apache Gravitino with Trino SQL
diff --git a/playground.sh b/playground.sh
index 7a0359f..9124c97 100755
--- a/playground.sh
+++ b/playground.sh
@@ -52,6 +52,7 @@ checkPortInUse() {
   if [[ "$(uname)" == "Darwin" ]]; then
     openPort=$(lsof -i :$port -sTCP:LISTEN)
   elif [[ "$(uname)" == "Linux" ]]; then
+    echo "Checking ports with sudo permission ...'
     openPort=$(sudo lsof -i :$port -sTCP:LISTEN)
   fi
   if [ -z "${openPort}" ]; then
@@ -65,12 +66,12 @@ checkPortInUse() {
 start() {
   echo "INFO: Starting the playground..."
 
-       testDocker
-       checkCompose
-       ports=(8090 9001 3307 19000 19083 60070 13306 15342 18080 18888 19090 
13000)
-       for port in "${ports[@]}"; do
-               checkPortInUse ${port}
-       done
+  testDocker
+  checkCompose
+  ports=(8090 9001 3307 19000 19083 60070 13306 15342 18080 18888 19090 13000)
+  for port in "${ports[@]}"; do
+    checkPortInUse ${port}
+  done
 
   cd ${playground_dir}
   echo "Preparing packages..."
@@ -78,28 +79,28 @@ start() {
   ./init/gravitino/gravitino-dependency.sh
   ./init/jupyter/jupyter-dependency.sh
 
-       logSuffix=$(date +%Y%m%d%H%m%s)
-       if [ "$enableRanger" == true ]; then
-                       docker-compose -f docker-compose.yaml -f 
docker-enable-ranger-hive-override.yaml up --detach
-       else
-                       docker-compose up --detach
-       fi
+  logSuffix=$(date +%Y%m%d%H%m%s)
+  if [ "$enableRanger" == true ]; then
+    docker-compose -f docker-compose.yaml -f 
docker-enable-ranger-hive-override.yaml up --detach
+  else
+    docker-compose up --detach
+  fi
        
-       docker compose logs -f >${playground_dir}/playground-${logSuffix}.log 
2>&1 &
-       echo "Check log details: ${playground_dir}/playground-${logSuffix}.log"
+  docker compose logs -f >${playground_dir}/playground-${logSuffix}.log 2>&1 &
+  echo "Check log details: ${playground_dir}/playground-${logSuffix}.log"
 }
 
 status() {
-       docker-compose ps -a
+  docker-compose ps -a
 }
 
 stop() {
   echo "INFO: Stopping the playground..."
 
-       docker-compose down
-       if [ $? -eq 0 ]; then
-               echo "INFO: Playground stopped!"
-       fi
+  docker-compose down
+  if [ $? -eq 0 ]; then
+    echo "INFO: Playground stopped!"
+  fi
 }
 
 case "$1" in

Reply via email to