-
Notifications
You must be signed in to change notification settings - Fork 162
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
[590] Add Hudi Glue Catalog Sync Implementation #649
Conversation
xtable-aws/src/main/java/org/apache/xtable/glue/table/HudiGlueCatalogTableBuilder.java
Outdated
Show resolved
Hide resolved
xtable-aws/src/main/java/org/apache/xtable/glue/GlueCatalogPartitionSyncOperations.java
Show resolved
Hide resolved
xtable-aws/src/main/java/org/apache/xtable/glue/GlueCatalogPartitionSyncOperations.java
Outdated
Show resolved
Hide resolved
xtable-aws/src/main/java/org/apache/xtable/glue/GlueCatalogSyncClient.java
Outdated
Show resolved
Hide resolved
@vamsikarnika Can you rebase with latest master ? I will merge this tomorrow. |
xtable-aws/src/test/java/org/apache/xtable/glue/table/TestHudiGlueCatalogTableBuilder.java
Outdated
Show resolved
Hide resolved
xtable-aws/src/test/java/org/apache/xtable/glue/TestGlueCatalogSyncClient.java
Outdated
Show resolved
Hide resolved
532e35c
to
e2a3704
Compare
tableProperties.putAll(sparkTableProperties); | ||
return tableProperties; | ||
} | ||
|
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.
Moved this code to HudiCatalogTablePropertiesExtractor since this was common to Glue as well
14dc47f
to
cdecdec
Compare
if (response.errors().stream() | ||
.allMatch( | ||
(error) -> | ||
"AlreadyExistsException".equals(error.errorDetail().errorCode()))) { |
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.
AlreadyExistsException
- is there a constant or code you can import from the Glue SDK for this?
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.
No, I couldn't find any error code for this exceptions. Glue SDK is using the name itself as the error code.
Table table = | ||
GlueCatalogTableUtils.getTable( | ||
glueClient, glueCatalogConfig.getCatalogId(), tableIdentifier); | ||
; |
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.
Remove this extra ;
assertNotNull(table.getParameters()); | ||
assertFalse(table.getParameters().isEmpty()); | ||
assertEquals(table.getParameters().get(HUDI_METADATA_CONFIG), "true"); |
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.
Why remove the assertions in this test?
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.
Have moved the logic to fetch table properties to HudiCatalogTablePropertiesExtractor class which populate the fields we're asserting here. Have added the tests in TestHudiCatalogTablePropertiesExractor class to validate these.
@vamsikarnika Can you squash into a single commit ? |
b93b1e8
to
bf14dc0
Compare
Important Read
What is the purpose of the pull request
Add Implementation for Hudi Glue Catalog Sync
Brief change log
Verify this pull request
This change added tests and can be verified as follows: