diqiu50 commented on code in PR #4167:
URL: https://github.com/apache/gravitino/pull/4167#discussion_r1689289727
##########
trino-connector/src/main/java/org/apache/gravitino/trino/connector/metadata/GravitinoCatalog.java:
##########
@@ -116,4 +128,16 @@ public static String toJson(GravitinoCatalog catalog)
throws JsonProcessingExcep
public static GravitinoCatalog fromJson(String jsonString) throws
JsonProcessingException {
return objectMapper.readValue(jsonString, GravitinoCatalog.class);
}
+
+ public String getCluster() {
+ return properties.getOrDefault("cluster", "");
+ }
+
+ public boolean isLocal(String cluster) {
Review Comment:
We can create a catalog with a cluster information:
```
call gravitino.system.create_catalog(
'gt_mysql',
'jdbc-mysql',
map(
array['jdbc-url', 'jdbc-user', 'jdbc-password', 'jdbc-driver',
'cluster', 'cluster.connection-url', 'cluster.connection-user'],
array['jdbc:mysql://mysql/?useSSL=false', 'trino', 'ds123',
'com.mysql.cj.jdbc.Driver', 'c2', 'jdbc:trino://trino-remote:8080', 'admin']
)
);
```
When the gravitino-trino-connector config like:
```
#Thu Jun 13 17:50:55 CST 2024
connector.name=gravitino
gravitino.metalake=test
gravitino.uri=http\://gt01.orb.local\:8090
trino.catalog.store=etc/catalog
trino.jdbc.uri=jdbc\:trino\://localhost\:8080
gravitino.cluster=c2
```
If the catalog's cluster name equals then the gravition-trino-connector 's
cluster configuration. The catalog is handle by local
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]