|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hive.beeline.HiveSchemaTool
public class HiveSchemaTool
Constructor Summary | |
---|---|
HiveSchemaTool(String dbType)
|
|
HiveSchemaTool(String hiveHome,
HiveConf hiveConf,
String dbType)
|
Method Summary | |
---|---|
static String |
buildCommand(HiveSchemaHelper.NestedScriptParser dbCommandParser,
String scriptDir,
String scriptFile)
|
void |
doInit()
Initialize the metastore schema to current version |
void |
doInit(String toVersion)
Initialize the metastore schema |
void |
doUpgrade()
Perform metastore schema upgrade. |
void |
doUpgrade(String fromSchemaVer)
Perform metastore schema upgrade |
HiveConf |
getHiveConf()
|
static void |
main(String[] args)
|
void |
runBeeLine(String sqlScriptFile)
|
void |
setDryRun(boolean dryRun)
|
void |
setPassWord(String passWord)
|
void |
setUserName(String userName)
|
void |
setVerbose(boolean verbose)
|
void |
showInfo()
Print Hive version and schema version |
void |
verifySchemaVersion()
check if the current schema version in metastore matches the Hive version |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HiveSchemaTool(String dbType) throws HiveMetaException
HiveMetaException
public HiveSchemaTool(String hiveHome, HiveConf hiveConf, String dbType) throws HiveMetaException
HiveMetaException
Method Detail |
---|
public HiveConf getHiveConf()
public void setUserName(String userName)
public void setPassWord(String passWord)
public void setDryRun(boolean dryRun)
public void setVerbose(boolean verbose)
public void showInfo() throws HiveMetaException
MetaException
HiveMetaException
public void verifySchemaVersion() throws HiveMetaException
MetaException
HiveMetaException
public void doUpgrade() throws HiveMetaException
MetaException
HiveMetaException
public void doUpgrade(String fromSchemaVer) throws HiveMetaException
fromSchemaVer
- Existing version of the metastore. If null, then read from the metastore
MetaException
HiveMetaException
public void doInit() throws HiveMetaException
MetaException
HiveMetaException
public void doInit(String toVersion) throws HiveMetaException
toVersion
- If null then current hive version is used
MetaException
HiveMetaException
public static String buildCommand(HiveSchemaHelper.NestedScriptParser dbCommandParser, String scriptDir, String scriptFile) throws IllegalFormatException, IOException
IllegalFormatException
IOException
public void runBeeLine(String sqlScriptFile) throws IOException
IOException
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |