MetastoreRepository¶
Init Metastore If Needed¶
initMetastoreIfNeeded
starts a transaction (with a new Session
(Hibernate) from the system-wide SessionFactory).
initMetastoreIfNeeded
looks up the one and only metastore.
Unless found, initMetastoreIfNeeded
creates a new metastore.
initMetastoreIfNeeded
prints out the following INFO message to the logs:
initMetastoreIfNeeded
creates a MetastoreDAO
with a pseudo-randomly generated UUID and persists it.
initMetastoreIfNeeded
prints out the following INFO message to the logs:
In case of any exception, initMetastoreIfNeeded
prints out the following ERROR message to the logs:
initMetastoreIfNeeded
is used when:
UnityCatalogServer
is requested to start
System-Wide MetastoreRepository Instance¶
MetastoreRepository
creates an instance of itself at the class load time.
Final Property
INSTANCE
is a Java final property to prevent subclasses from overriding or hiding it.
Learn more in the Java Language Specification.
Static Property
INSTANCE
is a Java class property to be invoked without a reference to a particular object.
Learn more in the Java Language Specification.
This MetastoreRepository
instance is available using MetastoreRepository.getInstance.
Get Instance¶
Static Method
getInstance
is a Java class method to be invoked without a reference to a particular object.
Learn more in the Java Language Specification.
getInstance
returns the system-wide MetastoreRepository Instance.
getInstance
is used when:
UnityCatalogServer
is requested to startKeyMapperUtil
is requested to mapResourceKeysUnityAccessUtil
is requested for the MetastoreRepositoryCatalogService
is requested to filterCatalogsFunctionService
is requested to filterFunctionsMetastoreService
is requested for the MetastoreRepositoryModelService
is requested to filterModelsPermissionService
is requested for the MetastoreRepositorySchemaService
is requested to filterSchemasTableService
is requested to filterTablesVolumeService
is requested to filterVolumes