Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#4559] Improvement (docs): Rename the Gravitino connector to Gravitino Trino connector in docs #4560

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/trino-connector/catalog-hive.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Apache Gravitino connector - Hive catalog"
title: "Apache Gravitino Trino connector - Hive catalog"
slug: /trino-connector/catalog-hive
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
Expand Down Expand Up @@ -50,8 +50,8 @@ CREATE SCHEMA catalog.schema_name

### Create table

The Gravitino connector currently supports basic Hive table creation statements, such as defining fields,
allowing null values, and adding comments. The Gravitino connector does not support `CREATE TABLE AS SELECT`.
The Gravitino Trino connector currently supports basic Hive table creation statements, such as defining fields,
allowing null values, and adding comments. The Gravitino Trino connector does not support `CREATE TABLE AS SELECT`.

The following example shows how to create a table in the Hive catalog:

Expand All @@ -77,7 +77,7 @@ Support for the following alter table operations:

### Select

The Gravitino connector supports most SELECT statements, allowing the execution of queries successfully.
The Gravitino Trino connector supports most SELECT statements, allowing the execution of queries successfully.
Currently, it doesn't support certain query optimizations, such as pushdown and pruning functionalities.

## Schema and table properties
Expand Down Expand Up @@ -290,9 +290,9 @@ DROP TABLE hive_test.database_01.table_01;

## HDFS config and permissions

For basic setups, Gravitino connector configures the HDFS client automatically and does not require any configuration
For basic setups, Gravitino Trino connector configures the HDFS client automatically and does not require any configuration
files.
Gravitino connector is not support user to config the `hdfs-site.xml` and `core-site.xml` files to the HDFS client.
Gravitino Trino connector is not support user to config the `hdfs-site.xml` and `core-site.xml` files to the HDFS client.

Before running any `Insert` statements for Hive tables in Trino,
you must check that the user Trino is using to access HDFS has access to the Hive warehouse directory.
Expand All @@ -301,4 +301,4 @@ replacing hdfs_user with the appropriate username:

```text
-DHADOOP_USER_NAME=hdfs_user
```
```
10 changes: 5 additions & 5 deletions docs/trino-connector/catalog-iceberg.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Apache Gravitino connector - Iceberg catalog"
title: "Apache Gravitino Trino connector - Iceberg catalog"
slug: /trino-connector/catalog-iceberg
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
Expand Down Expand Up @@ -32,8 +32,8 @@ CREATE SCHEMA "metalake.catalog".schema_name

### Create table

The Gravitino connector currently supports basic Iceberg table creation statements, such as defining fields,
allowing null values, and adding comments. The Gravitino connector does not support `CREATE TABLE AS SELECT`.
The Gravitino Trino connector currently supports basic Iceberg table creation statements, such as defining fields,
allowing null values, and adding comments. The Gravitino Trino connector does not support `CREATE TABLE AS SELECT`.

The following example shows how to create a table in the Iceberg catalog:

Expand All @@ -57,7 +57,7 @@ Support for the following alter table operations:

## Select

The Gravitino connector supports most SELECT statements, allowing the execution of queries successfully.
The Gravitino Trino connector supports most SELECT statements, allowing the execution of queries successfully.
Currently, it doesn't support certain query optimizations, such as pushdown and pruning functionalities.

## Table and Schema properties
Expand Down Expand Up @@ -236,4 +236,4 @@ replacing hdfs_user with the appropriate username:

```text
-DHADOOP_USER_NAME=hdfs_user
```
```
11 changes: 5 additions & 6 deletions docs/trino-connector/catalog-mysql.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Apache Gravitino connector - MySQL catalog"
title: "Apache Gravitino Trino connector - MySQL catalog"
slug: /trino-connector/catalog-mysql
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
Expand All @@ -16,10 +16,9 @@ To connect to MySQL, you need:

## Create table

At present, the Apache Gravitino connector only supports basic MySQL table creation statements, which involve fields, null allowances, and comments.
However, it does not support advanced features like primary keys, indexes, default values, and auto-increment.
At present, the Apache Gravitino Trino connector only supports basic MySQL table creation statements, which involve fields, null allowances, and comments. However, it does not support advanced features like primary keys, indexes, default values, and auto-increment.

The Gravitino connector does not support `CREATE TABLE AS SELECT`.
The Gravitino Trino connector does not support `CREATE TABLE AS SELECT`.

## Alter table

Expand All @@ -32,7 +31,7 @@ Support for the following alter table operations:

## Select

The Gravitino connector supports most SELECT statements, allowing the execution of queries successfully.
The Gravitino Trino connector supports most SELECT statements, allowing the execution of queries successfully.
Currently, it doesn't support certain query optimizations, such as indexes and pushdowns.

