public class MetaStoreSchemaInfo extends Object
Constructor and Description |
---|
MetaStoreSchemaInfo(String hiveHome,
HiveConf hiveConf,
String dbType) |
Modifier and Type | Method and Description |
---|---|
String |
generateInitFileName(String toVersion)
Get the name of the script to initialize the schema for given version
|
static String |
getHiveSchemaVersion() |
String |
getMetaStoreScriptDir()
Find the directory of metastore scripts
|
static String |
getPreUpgradeScriptName(int index,
String upgradeScriptName) |
List<String> |
getUpgradeScripts(String fromVersion)
Get the list of sql scripts required to upgrade from the give version to current
|
static boolean |
isVersionCompatible(String hiveVersion,
String dbVersion)
A dbVersion is compatible with hive version if it is greater or equal to
the hive version.
|
public MetaStoreSchemaInfo(String hiveHome, HiveConf hiveConf, String dbType) throws HiveMetaException
HiveMetaException
public List<String> getUpgradeScripts(String fromVersion) throws HiveMetaException
fromVersion
- HiveMetaException
public String generateInitFileName(String toVersion) throws HiveMetaException
toVersion
- Target version. If it's null, then the current server version is usedHiveMetaException
public String getMetaStoreScriptDir()
public static String getPreUpgradeScriptName(int index, String upgradeScriptName)
public static String getHiveSchemaVersion()
public static boolean isVersionCompatible(String hiveVersion, String dbVersion)
hiveVersion
- version of hive softwaredbVersion
- version of metastore rdbms schemaCopyright © 2016 The Apache Software Foundation. All rights reserved.