apache / polaris

Apache Polaris, the interoperable, open source catalog for Apache Iceberg
https://polaris.apache.org/
Apache License 2.0
1.17k stars 130 forks source link

Move most references to RealmEntityManagerFactory to use MetaStoreManagerFactory #419

Closed collado-mike closed 2 weeks ago

collado-mike commented 3 weeks ago

Description

The PolarisEntityManager is almost entirely used as a means to access the PolarisMetaStoreManager and the RealmEntityManagerFactory is really just an alternative to the MetaStoreManagerFactory. In order to narrow dependencies (as described in https://github.com/apache/polaris/pull/417 ), so that components can declare dependency only on the interfaces they need (e.g., PolarisGrantManager or PolarisCredentialVendor), this removes most references to the PolarisEntityManager and uses the PolarisMetaStoreManager directly. This will make declaring dependencies on pluggable components (like authorization grants) easier.

The only piece of logic the PolarisEntityManager actually implements is the construction and preparation of the Resolver, so its getter methods are removed and only the classes that require a Resolver have any dependency on the PolarisEntityManager.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Interface-only changes, so all existing unit and integration tests still pass.

Test Configuration:

Checklist:

Please delete options that are not relevant.