org.apache.hadoop.hive.metastore
Class TestMetastoreVersion

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.hadoop.hive.metastore.TestMetastoreVersion
All Implemented Interfaces:
junit.framework.Test

public class TestMetastoreVersion
extends junit.framework.TestCase


Field Summary
protected  HiveConf hiveConf
           
 
Constructor Summary
TestMetastoreVersion()
           
 
Method Summary
 String getMetaStoreVersion()
           
 void setMetaStoreVersion(String newVersion, String comment)
           
protected  void setUp()
           
protected  void tearDown()
           
 void testDefaults()
          Test config defaults
 void testMetastoreVersion()
          Test that with no verification, hive populates the schema and version correctly
 void testVersionMatching()
          Test that with verification enabled, hive works when the correct schema is already populated
 void testVersionMisMatch()
          Store garbage version in metastore and verify that hive fails when verification is on
 void testVersionRestriction()
          Test schema verification property
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hiveConf

protected HiveConf hiveConf
Constructor Detail

TestMetastoreVersion

public TestMetastoreVersion()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

protected void tearDown()
                 throws Exception
Overrides:
tearDown in class junit.framework.TestCase
Throws:
Exception

testDefaults

public void testDefaults()
Test config defaults


testVersionRestriction

public void testVersionRestriction()
                            throws Exception
Test schema verification property

Throws:
Exception

testMetastoreVersion

public void testMetastoreVersion()
                          throws Exception
Test that with no verification, hive populates the schema and version correctly

Throws:
Exception

testVersionMatching

public void testVersionMatching()
                         throws Exception
Test that with verification enabled, hive works when the correct schema is already populated

Throws:
Exception

testVersionMisMatch

public void testVersionMisMatch()
                         throws Exception
Store garbage version in metastore and verify that hive fails when verification is on

Throws:
Exception

getMetaStoreVersion

public String getMetaStoreVersion()
                           throws HiveMetaException
Throws:
HiveMetaException

setMetaStoreVersion

public void setMetaStoreVersion(String newVersion,
                                String comment)
                         throws HiveMetaException
Throws:
HiveMetaException


Copyright © 2012 The Apache Software Foundation