-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Support Nessie Catalog in Iceberg connector #11701
Conversation
66fed2e
to
191715e
Compare
@findepi looks like one of the CI jobs timed out. would it be possible to restart just this one job? |
@nastra GitHub Actions recently introduced "Re-run failed jobs". The feature might be not yet stable though. By the way, we will request to push an empty commit for triggering CI if necessary. |
@ebyhr I don't have permissions unfortunately to re-run the failed job myself, that's why I closeed & reopened the PR, which triggers a full CI run again (same as pushing) |
This library seems to be compiled with Java 12, but Trino works with Java 11 |
@findinpath I can see the same warning in other CI runs on other branches. Here's an example from Nessie itself is also compiled with Java 11 btw |
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
191715e
to
6beef07
Compare
The tests should be normal unit tests, not ITs. You can probably use Testcontainers for Nessie. |
It would be nice to see some tests which involve dealing with running SQL statements over the query runner to actually test how the connector works with the new catalog type. Ideal would be (at a later point) to have additionally also a product tests environment (similar to
|
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/NessieConfig.java
Outdated
Show resolved
Hide resolved
...in/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/NessieIcebergUtil.java
Outdated
Show resolved
Hide resolved
...in/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/NessieIcebergUtil.java
Outdated
Show resolved
Hide resolved
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
Thank you @nastra for your contribution. I am looking forward to help out in this PR to add support for Nessie in Trino Iceberg connector. |
585fa60
to
be8ec7c
Compare
@findinpath thanks for the review. I updated the code based on your review and pushed a new commit. Will look into doing some additional testing via SQL statements now. |
@nastra you can use the Glue related tests from the connector as a rough template on what kinds of tests you need to add. |
247f4ee
to
9466225
Compare
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
{ | ||
this.nessieApi = requireNonNull(nessieApi, "nessieApi is null"); | ||
this.config = requireNonNull(config, "nessieConfig is null"); | ||
this.reference = () -> loadReference(config.getDefaultReferenceName(), null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the client need to know the reference configured for the connector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes as it needs to operate on the correct branch/tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant, does the client need to know this detail while it is being created?
Otherwise said, should the catalog deliver the branch/tag name on each call to the client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventually this is what we might end up having (the catalog providing the branch/tag to the client), but I didn't want to over-complicate the current implementation. That being said, I would prefer to adjust this part of the code once the catalog knows which branch/tag it is being used with then executing a particular SQL
testing/trino-testing-containers/src/main/java/io/trino/testing/containers/NessieContainer.java
Outdated
Show resolved
Hide resolved
9466225
to
86ce1dc
Compare
Could you please add documentation on how to setup Nessie catalog in the Iceberg connector You can use https://github.com/trinodb/trino/pull/11772/files#diff-e1aabf1cfd8bd8aa7d1b75e70089b57413b2e620a5eebeb36cc76fd3f2ac60db as a template for getting started. |
plugin/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/NessieConfig.java
Outdated
Show resolved
Hide resolved
{ | ||
this.nessieApi = requireNonNull(nessieApi, "nessieApi is null"); | ||
this.config = requireNonNull(config, "nessieConfig is null"); | ||
this.reference = () -> loadReference(config.getDefaultReferenceName(), null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant, does the client need to know this detail while it is being created?
Otherwise said, should the catalog deliver the branch/tag name on each call to the client?
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
...ceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergNessieCatalogConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...ceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergNessieCatalogConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...ceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergNessieCatalogConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...ceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergNessieCatalogConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
@ebyhr: Thanks for the review. Fixed all the comments. PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash commits into one and remove commit body.
...-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalogFactory.java
Outdated
Show resolved
Hide resolved
.../java/io/trino/plugin/iceberg/catalog/nessie/TestIcebergNessieCatalogConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
@@ -124,7 +125,7 @@ public void setUp() | |||
onTrino().executeQuery(format("CREATE SCHEMA IF NOT EXISTS %s.%s", TRINO_CATALOG, TEST_SCHEMA_NAME)); | |||
} | |||
|
|||
@Test(groups = {ICEBERG, PROFILE_SPECIFIC_TESTS, ICEBERG_REST, ICEBERG_JDBC}, dataProvider = "storageFormatsWithSpecVersion") | |||
@Test(groups = {ICEBERG, PROFILE_SPECIFIC_TESTS, ICEBERG_REST, ICEBERG_JDBC, ICEBERG_NESSIE}, dataProvider = "storageFormatsWithSpecVersion") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests are missing ICEBERG_NESSIE group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the idea was to just run a few tests with nessie to keep CI times low and to show that trino+spark+nessie work
testing/trino-testing-containers/src/main/java/io/trino/testing/containers/NessieContainer.java
Outdated
Show resolved
Hide resolved
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
...n/trino-iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/TrinoNessieCatalog.java
Outdated
Show resolved
Hide resolved
...iceberg/src/main/java/io/trino/plugin/iceberg/catalog/nessie/IcebergNessieCatalogConfig.java
Outdated
Show resolved
Hide resolved
9e47932
to
a3d8a20
Compare
Co-authored-by: Ajantha Bhat <ajanthabhat@gmail.com>
a3d8a20
to
aee6900
Compare
The failed test Re-triggering the build |
@ajantha-bhat Please note that you don't need to retrigger CI when the failed test is unrelated to the change. Also, we recommend pushing an empty commit instead of reopening PR when retriggering CI. |
Thanks. I am new to Trino contributions. Good to know. |
PR is ready. Thanks. |
…ctor To reduce the review effort, only the basic Nessie configurations were supported in trinodb#11701. Nessie server can be deployed with Auth mode like keycloak. So, need to expose the Nessie client configurations to handle the Auth. Along with that, some common Nessie server configurations like read-timeout-ms, connect-timeout-ms and compression-enabled properties are exposed to have finer control over the Nessie commits.
…ctor To reduce the review effort, only the basic Nessie configurations were supported in trinodb#11701. Nessie server can be deployed with Auth mode like keycloak. So, need to expose the Nessie client configurations to handle the Auth. Along with that, some common Nessie server configurations like read-timeout-ms, connect-timeout-ms and compression-enabled properties are exposed to have finer control over the Nessie commits.
This PR integrates the (Nessie catalog functionality)[https://github.com/apache/iceberg/tree/master/nessie/src/main/java/org/apache/iceberg/nessie] to the Iceberg connector. It adds the following new things:
CatalogType
calledNESSIE
IcebergNessieCatalogModule
that sets up all necessary dependencies (including a client to connect to the Nessie server)NessieConfig
that includes configuration settings required for NessieTrinoNessieCatalog
+NessieIcebergTableOperations
that implement the main behavior of the catalognessie-apprunner-maven-plugin
prior to the integration-test phase)