World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
Java ai-catalogdata-catalogdatalakefederated-querylakehousemetadatametalakemodel-catalogopendatacatalogskycomputingstratosphere
[#479] feat(docs): Improve the syntax and documentation (#564)
Justin Mclean25fe06a966ac
diff --git a/README.md b/README.mdindex c989f79692..944b200ac5 100644--- a/README.md+++ b/README.md@@ -17,9 +17,9 @@ Gravitino is a high-performance, geo-distributed, and federated metadata lake. IGravitino aims to provide several key features:* SSOT (Single Source of Truth) for multi-regional data with geo-distributed architecture support.-* Unified Data + AI assets managements for both users and engines.-* Security in one place, centralize the security for different sources.-* Built-in data management + data access management.+* Unified Data and AI asset management for both users and engines.+* Security in one place, centralizing the security for different sources.+* Built-in data management and data access management.## Online Documentation@@ -58,17 +58,17 @@ For the details of building and testing Gravitino, please see [How to build Grav## Quick Start-### Configure and start Gravitino server+### Configure and start the Gravitino server-Gravitino server configuration file `gravitino.conf` is located under `conf` follow the typical property file format, you can change the configuration in this file.+Gravitino server configuration file `gravitino.conf` is located under `conf` and follows the typical property file format, you can change the configuration in this file.-To start Gravitino server, please run:+To start the Gravitino server, please run:```shell./bin/gravitino.sh start```-To stop Gravitino server, please run:+To stop the Gravitino server, please run:```shell./bin/gravitino.sh stop@@ -85,4 +85,5 @@ Gravitino provides a Trino connector to access the metadata in Gravitino. To use3. [How to publish Docker images](docs/publish-docker-images.md)## License-Gravitino is under the Apache License Version 2.0, See the [LICENSE](LICENSE) for the details.\ No newline at end of file++Gravitino is under the Apache License Version 2.0, See the [LICENSE](LICENSE) for the details.diff --git a/docs/README.md b/docs/README.mdindex a8305ea890..056d892979 100644--- a/docs/README.md+++ b/docs/README.md@@ -1,10 +1,10 @@----title: "Gravitino Document"+title: "Gravitino Documentation"date: 2023-10-03T09:03:20-08:00license: "Copyright 2023 Datastrato.This software is licensed under the Apache License version 2."----# Gravitino Document+## Gravitino Documentation## Launch Gravitino document website@@ -15,7 +15,7 @@ Execute `./launch-docs-website.sh` scripts, it will create the Gravitino documen3. Use the `hugo new site web` command to create the website project within the `build` directory.4. Copy all markdown files into `web/content/docs` to generate the HTML for the document website using Hugo.5. Copy the entire assets directory into `web/static` to include the images referenced in the document website HTML.-6. Automatically replace the Markdown embedded image addresses with Hugo website absolute paths.+6. Automatically replace the Markdown embedded image addresses with Hugo website absolute paths.> This is necessary because Markdown embedded images use relative paths, whereas Hugo website images require absolute paths.> Replace ` | `3600000` | 0.1.0 |-| `gravitino.catalog.classloader.isolated` | Whether to use isolated classloader for catalog, if it's true, all catalog-related libraries and configurations will be loaded by an isolated classloader NOT by AppClassLoader. Default value is`true` | `true` | 0.1.0 |+| `gravitino.catalog.classloader.isolated` | Whether to use an isolated classloader for catalog, if it's true, all catalog-related libraries and configurations will be loaded by an isolated classloader NOT by AppClassLoader. Default value is `true` | `true` | 0.1.0 |diff --git a/docs/gravitino-use-iceberg.md b/docs/gravitino-use-iceberg.mdindex 9cf43ccdb8..361225f5e3 100644--- a/docs/gravitino-use-iceberg.md+++ b/docs/gravitino-use-iceberg.md@@ -4,24 +4,27 @@ date: 2023-10-18license: "Copyright 2023 Datastrato.This software is licensed under the Apache License version 2."----# Using Iceberg as a Catalog in Gravitino++## Using Iceberg as a Catalog in GravitinoGravitino provides the ability to use Iceberg as a catalog for managing your data. This guide will walk you through the steps to create a catalog using Iceberg within Gravitino.+### Capabilities-### Capabilities:* Worked as a catalog proxy, supports HiveCatalog and JdbcCatalog for now* The integrated Iceberg version used is 1.3.1.* Before you create a catalog, make sure you have already created a Metalake. If you haven't done so, please follow the Metalake creation steps.## Creating an Iceberg Catalog+To create an Iceberg catalog, use the following steps:Submit a catalog JSON example to the Gravitino server using the URL format:-```+```shellhttp://{GravitinoServerHost}:8090/api/metalakes/{Your_metalake_name}/catalogs- ```+```+Example JSON:```json@@ -40,29 +43,32 @@ http://{GravitinoServerHost}:8090/api/metalakes/{Your_metalake_name}/catalogs}```-- `provider`: Set this to "lakehouse-iceberg" to use Iceberg as the catalog provider.-- `catalog-backend`: This configuration represents the catalog mode used by Iceberg. You can choose from "hive" and "jdbc".-- `uri`: This is a required configuration, and it can be either a Hive URI or a JDBC URI.-- `warehouse`: This is a required configuration and can point to a file system such as HDFS.-- Other configuration parameters can be added to the "properties" section, and they will be passed down to the underlying system.-- If you are using the JDBC catalog implementation, make sure to include "jdbc-user" and "jdbc-password" as required configurations.-- If you intend to use the JDBC connector, you need to add the corresponding JDBC driver to the `catalogs/lakehouse-iceberg/libs` directory in the classpath.+* `provider`: Set this to "lakehouse-iceberg" to use Iceberg as the catalog provider.+* `catalog-backend`: This configuration represents the catalog mode used by Iceberg. You can choose from "hive" and "jdbc".+* `uri`: This is a required configuration, and it can be either a Hive URI or a JDBC URI.+* `warehouse`: This is a required configuration and can point to a file system such as HDFS.+* Other configuration parameters can be added to the "properties" section and passed down to the underlying system.+* If you are using the JDBC catalog implementation, make sure to include "jdbc-user" and "jdbc-password" as required configurations.+* If you intend to use the JDBC connector, you need to add the corresponding JDBC driver to the `catalogs/lakehouse-iceberg/libs` directory in the classpath.-#### configuration+### configuration| Configuration item | Description | value ||-----------------------------------|--------------------------------------------------|------------------------------------------------------------------------------------------------------|| `catalog-backend` | Catalog backend of Gravitino Iceberg | `hive` or `jdbc` |-| `uri` | Hive metadata address or jdbc connection address | `thrift://127.0.0.1:9083` or `jdbc:postgresql://127.0.0.1:5432/` or `jdbc:mysql://127.0.0.1:3306/test` |-| `warehouse ` | Warehouse directory of Catalog | `/user/hive/warehouse-hive/` or `hdfs://namespace/hdfs/path` |+| `uri` | Hive metadata address or JDBC connection address | `thrift://127.0.0.1:9083` or `jdbc:postgresql://127.0.0.1:5432/` or `jdbc:mysql://127.0.0.1:3306/test` |+| `warehouse` | Warehouse directory of Catalog | `/user/hive/warehouse-hive/` or `hdfs://namespace/hdfs/path` |++### HDFS configuration-### Hdfs configuration-You can place (`core-site.xml` and `hdfs-site.xml`) in the `catalogs/lakehouse-iceberg/conf` directory, and we will automatically load them as the default HDFS configuration. Of course, you can also pass the respective key-value pairs in the JSON parameters under 'properties' for personalized configuration.+You can place (`core-site.xml` and `hdfs-site.xml`) in the `catalogs/lakehouse-iceberg/conf` directory, and it will be automatically loaded as the default HDFS configuration. Of course, you can also pass the respective key-value pairs in the JSON parameters under 'properties' for personalized configuration.## After the catalog is initialized+You can manage and operate on tables using the following URL format:- ```+ ```shellhttp://{GravitinoServerHost}:8090/api/metalakes/{metalake}/catalogs/{catalog}/schemas/{schema}/tables```-Now you can use Iceberg as a catalog for managing your data in Gravitino. If you encounter any issues or need further assistance, refer to the Gravitino documentation or seek help from the support team.\ No newline at end of file++Now you can use Iceberg as a catalog for managing your data in Gravitino. If you encounter any issues or need further assistance, refer to the Gravitino documentation or seek help from the support team.diff --git a/docs/how-to-build.md b/docs/how-to-build.mdindex 15331e37ad..64994948dd 100644--- a/docs/how-to-build.md+++ b/docs/how-to-build.md@@ -4,13 +4,15 @@ date: 2023-10-03T09:03:20-08:00license: "Copyright 2023 Datastrato.This software is licensed under the Apache License version 2."----# How to Build Gravitino+## How to Build Gravitino## Prerequisites++ JDK 1.8+ Git## Quick Start+1. Clone the Gravitino project.```shell@@ -23,6 +25,7 @@ This software is licensed under the Apache License version 2."cd gravitino./gradlew build```+> Note: The first time you build the project, it may take a while to download the dependencies.3. Deploy the Gravitino project in your local environment.@@ -34,7 +37,8 @@ This software is licensed under the Apache License version 2."The `compileDistribution` command will create a `distribution` directory in the Gravitino root directory.The directory structure of the `distribution` directory is as follows:- ```++ ```text├── ...└── distribution/package├── bin/gravitino.sh # Gravitino Server Launching scripts@@ -47,6 +51,7 @@ This software is licensed under the Apache License version 2."├── libs/ # Gravitino Server dependencies lib└── logs/ # Gravitino Server logs```+> Note: The `./gradlew clean` command will delete the `distribution` directory.4. Run Gravitino Server.@@ -54,6 +59,7 @@ This software is licensed under the Apache License version 2."```shelldistribution/package/bin/gravitino.sh start```+> Note: If you need to debug the Gravitino Server, you can enable the `GRAVITINO_DEBUG_OPTS` environment variable in the `conf/gravitino-env.sh` file.Then you can create a `Remote JVM Debug` configuration in `IntelliJ IDEA` and debug `gravitino.server.main`.@@ -63,11 +69,12 @@ This software is licensed under the Apache License version 2."distribution/package/bin/gravitino.sh stop```-6. Assemble Gravitino distribution package.+6. Assemble the Gravitino distribution package.```shell./gradlew assembleDistribution```+The `assembleDistribution` command will create `gravitino-{version}-bin.tar.gz` and `gravitino-{version}-bin.tar.gz.sha256` under the `distribution` directory.You can deploy them to your production environment.diff --git a/docs/integration-test.md b/docs/integration-test.mdindex 198c12581b..1785a7c08b 100644--- a/docs/integration-test.md+++ b/docs/integration-test.md@@ -4,26 +4,31 @@ date: 2023-10-02T09:03:20-08:00license: "Copyright 2023 Datastrato.This software is licensed under the Apache License version 2."----# How to Run Integration Tests+## How to Run Integration Tests## Introduction-The `integration-test` module contains integration test cases to ensure the correctness of the++The `integration-test` module contains integration test cases to ensure the correctness of theGravitino Server, API, and Client. These tests can be run locally or on GitHub Actions.## Test Modes### MiniGravitino Embedded Mode+The `MiniGravitino` is a lightweight Gravitino Server that is embedded in the integration test module.+1. Execute the `./gradlew build -x test` command to build the Gravitino project.2. Use the `./gradlew test [--rerun-tasks]` or `./gradlew test [--rerun-tasks] -PtestMode=embedded` command to run the integration tests.-> Execution the `./gradlew build` command to build the Gravitino project and automatic run the integration tests in the embedded mode.+> Execute the `./gradlew build` command to build the Gravitino project and automatically run the integration tests in the embedded mode.It provides full Gravitino Server functionality and supports the following abilities:+- Running a Gravitino Server in a single thread- Starting a Jetty Server to provide the Gravitino Server API, using a random port to avoid port conflicts- Using a random storage path to store backend data, which is deleted when MiniGravitino is stopped### Deploying Gravitino Server Locally+The Gravitino Server can be deployed locally to run the integration tests. Follow these steps:1. Execute the `./gradlew build -x test` command to build the Gravitino project.@@ -31,11 +36,13 @@ The Gravitino Server can be deployed locally to run the integration tests. Follo3. Use the `./gradlew test [--rerun-tasks] -PtestMode=deploy` command to run the integration tests in the `distribution` directory.### Skipping Tests-+ You can skip unit tests by using the `./gradlew build -PskipTests` command.-+ You can skip integration tests by using the `./gradlew build -PskipITs` command.-+ You can both skip unit tests and integration tests by using the `./gradlew build -x test` or `./gradlew build -PskipTests -PskipITs` command.++- You can skip unit tests by using the `./gradlew build -PskipTests` command.+- You can skip integration tests by using the `./gradlew build -PskipITs` command.+- You can both skip unit tests and integration tests by using the `./gradlew build -x test` or `./gradlew build -PskipTests -PskipITs` command.## Docker Test Environment+Some integration test cases depend on the Gravitino CI Docker environment.If an integration test relies on the specific Gravitino CI Docker environment,@@ -45,7 +52,8 @@ the `datastrato/gravitino-ci-hive` Docker container for testing the Hive data soTherefore, it should have the following `@tag` annotation:`@tag(CI-DOCKER-NAME)`, This annotationhelps identify the specific Docker container required for the integration test.For example:-```++```java@Tag("gravitino-ci-hive")public class CatalogHiveIT extends AbstractIT {...@@ -54,7 +62,8 @@ public class CatalogHiveIT extends AbstractIT {If you have Docker installed and a special CI Docker container running, the `./gradlew test -PtestMode=[embedded|deploy]`command will automatically execute all the test cases.-```++```text------------------- Check Docker environment ------------------Docker server status .......................................... [running]Gravitino IT Docker container is already running ............... [yes]@@ -64,27 +73,33 @@ Use Gravitino IT Docker container to run all integration test. [embbeded|deploIf Docker is not installed or the special CI Docker container is not running, the `./gradlew test -PtestMode=[embedded|deploy]`command will skip the test cases that depend on the special Docker environment.-```++```text------------------- Check Docker environment ------------------Docker server status .......................................... [running]Gravitino IT Docker container is already running ............... [no]Run only test cases where tag is set `gravitino-docker-it`. [embbeded|deploy test]---------------------------------------------------------------```+> Gravitino will run all integration test cases in the GitHub Actions environment.### Running Gravitino CI Docker Environment+Before running the tests, make sure Docker is installed.#### Running Gravitino Hive CI Docker Environment-1. Run a hive docker test environment container in the local using the `docker run --rm -d -p 8022:22 -p 8088:8088 -p 9000:9000 -p 9083:9083 -p 10000:10000 -p 10002:10002 -p 50070:50070 -p 50075:50075 datastrato/gravitino-ci-hive` command.++1. Run a hive docker test environment container in the local using the `docker run --rm -d -p 8022:22 -p 8088:8088 -p 9000:9000 -p 9083:9083 -p 10000:10000 -p 10002:10002 -p 50010:50010 -p 50070:50070 -p 50075:50075 datastrato/gravitino-ci-hive` command.Additionally, the Gravitino Server and third-party data source Docker runtime environments will use certain ports. Ensure that these ports are not already in use:+- Gravitino Server: Port `8090`-- Hive Docker runtime environment: Ports is `22`, `7180`, `8088`, `8888`, `9000`, `9083`, `10000`, `10002`, `50070`, and ` 50075`+- Hive Docker runtime environment: Ports are `22`, `7180`, `8088`, `8888`, `9000`, `9083`, `10000`, `10002`, `50070`, and `50075`## Debugging Gravitino Server and Integration Tests-By default, the integration tests are run using MiniGravitino.++By default, the integration tests are run using MiniGravitino.Debugging with MiniGravitino is simple and easy. You can modify any code in the Gravitino project and set breakpoints anywhere.### How to Debug deploy mode Gravitino Server and Integration Tests@@ -93,31 +108,31 @@ To debug the Gravitino Server and integration tests, you have two modes: `embedd1. Embedded Mode (default):- This mode is simpler to debug but not as close to the actual environment- - Debugging with `MiniGravitino` is simple and easy. You don't to do any setup to debug directly+ - Debugging with `MiniGravitino` is simple and easy. You don't have to do any setup to debug directly2. Deploy Mode:- This mode is closer to the actual environment but more complex to debug- To debug the Gravitino Server code, follow these steps:- Execute the `./gradlew build -x test` command to build the Gravitino project- Use the `./gradlew compileDistribution` command to republish the packaged project in the `distribution` directory- - If you only debug integration test codes, You don't to do any setup to debug directly- - If you need debug Gravitino server codes, flow these steps:+ - If you only debug integration test codes, You don't have to do any setup to debug directly+ - If you need to debug Gravitino server codes, follow these steps:- Enable the `GRAVITINO_DEBUG_OPTS` environment variable in the `distribution/package/conf/gravitino-env.sh` file to enable remote JVM debugging- Manually start the Gravitino Server using the `./distribution/package/bin/gravitino-server.sh start` command- Select `gravitino.server.main` module classpath in the `Remote JVM Debug` to attach the Gravitino Server process and debug it-## Running on GitHub Actions:+## Running on GitHub Actions- When you submit a pull request to the `main` branch, GitHub Actions will automatically run integration tests in the embedded and deploy mode.- Test results can be viewed in the `Actions` tab of the pull request page.- The integration tests are executed in several steps:- + If you set the `build docker image` label in the pull request, GitHub Actions will trigger the build of all Docker- images under the `./dev/docker/` directory. This step usually takes around 10 minutes. If you have made changes to the Dockerfile,+ - If you set the `build docker image` label in the pull request, GitHub Actions will trigger the build of all Docker+ images under the `./dev/docker/` directory. This step usually takes around 10 minutes. If you have made changes to the Dockerfile,you need to set the `build docker image` label in the pull request.- + Otherwise, GitHub Actions will pull the Docker image `datastrato/gravitino-ci-hive` from the Docker Hub repository. This step usually takes around 15 seconds.- + If you set the `debug action` label in the pull request, GitHub Actions will run an SSH server with+ - Otherwise, GitHub Actions will pull the Docker image `datastrato/gravitino-ci-hive` from the Docker Hub repository. This step usually takes around 15 seconds.+ - If you set the `debug action` label in the pull request, GitHub Actions will run an SSH server with`csexton/debugger-action@master`, allowing you to remotely log in to the Actions environment for debugging purposes.- + The Gravitino project is compiled and packaged in the `distribution` directory using the `./gradlew compileDistribution` command.- + Execution the `./gradlew test -PtestMode=[embedded|deploy]` command.- + Stop Docker image and cleaned up.+ - The Gravitino project is compiled and packaged in the `distribution` directory using the `./gradlew compileDistribution` command.+ - Execution the `./gradlew test -PtestMode=[embedded|deploy]` command.+ - Stop the Docker image to clean up.diff --git a/docs/publish-docker-images.md b/docs/publish-docker-images.mdindex 9903040fdf..1b18cef86a 100644--- a/docs/publish-docker-images.md+++ b/docs/publish-docker-images.md@@ -4,32 +4,35 @@ date: 2023-10-01T09:03:20-08:00license: "Copyright 2023 Datastrato.This software is licensed under the Apache License version 2."----# How to Publish Docker images++## How to Publish Docker Images## Introduction-The Gravitino project provides a set of docker images to facilitate the publish, development and testing of the Gravitino project.++The Gravitino project provides a set of docker images to facilitate the publishing, development and testing of the Gravitino project.The Gravitino official docker images are published to the [datastrato](https://hub.docker.com/u/datastrato) DockerHub repository.-## Publish Docker Images to Docker Hub Flow+## Publish Docker Images to Docker HubWe use Github Actions to publish the docker images to the DockerHub repository.-1. Open the https://github.com/datastrato/gravitino/actions/workflows/docker-image.yml++1. Open the <https://github.com/datastrato/gravitino/actions/workflows/docker-image.yml>2. Click the `Run workflow` button.3. Select the branch you want to publish.- + If you select `main` branch, the docker image will be published same to specified tag and the `latest` tag.-+ + If you select `main` branch, the docker image will be published the specified tag and the `latest` tag.+ If you select another branch, the docker image will only publish the specified tag.4. Input the `tag name`, for example: `0.1.0`, Then build and push the docker image name is `datastrato/{image-name}:0.1.0`.- + Currently, we only support publishing the `hive` docker image, for example: `datastrato/gravitino-ci-hive`.- + We will support publishing other data sources, for example, `Iecberg` docker image in the future.+ + Currently, only the `hive` docker image is supported, for example: `datastrato/gravitino-ci-hive`.+ + Publishing other data sources, for example, `Iceberg` docker image will be supported in the future.5. You must enter the correct `publish docker token` before you can execute run `Publish Docker Image` workflow.6. Wait for the workflow to complete. You can see a new docker image shown in the [datastrato](https://hub.docker.com/u/datastrato) DockerHub repository.-+++## The Version of the Data Source-## The version of the Data source in the Docker image-- [gravitino-ci-hive](../dev/docker/hive/README.md)\ No newline at end of file++ [gravitino-ci-hive](../dev/docker/hive/README.md)