-
Notifications
You must be signed in to change notification settings - Fork 2k
[Kernel-Spark] Wire up catalog-managed snapshot management for CCv2 #5608
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
base: master
Are you sure you want to change the base?
Conversation
93b4fa1 to
7b49f62
Compare
f251dd5 to
8122696
Compare
| requireNonNull(spark, "spark is null"); | ||
| requireNonNull(hadoopConf, "hadoopConf is null"); | ||
|
|
||
| Optional<ManagedCatalogAdapter> adapterOpt = |
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 currently UC-specific and will be address in a follow up stack/PR. Although it is UC-specific, generic catalog design is kept in mind.
As we see below, there is no downcasting to UnityCatalogAdapter since getTableId() and getTablePath() are on the ManagedCatalogAdapter interface. Only the discovery call needs generalization when supporting additional catalogs.
| return tablePath; | ||
| } | ||
|
|
||
| public String getEndpoint() { |
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.
getTableId()/getTablePath() are on the generic interface. endpoint/token are not exposed, they're encapsulated inside UCClient, keeping auth details internal to the UC adapter.
ef369c6 to
c2c9b92
Compare
a781bb5 to
d54ac9d
Compare
d54ac9d to
5be63f1
Compare
5be63f1 to
8508d21
Compare
🥞 Stacked PR
Use this link to review incremental changes.
Which Delta project/connector is this regarding?
Description
This PR implements the catalog-managed snapshot management wiring for Coordinated Commits v2 (CCv2), connecting the wireframe components introduced in #5607 to the Unity Catalog infrastructure.
Key changes:
DeltaSnapshotManagerFactory.fromCatalogTable()to detect UC-managed tables and createCatalogManagedSnapshotManagerUnityCatalogAdaptertoUCCatalogManagedClientfor snapshot/commit-range loadingkernelUnityCatalog(compile + test) dependency tokernel-sparkmoduleArchitecture
flowchart TD Factory[DeltaSnapshotManagerFactory.fromCatalogTable] Factory --> UCAdapter[UnityCatalogAdapter.fromCatalog] UCAdapter --> Check{Adapter present?} Check -->|Yes| CatalogMgr[CatalogManagedSnapshotManager] CatalogMgr -.->|delegates to| Adapter[UnityCatalogAdapter] Adapter -.->|uses| UCClient[UCCatalogManagedClient] Check -->|No| PathMgr[PathBasedSnapshotManager]How was this patch tested?
Locally and CI.
Does this PR introduce any user-facing changes?
No.