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:
UnityCatalogServeris 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:
UnityCatalogServeris requested to startKeyMapperUtilis requested to mapResourceKeysUnityAccessUtilis requested for the MetastoreRepositoryCatalogServiceis requested to filterCatalogsFunctionServiceis requested to filterFunctionsMetastoreServiceis requested for the MetastoreRepositoryModelServiceis requested to filterModelsPermissionServiceis requested for the MetastoreRepositorySchemaServiceis requested to filterSchemasTableServiceis requested to filterTablesVolumeServiceis requested to filterVolumes