Search in sources :

Example 96 with AfterClass

use of org.junit.AfterClass in project hive by apache.

the class TestQBCompact method deInit.

@AfterClass
public static void deInit() throws Exception {
    Hive h = Hive.get(conf);
    h.dropTable("foo");
}
Also used : Hive(org.apache.hadoop.hive.ql.metadata.Hive) AfterClass(org.junit.AfterClass)

Example 97 with AfterClass

use of org.junit.AfterClass in project hive by apache.

the class TestReadEntityDirect method onetimeTeardown.

@AfterClass
public static void onetimeTeardown() throws Exception {
    Driver driver = createDriver();
    driver.run("drop table t1");
    driver.run("drop view v1");
}
Also used : Driver(org.apache.hadoop.hive.ql.Driver) AfterClass(org.junit.AfterClass)

Example 98 with AfterClass

use of org.junit.AfterClass in project hive by apache.

the class TestBeeLineHistory method afterTests.

@AfterClass
public static void afterTests() throws Exception {
    File file = new File(fileName);
    file.delete();
}
Also used : File(java.io.File) AfterClass(org.junit.AfterClass)

Example 99 with AfterClass

use of org.junit.AfterClass in project hive by apache.

the class TestColumnAccess method Teardown.

@AfterClass
public static void Teardown() throws Exception {
    Driver driver = createDriver();
    driver.run("drop table t1");
    driver.run("drop table t2");
    driver.run("drop view v1");
}
Also used : Driver(org.apache.hadoop.hive.ql.Driver) AfterClass(org.junit.AfterClass)

Example 100 with AfterClass

use of org.junit.AfterClass in project hive by apache.

the class TestCustomAuthentication method tearDown.

@AfterClass
public static void tearDown() throws Exception {
    if (hiveConf != null && hiveConfBackup != null) {
        FileOutputStream fos = new FileOutputStream(new File(hiveConf.getHiveSiteLocation().toURI()));
        fos.write(hiveConfBackup);
        fos.close();
    }
    if (hiveserver2 != null) {
        hiveserver2.stop();
        hiveserver2 = null;
    }
    Thread.sleep(1000);
    System.out.println("hiveServer2 stop ......");
}
Also used : FileOutputStream(java.io.FileOutputStream) File(java.io.File) AfterClass(org.junit.AfterClass)

Aggregations

AfterClass (org.junit.AfterClass)202 File (java.io.File)76 DalHints (com.ctrip.platform.dal.dao.DalHints)23 Path (org.apache.hadoop.fs.Path)14 FileSystem (org.apache.hadoop.fs.FileSystem)13 HashMap (java.util.HashMap)12 IOException (java.io.IOException)10 ModelNode (org.jboss.dmr.ModelNode)8 StatementParameters (com.ctrip.platform.dal.dao.StatementParameters)7 ScenarioConfiguration (org.apache.hadoop.mapred.nativetask.testutil.ScenarioConfiguration)7 FileOutputStream (java.io.FileOutputStream)6 RelationManager (edu.uci.ics.textdb.storage.RelationManager)5 ClientException (edu.umass.cs.gnscommon.exceptions.client.ClientException)5 Configuration (org.apache.hadoop.conf.Configuration)5 HttpSolrClient (org.apache.solr.client.solrj.impl.HttpSolrClient)5 Method (java.lang.reflect.Method)4 SQLException (java.sql.SQLException)4 Statement (java.sql.Statement)4 LoggerContext (org.apache.logging.log4j.core.LoggerContext)4 GuidEntry (edu.umass.cs.gnsclient.client.util.GuidEntry)3