-
Notifications
You must be signed in to change notification settings - Fork 379
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
[#287] feat(iceberg): add iceberg rest catalog namespace interface #302
Conversation
@jerryshao , UT is added, please take a review while you have time |
iceberg/src/main/java/com/datastrato/graviton/iceberg/web/IcebergRestUtils.java
Outdated
Show resolved
Hide resolved
iceberg/src/main/java/com/datastrato/graviton/iceberg/web/IcebergRestUtils.java
Outdated
Show resolved
Hide resolved
iceberg/src/main/java/com/datastrato/graviton/iceberg/web/rest/IcebergSchemaOperations.java
Outdated
Show resolved
Hide resolved
iceberg/src/main/java/com/datastrato/graviton/iceberg/web/rest/IcebergSchemaOperations.java
Outdated
Show resolved
Hide resolved
Code Coverage Report
Files
|
Are we OK with the -52.24% test coverage in IcebergCatalogUtil.java? |
I would suggest to break into small PRs for iceberg support. |
I'm thinking that we should not do a specific catalog only for "iceberg", at least from package organization and naming thing, we should use lakehouse instead of iceberg. |
iceberg/src/main/java/com/datastrato/graviton/iceberg/IcebergServerConfig.java
Outdated
Show resolved
Hide resolved
iceberg/src/main/java/com/datastrato/graviton/iceberg/ops/IcebergTableOps.java
Outdated
Show resolved
Hide resolved
iceberg/src/main/java/com/datastrato/graviton/iceberg/web/IcebergObjectMapperProvider.java
Outdated
Show resolved
Hide resolved
add more tests for |
...g-lakehouse/src/main/java/com/datastrato/graviton/lakehouse/iceberg/ops/IcebergTableOps.java
Outdated
Show resolved
Hide resolved
...g-lakehouse/src/main/java/com/datastrato/graviton/lakehouse/iceberg/IcebergServerConfig.java
Outdated
Show resolved
Hide resolved
if (catalog instanceof SupportsNamespaces) { | ||
asNamespaceCatalog = (SupportsNamespaces) catalog; | ||
LOG.info("init iceberg namespace ops"); | ||
} |
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.
what is the behavior if this Catalog
doesn't support SupportsNamespaces
?
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.
now IcebergExceptionMapper catches the NullPointerException and response with http status 500, we could throw 'NotSupportedException' and return http status 406
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.
NPE is not an exception that should be caught, it is the bug need to be fixed. So you need to add such logic to handle this thing.
...ehouse/src/main/java/com/datastrato/graviton/lakehouse/iceberg/utils/IcebergCatalogUtil.java
Outdated
Show resolved
Hide resolved
return Response.status(Response.Status.OK).entity(t).type(MediaType.APPLICATION_JSON).build(); | ||
} | ||
|
||
public static Response errorResponse(Exception exc) { |
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.
It would be better to use "exc" not "ex" as a short name of exception.
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.
This is not fixed.
...akehouse/src/main/java/com/datastrato/graviton/lakehouse/iceberg/web/rest/IcebergConfig.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/datastrato/graviton/lakehouse/iceberg/web/rest/IcebergSchemaOperations.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/datastrato/graviton/lakehouse/iceberg/web/rest/IcebergSchemaOperations.java
Outdated
Show resolved
Hide resolved
...lakehouse/src/main/java/com/datastrato/graviton/lakehouse/iceberg/web/rest/IcebergToken.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/datastrato/graviton/server/GravitonServer.java
Outdated
Show resolved
Hide resolved
@jerryshao , the code is updated. |
What changes were proposed in this pull request?
to support iceberg rest api, we add interfaces:
Why are the changes needed?
iceberg api spec
Fix: #287
Does this PR introduce any user-facing change?
add new interfaces
How was this patch tested?
memory catalog