@InterfaceAudience.Private
public interface IMetaStoreSchemaInfo
Modifier and Type | Field and Description |
---|---|
static String |
SQL_FILE_EXTENSION |
Modifier and Type | Method and Description |
---|---|
String |
generateInitFileName(String toVersion)
Get the name of the script to initialize the schema for given version
|
String |
getCreateUserScript()
Get SQL script that will create the user and database for Metastore to use.
|
String |
getHiveSchemaVersion()
Get hive distribution schema version.
|
String |
getMetaStoreSchemaVersion(HiveSchemaHelper.MetaStoreConnectionInfo metastoreDbConnectionInfo)
Get the schema version from the backend database.
|
String |
getMetaStoreScriptDir()
Find the directory of metastore scripts
|
String |
getPreUpgradeScriptName(int index,
String scriptName)
Get the pre-upgrade script for a given script name.
|
List<String> |
getUpgradeScripts(String fromVersion)
Get the list of sql scripts required to upgrade from the give version to current.
|
boolean |
isVersionCompatible(String productVersion,
String dbVersion)
A dbVersion is compatible with hive version if it is greater or equal to the hive version.
|
static final String SQL_FILE_EXTENSION
List<String> getUpgradeScripts(String fromVersion) throws HiveMetaException
fromVersion
- HiveMetaException
String generateInitFileName(String toVersion) throws HiveMetaException
toVersion
- Target version. If it's null, then the current server version is usedHiveMetaException
String getCreateUserScript() throws HiveMetaException
HiveMetaException
- if something goes wrong.String getMetaStoreScriptDir()
String getPreUpgradeScriptName(int index, String scriptName)
index
- - index number of the file. The preupgrade script name is derived using the given
indexscriptName
- - upgrade script nameString getHiveSchemaVersion()
String getMetaStoreSchemaVersion(HiveSchemaHelper.MetaStoreConnectionInfo metastoreDbConnectionInfo) throws HiveMetaException
metastoreDbConnectionInfo
- Connection information needed to connect to the backend
databaseHiveMetaException
- when unable to fetch the schema versionboolean isVersionCompatible(String productVersion, String dbVersion)
productVersion
- version of hive softwaredbVersion
- version of metastore rdbms schemaCopyright © 2022 The Apache Software Foundation. All rights reserved.