Search in sources :

Example 31 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 32 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 33 with AfterClass

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

the class TestMiniMRClientCluster 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);
    }
    // stopping the mini cluster
    mrCluster.stop();
}
Also used : YarnConfiguration(org.apache.hadoop.yarn.conf.YarnConfiguration) Configuration(org.apache.hadoop.conf.Configuration) FileSystem(org.apache.hadoop.fs.FileSystem) AfterClass(org.junit.AfterClass)

Example 34 with AfterClass

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

the class TestAdlSupportedCharsetInPath method testReport.

@AfterClass
public static void testReport() throws IOException, URISyntaxException {
    if (!AdlStorageConfiguration.isContractTestEnabled()) {
        return;
    }
    FileSystem fs = AdlStorageConfiguration.createStorageConnector();
    fs.delete(new Path(TEST_ROOT), true);
}
Also used : Path(org.apache.hadoop.fs.Path) FileSystem(org.apache.hadoop.fs.FileSystem) AfterClass(org.junit.AfterClass)

Example 35 with AfterClass

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

the class TestAHSWebServices method tearDownClass.

@AfterClass
public static void tearDownClass() throws Exception {
    if (historyClientService != null) {
        historyClientService.stop();
    }
    fs.delete(new Path(remoteLogRootDir), true);
    fs.delete(new Path(rootLogDir), true);
}
Also used : Path(org.apache.hadoop.fs.Path) AfterClass(org.junit.AfterClass)

Aggregations

AfterClass (org.junit.AfterClass)231 File (java.io.File)83 DalHints (com.ctrip.platform.dal.dao.DalHints)25 FileSystem (org.apache.hadoop.fs.FileSystem)14 Path (org.apache.hadoop.fs.Path)14 HashMap (java.util.HashMap)12 IOException (java.io.IOException)11 StatementParameters (com.ctrip.platform.dal.dao.StatementParameters)9 ModelNode (org.jboss.dmr.ModelNode)8 Statement (java.sql.Statement)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 RelationManager (edu.uci.ics.texera.storage.RelationManager)4 Method (java.lang.reflect.Method)4 SQLException (java.sql.SQLException)4 LoggerContext (org.apache.logging.log4j.core.LoggerContext)4