## Table and Schema properties
Expand Down Expand Up @@ -171,4 +170,4 @@ Drop a table:

```sql
DROP TABLE mysql_test.database_01.table_01;
```
```
13 changes: 6 additions & 7 deletions docs/trino-connector/catalog-postgresql.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Apache Gravitino connector - PostgreSQL catalog"
title: "Apache Gravitino Trino connector - PostgreSQL catalog"
slug: /trino-connector/catalog-postgresql
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
Expand All @@ -16,14 +16,13 @@ To connect to PostgreSQL, you need:

## Create table

At present, the Apache Gravitino connector only supports basic PostgreSQL table creation statements, which involve fields, null allowances, and comments.
However, it does not support advanced features like primary keys, indexes, default values, and auto-increment.
At present, the Apache Gravitino Trino connector only supports basic PostgreSQL table creation statements, which involve fields, null allowances, and comments. However, it does not support advanced features like primary keys, indexes, default values, and auto-increment.

The Gravitino connector does not support `CREATE TABLE AS SELECT`.
The Gravitino Trino connector does not support `CREATE TABLE AS SELECT`.

## Alter table

Gravitino connector supports the following alter table operations:
Gravitino Trino connector supports the following alter table operations:
- Rename table
- Add a column
- Drop a column
Expand All @@ -33,7 +32,7 @@ Gravitino connector supports the following alter table operations:

## Select

The Gravitino connector supports most SELECT statements, allowing the execution of queries successfully.
The Gravitino Trino connector supports most SELECT statements, allowing the execution of queries successfully.
Currently, it doesn't support certain query optimizations, such as indexes and pushdowns.

## Table and Schema properties
Expand Down Expand Up @@ -171,4 +170,4 @@ Drop a table:

```sql
DROP TABLE postgresql_test.database_01.table_01;
```
```
2 changes: 1 addition & 1 deletion docs/trino-connector/configuration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Apache Gravitino connector Configuration"
title: "Apache Gravitino Trino connector Configuration"
slug: /trino-connector/configuration
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
Expand Down
21 changes: 10 additions & 11 deletions docs/trino-connector/development.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: "Apache Gravitino connector development"
title: "Apache Gravitino Trino connector development"
slug: /trino-connector/development
keyword: gravitino connector development
license: "This software is licensed under the Apache License version 2."
---

This document is to guide users through the development of the Apache Gravitino connector for Trino locally.
This document is to guide users through the development of the Apache Gravitino Trino connector for Trino locally.

## Prerequisites

Before you start developing the Gravitino trino connector, you need to have the following prerequisites:
Before you start developing the Gravitino Trino connector, you need to have the following prerequisites:

1. You need to start the Gravitino server locally, for more information, please refer to the [start Gravitino server](../how-to-install.md)
2. Create a catalog in the Gravitino server, for more information, please refer to the [Gravitino metadata management](../manage-relational-metadata-using-gravitino.md). Assuming we have just created a MySQL catalog using the following command:
Expand All @@ -32,15 +32,14 @@ Please change the above `localhost`, `port` and the names of metalake and catalo

## Development environment

To develop the Gravitino connector locally, you need to do the following steps:
To develop the Gravitino Trino connector locally, you need to do the following steps:

### IDEA

