Search in sources :

Example 11 with AfterClass

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

the class TestAMAuthorization method resetConf.

@AfterClass
public static void resetConf() {
    Configuration conf = new Configuration();
    conf.setBoolean(CommonConfigurationKeys.HADOOP_SECURITY_TOKEN_SERVICE_USE_IP, false);
    SecurityUtil.setConfiguration(conf);
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) YarnConfiguration(org.apache.hadoop.yarn.conf.YarnConfiguration) AfterClass(org.junit.AfterClass)

Example 12 with AfterClass

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

the class TestMRCredentials method tearDown.

@AfterClass
public static void tearDown() throws Exception {
    if (mrCluster != null)
        mrCluster.stop();
    mrCluster = null;
    if (dfsCluster != null)
        dfsCluster.shutdown();
    dfsCluster = null;
    new File("keys.json").delete();
}
Also used : File(java.io.File) AfterClass(org.junit.AfterClass)

Example 13 with AfterClass

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

the class TestFilePool method cleanup.

@AfterClass
public static void cleanup() throws IOException {
    final Configuration conf = new Configuration();
    final FileSystem fs = FileSystem.getLocal(conf).getRaw();
    fs.delete(base, true);
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) FileSystem(org.apache.hadoop.fs.FileSystem) AfterClass(org.junit.AfterClass)

Example 14 with AfterClass

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

the class TestJobCounters method cleanup.

@AfterClass
public static void cleanup() throws IOException {
    //clean up the input and output files
    final Configuration conf = new Configuration();
    final FileSystem fs = testdir.getFileSystem(conf);
    if (fs.exists(testdir)) {
        fs.delete(testdir, true);
    }
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) FileSystem(org.apache.hadoop.fs.FileSystem) AfterClass(org.junit.AfterClass)

Example 15 with AfterClass

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

the class TestAccessController3 method tearDownAfterClass.

@AfterClass
public static void tearDownAfterClass() throws Exception {
    HRegionServer rs = null;
    for (JVMClusterUtil.RegionServerThread thread : TEST_UTIL.getMiniHBaseCluster().getRegionServerThreads()) {
        rs = thread.getRegionServer();
    }
    cleanUp();
    TEST_UTIL.shutdownMiniCluster();
    assertTrue("region server should have aborted due to FaultyAccessController", rs.isAborted());
}
Also used : JVMClusterUtil(org.apache.hadoop.hbase.util.JVMClusterUtil) HRegionServer(org.apache.hadoop.hbase.regionserver.HRegionServer) 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