You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "shaofengshi (via GitHub)" <gi...@apache.org> on 2025/08/04 11:26:41 UTC

[PR] [#7895]improvement(flink-connector): update flink connector document to make it better [gravitino]

shaofengshi opened a new pull request, #7920:
URL: https://github.com/apache/gravitino/pull/7920

   ### What changes were proposed in this pull request?
   
   The flink document has something wrong, which may make the user confusing.
   
   ### Why are the changes needed?
   
   1. Use the correct grammer as Flink document listed : https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sql/use/#use-catalog
   2. Add the instruction on putting jar files.
   3. Add the set batch command in each markdown file, so that Flink won't report error.
   
   Fix: #7895 
   
   ### Does this PR introduce _any_ user-facing change?
   
   No, only documentation.
   
   ### How was this patch tested?
   
   Tested by manual, with latest 0.9.1 release and Flink 1.18 version.
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7895]improvement(flink-connector): update flink connector document to make it better [gravitino]

Posted by "shaofengshi (via GitHub)" <gi...@apache.org>.
shaofengshi commented on code in PR #7920:
URL: https://github.com/apache/gravitino/pull/7920#discussion_r2255749235


##########
docs/flink-connector/flink-catalog-jdbc.md:
##########
@@ -23,6 +23,12 @@ Place the following JAR files in the lib directory of your Flink installation:
 - [`gravitino-flink-connector-runtime-1.18_2.12-${gravitino-version}.jar`](https://mvnrepository.com/artifact/org.apache.gravitino/gravitino-flink-connector-runtime-1.18)
 - JDBC driver
 
+Next, edit the JDBC catalog in Gravitino, add the `flink.bypass.default-database` property, and give it an value of the default database.

Review Comment:
   Done, please check it again.



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7895]improvement(flink-connector): update flink connector document to make it better [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 merged PR #7920:
URL: https://github.com/apache/gravitino/pull/7920


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7895]improvement(flink-connector): update flink connector document to make it better [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #7920:
URL: https://github.com/apache/gravitino/pull/7920#discussion_r2251219035


##########
docs/flink-connector/flink-connector.md:
##########
@@ -38,28 +38,33 @@ This capability allows users to perform federation queries, accessing data from
 Set the flink configuration in flink-conf.yaml.
 ```yaml
 table.catalog-store.kind: gravitino
-table.catalog-store.gravitino.gravitino.metalake: test
+table.catalog-store.gravitino.gravitino.metalake: metalake_demo
 table.catalog-store.gravitino.gravitino.uri: http://localhost:8090
 ```
 Or you can set the flink configuration in the `TableEnvironment`.
 ```java
 final Configuration configuration = new Configuration();
 configuration.setString("table.catalog-store.kind", "gravitino");
-configuration.setString("table.catalog-store.gravitino.gravitino.metalake", "test");
+configuration.setString("table.catalog-store.gravitino.gravitino.metalake", "metalake_demo");
 configuration.setString("table.catalog-store.gravitino.gravitino.uri", "http://localhost:8090");
 EnvironmentSettings.Builder builder = EnvironmentSettings.newInstance().withConfiguration(configuration);
 TableEnvironment tableEnv = TableEnvironment.create(builder.inBatchMode().build());
 ```
 
-3. Execute the Flink SQL query.
+3. Add necessary jar files to Flink's `lib` sub-folder.
+To run Flink with Gravitino connector and then access the data sources like Hive, Iceberg and others, you need to put the necessary jar files into Flink's `lib` folder. For example, to access Hive, you need to add at least these jar files: `flink-connector-hive_{version}.jar`, `hive-metastore-{version}.jar`, `hive-exec-{version}-core.jar`, `hive-serde-{version}.jar`, `hive-shims-common-{version}.jar`, `hive-storage-api-{version}.jar`, etc.

Review Comment:
   Please add a empty line after  `3. Add necessary jar files to Flink's lib sub-folder.`



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7895]improvement(flink-connector): update flink connector document to make it better [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #7920:
URL: https://github.com/apache/gravitino/pull/7920#discussion_r2251228706


##########
docs/flink-connector/flink-catalog-jdbc.md:
##########
@@ -23,6 +23,12 @@ Place the following JAR files in the lib directory of your Flink installation:
 - [`gravitino-flink-connector-runtime-1.18_2.12-${gravitino-version}.jar`](https://mvnrepository.com/artifact/org.apache.gravitino/gravitino-flink-connector-runtime-1.18)
 - JDBC driver
 
+Next, edit the JDBC catalog in Gravitino, add the `flink.bypass.default-database` property, and give it an value of the default database.

Review Comment:
   Could you polish this sentence?  it's odd to use `edit`, user may doesn't create jdbc catalog yet.



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7895]improvement(flink-connector): update flink connector document to make it better [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #7920:
URL: https://github.com/apache/gravitino/pull/7920#discussion_r2251221450


##########
docs/flink-connector/flink-connector.md:
##########
@@ -38,28 +38,33 @@ This capability allows users to perform federation queries, accessing data from
 Set the flink configuration in flink-conf.yaml.
 ```yaml
 table.catalog-store.kind: gravitino
-table.catalog-store.gravitino.gravitino.metalake: test
+table.catalog-store.gravitino.gravitino.metalake: metalake_demo
 table.catalog-store.gravitino.gravitino.uri: http://localhost:8090
 ```
 Or you can set the flink configuration in the `TableEnvironment`.
 ```java
 final Configuration configuration = new Configuration();
 configuration.setString("table.catalog-store.kind", "gravitino");
-configuration.setString("table.catalog-store.gravitino.gravitino.metalake", "test");
+configuration.setString("table.catalog-store.gravitino.gravitino.metalake", "metalake_demo");
 configuration.setString("table.catalog-store.gravitino.gravitino.uri", "http://localhost:8090");
 EnvironmentSettings.Builder builder = EnvironmentSettings.newInstance().withConfiguration(configuration);
 TableEnvironment tableEnv = TableEnvironment.create(builder.inBatchMode().build());
 ```
 
-3. Execute the Flink SQL query.
+3. Add necessary jar files to Flink's `lib` sub-folder.
+To run Flink with Gravitino connector and then access the data sources like Hive, Iceberg and others, you need to put the necessary jar files into Flink's `lib` folder. For example, to access Hive, you need to add at least these jar files: `flink-connector-hive_{version}.jar`, `hive-metastore-{version}.jar`, `hive-exec-{version}-core.jar`, `hive-serde-{version}.jar`, `hive-shims-common-{version}.jar`, `hive-storage-api-{version}.jar`, etc.

Review Comment:
   Flink package doesn't contain hive jars?



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7895]improvement(flink-connector): update flink connector document to make it better [gravitino]

Posted by "shaofengshi (via GitHub)" <gi...@apache.org>.
shaofengshi commented on code in PR #7920:
URL: https://github.com/apache/gravitino/pull/7920#discussion_r2255715785


##########
docs/flink-connector/flink-connector.md:
##########
@@ -38,28 +38,33 @@ This capability allows users to perform federation queries, accessing data from
 Set the flink configuration in flink-conf.yaml.
 ```yaml
 table.catalog-store.kind: gravitino
-table.catalog-store.gravitino.gravitino.metalake: test
+table.catalog-store.gravitino.gravitino.metalake: metalake_demo
 table.catalog-store.gravitino.gravitino.uri: http://localhost:8090
 ```
 Or you can set the flink configuration in the `TableEnvironment`.
 ```java
 final Configuration configuration = new Configuration();
 configuration.setString("table.catalog-store.kind", "gravitino");
-configuration.setString("table.catalog-store.gravitino.gravitino.metalake", "test");
+configuration.setString("table.catalog-store.gravitino.gravitino.metalake", "metalake_demo");
 configuration.setString("table.catalog-store.gravitino.gravitino.uri", "http://localhost:8090");
 EnvironmentSettings.Builder builder = EnvironmentSettings.newInstance().withConfiguration(configuration);
 TableEnvironment tableEnv = TableEnvironment.create(builder.inBatchMode().build());
 ```
 
-3. Execute the Flink SQL query.
+3. Add necessary jar files to Flink's `lib` sub-folder.
+To run Flink with Gravitino connector and then access the data sources like Hive, Iceberg and others, you need to put the necessary jar files into Flink's `lib` folder. For example, to access Hive, you need to add at least these jar files: `flink-connector-hive_{version}.jar`, `hive-metastore-{version}.jar`, `hive-exec-{version}-core.jar`, `hive-serde-{version}.jar`, `hive-shims-common-{version}.jar`, `hive-storage-api-{version}.jar`, etc.

Review Comment:
   Right, it doesn't contain hive jars by default; so we need to copy many jar files. This is the original list:
   
   <img width="370" height="322" alt="image" src="https://github.com/user-attachments/assets/11ef2cdd-10ee-4fc5-94ee-09cea94e2ecf" />
   



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#7895]improvement(flink-connector): update flink connector document to make it better [gravitino]

Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #7920:
URL: https://github.com/apache/gravitino/pull/7920#discussion_r2255769380


##########
docs/flink-connector/flink-connector.md:
##########
@@ -38,28 +38,33 @@ This capability allows users to perform federation queries, accessing data from
 Set the flink configuration in flink-conf.yaml.
 ```yaml
 table.catalog-store.kind: gravitino
-table.catalog-store.gravitino.gravitino.metalake: test
+table.catalog-store.gravitino.gravitino.metalake: metalake_demo
 table.catalog-store.gravitino.gravitino.uri: http://localhost:8090
 ```
 Or you can set the flink configuration in the `TableEnvironment`.
 ```java
 final Configuration configuration = new Configuration();
 configuration.setString("table.catalog-store.kind", "gravitino");
-configuration.setString("table.catalog-store.gravitino.gravitino.metalake", "test");
+configuration.setString("table.catalog-store.gravitino.gravitino.metalake", "metalake_demo");
 configuration.setString("table.catalog-store.gravitino.gravitino.uri", "http://localhost:8090");
 EnvironmentSettings.Builder builder = EnvironmentSettings.newInstance().withConfiguration(configuration);
 TableEnvironment tableEnv = TableEnvironment.create(builder.inBatchMode().build());
 ```
 
-3. Execute the Flink SQL query.
+3. Add necessary jar files to Flink's `lib` sub-folder.
+To run Flink with Gravitino connector and then access the data sources like Hive, Iceberg and others, you need to put the necessary jar files into Flink's `lib` folder. For example, to access Hive, you need to add at least these jar files: `flink-connector-hive_{version}.jar`, `hive-metastore-{version}.jar`, `hive-exec-{version}-core.jar`, `hive-serde-{version}.jar`, `hive-shims-common-{version}.jar`, `hive-storage-api-{version}.jar`, etc.

Review Comment:
   There are different ways to add hive dependencies. I would suggest adding a reference to `https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/hive/overview/#dependencies`



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org