1. Clone the Trino repository from the [GitHub](https://github.com/trinodb/trino) repository. The released version Trino-435 is the least version that Gravitino supports.
2. Open the Trino project in your IDEA.
3. Create a new module for the Gravitino connector in the Trino project as the following picture (we will use the name `trino-gravitino` as the module name in the following steps). ![trino-gravitino](../assets/trino/create-gravitino-connector.jpg)
4. Add a soft link to the Gravitino trino connector module in the Trino project. Assuming the src java main directory of the Gravitino trino connector in project Gravitino is `gravitino/path/to/gravitino-trino-connector/src/main/java`,
and the src java main directory of trino-gravitino in the Trino project is `trino/path/to/trino-gravitino/src/main/java`, you can use the following command to create a soft link:
3. Create a new module for the Gravitino Trino connector in the Trino project as the following picture (we will use the name `trino-gravitino` as the module name in the following steps). ![trino-gravitino](../assets/trino/create-gravitino-trino-connector.jpg)
4. Add a soft link to the Gravitino Trino connector module in the Trino project. Assuming the src java main directory of the Gravitino Trino connector in project Gravitino is `gravitino/path/to/gravitino-trino-connector/src/main/java`, and the src java main directory of trino-gravitino in the Trino project is `trino/path/to/trino-gravitino/src/main/java`, you can use the following command to create a soft link:

```shell
ln -s gravitino/path/to/trino-connector/src/main/java trino/path/to/trino-gravitino/src/main/java
Expand Down Expand Up @@ -162,7 +161,7 @@ then you can see the `gravitino-trino-connecor` source files and directories in
If a compile error occurs due to `The following artifacts could not be resolved: org.apache.gravitino:xxx:jar`, which can be resolved by executing `./gradlew publishToMavenLocal` in gravitino beforehand.
:::

7. Set up the configuration for the Gravitino connector in the Trino project. You can do as the following picture shows:
7. Set up the configuration for the Gravitino Trino connector in the Trino project. You can do as the following picture shows:
![](../assets/trino/add-config.jpg)

The corresponding configuration files are here:
Expand Down Expand Up @@ -222,7 +221,7 @@ plugin.bundles=\

node-scheduler.include-coordinator=true

# Note: The Gravitino connector olny supports with The dynamic catalog manager
# Note: The Gravitino Trino connector olny supports with The dynamic catalog manager
catalog.management=dynamic
```

Expand All @@ -232,13 +231,13 @@ Remove the file `/etc/catalogs/xxx.properties` if the corresponding `plugin/trin

8. Start the Trino server and connect to the Gravitino server.
![](../assets/trino/start-trino.jpg)
9. If `DevelopmentServer` has started successfully, you can connect to the Trino server using the `trino-cli` and run the following command to see if the Gravitino connector is available:
9. If `DevelopmentServer` has started successfully, you can connect to the Trino server using the `trino-cli` and run the following command to see if the Gravitino Trino connector is available:
```shell
java -jar trino-cli-429-executable.jar --server localhost:8180
```
:::note
The `trino-cli-429-executable.jar` is the Trino CLI jar file, you can download it from the [Trino release page](https://trino.io/docs/current/client/cli.html). **Users can use the version of the Trino CLI jar file according to the version of the Trino server.**
:::

10. If nothing goes wrong, you can start developing the Gravitino connector in the Gravitino project and debug it in the Trino project.
10. If nothing goes wrong, you can start developing the Gravitino Trino connector in the Gravitino project and debug it in the Trino project.
![](../assets/trino/show-catalogs.jpg)
4 changes: 2 additions & 2 deletions docs/trino-connector/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Apache Gravitino connector index"
title: "Apache Gravitino Trino connector index"
slug: /trino-connector/index
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
---

Apache Gravitino connector index:
Apache Gravitino Trino connector index:

- [Trino Support](trino-connector.md)
- [Requirements](requirements.md)
Expand Down
32 changes: 16 additions & 16 deletions docs/trino-connector/installation.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: "Apache Gravitino connector installation"
title: "Apache Gravitino Trino connector installation"
slug: /trino-connector/installation
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
---

To install the Apache Gravitino connector, you should first deploy the Trino environment, and then install the Gravitino connector plugin into Trino.
To install the Apache Gravitino Trino connector, you should first deploy the Trino environment, and then install the Gravitino Trino connector plugin into Trino.
Please refer to the [Deploying Trino documentation](https://trino.io/docs/current/installation/deployment.html) and do the following steps:

1. [Download](https://github.com/apache/gravitino/releases) the Gravitino connector tarball and unpack it.
1. [Download](https://github.com/apache/gravitino/releases) the Gravitino Trino connector tarball and unpack it.
The tarball contains a single top-level directory `gravitino-trino-connector-<version>`,
which called the connector directory.
2. Copy the connector directory to the Trino's plugin directory.
Normally, the directory location is `Trino-server-<version>/plugin`, and the directory contains other catalogs used by Trino.
3. Add Trino JVM arguments `-Dlog4j.configurationFile=file:////etc/trino/log4j2.properties` to enable logging for the Gravitino connector.
3. Add Trino JVM arguments `-Dlog4j.configurationFile=file:////etc/trino/log4j2.properties` to enable logging for the Gravitino Trino connector.
4. Update Trino coordinator configuration.
You need to set `catalog.management=dynamic`, The config location is `Trino-server-<version>/etc/config.properteis`, and the contents like:

Expand All @@ -26,13 +26,13 @@ discovery.uri=http://0.0.0.0:8080
```

Alternatively,
you can build the Gravitino connector package from the sources
you can build the Gravitino Trino connector package from the sources
and obtain the `gravitino-trino-connector-<version>.tar.gz` file in the `$PROJECT/distribution` directory.
Please refer to the [Gravitino Development documentation](../how-to-build.md)

## Example

You can install the Gravitino connector in Trino office docker images step by step.
You can install the Gravitino Trino connector in Trino office docker images step by step.

### Running the container

Expand All @@ -46,9 +46,9 @@ docker run --name trino-gravitino -d -p 8080:8080 trinodb/trino:435
Run `docker ps` to check whether the container is running.


### Installing the Apache Gravitino connector
### Installing the Apache Gravitino Trino connector

Download the Gravitino connector tarball and unpack it.
Download the Gravitino Trino connector tarball and unpack it.

```shell
cd /tmp
Expand All @@ -71,7 +71,7 @@ docker exec -it trino-gravitino /bin/bash
cd /lib/trino/plugin
```

Now you can see the Gravitino connector directory in the plugin directory.
Now you can see the Gravitino Trino connector directory in the plugin directory.

### Configuring the Trino

Expand All @@ -86,37 +86,37 @@ discovery.uri=http://localhost:8080
catalog.management=dynamic
```

### Configuring the Apache Gravitino connector
### Configuring the Apache Gravitino Trino connector

Assuming you have now started the Gravitino server on the host `gravitino-server-host` and already created a metalake named `test`, if those have not been prepared, please refer to the [Gravitino getting started](../getting-started.md).

To configure Gravitino connector correctly, you need to put the following configurations to the Trino configuration file `/etc/trino/catalog/gravitino.properties`.
To configure Gravitino Trino connector correctly, you need to put the following configurations to the Trino configuration file `/etc/trino/catalog/gravitino.properties`.

```text
connector.name=gravitino
gravitino.uri=http://gravitino-server-host:8090
gravitino.metalake=test
```

- The `gravitino.name` defines which Gravitino connector is used. It must be `gravitino`.
- The `gravitino.name` defines which Gravitino Trino connector is used. It must be `gravitino`.
- The `gravitino.metalake` defines which metalake are used. It should exist in the Gravitino server.
- The `gravitino.uri` defines the connection information about Gravitino server. Make sure your container can access the Gravitino server.

Full configurations for Apache Gravitino connector can be seen [here](configuration.md)
Full configurations for Apache Gravitino Trino connector can be seen [here](configuration.md)

If you haven't created the metalake named `test`, you can use the following command to create it.

```shell
curl -X POST -H "Content-Type: application/json" -d '{"name":"test","comment":"comment","properties":{}}' http://gravitino-server-host:8090/api/metalakes
```

And then restart the Trino container to load the Gravitino connector.
And then restart the Trino container to load the Gravitino Trino connector.

```shell
docker restart trino-gravitino
```

### Verifying the Apache Gravitino connector
### Verifying the Apache Gravitino Trino connector

Use the Trino CLI to connect to the Trino container and run a query.

Expand All @@ -133,7 +133,7 @@ tpch
system
```

You can see the `gravitino` catalog in the result set. This signifies the successful installation of the Gravitino connector.
You can see the `gravitino` catalog in the result set. This signifies the successful installation of the Gravitino Trino connector.

Assuming you have created a catalog named `test.jdbc-mysql` in the Gravitino server, or please refer to [Create a Catalog](../manage-relational-metadata-using-gravitino.md#create-a-catalog). Then you can use the Trino CLI to connect to the Trino container and run a query like this.

Expand Down
4 changes: 2 additions & 2 deletions docs/trino-connector/requirements.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: "Apache Gravitino connector requirements"
title: "Apache Gravitino Trino connector requirements"
slug: /trino-connector/requirements
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
---

To install and deploy the Apache Gravitino connector, The following environmental setup is necessary:
To install and deploy the Apache Gravitino Trino connector, The following environmental setup is necessary:

- Trino server version should be between Trino-server-435 and Trino-server-439.
Other versions of Trino have not undergone thorough testing.
Expand Down
4 changes: 2 additions & 2 deletions docs/trino-connector/sql-support.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Apache Gravitino connector SQL support"
title: "Apache Gravitino Trino connector SQL support"
slug: /trino-connector/sql-support
keyword: gravitino connector trino
license: "This software is licensed under the Apache License version 2."
Expand Down Expand Up @@ -45,4 +45,4 @@ The connector provides read access and write access to data and metadata stored
- [COMMIT](https://trino.io/docs/current/sql/commit.html)
- [ROLLBACK](https://trino.io/docs/current/sql/rollback.html)

For more information, please refer to Trino [SQL statements support](https://trino.io/docs/current/language/sql-support.html#sql-globally-available)
For more information, please refer to Trino [SQL statements support](https://trino.io/docs/current/language/sql-support.html#sql-globally-available)
Loading
Loading