use of org.junit.After in project hadoop by apache.
the class TestJMXGet method tearDown.
/**
* clean up
*/
@After
public void tearDown() throws Exception {
if (cluster != null) {
if (cluster.isClusterUp()) {
cluster.shutdown();
}
File data_dir = new File(cluster.getDataDirectory());
if (data_dir.exists() && !FileUtil.fullyDelete(data_dir)) {
throw new IOException("Could not delete hdfs directory in tearDown '" + data_dir + "'");
}
cluster = null;
}
}
use of org.junit.After in project hadoop by apache.
the class TestRollingFileSystemSinkWithSecureHdfs method stopCluster.
/**
* Stop the mini-DFS cluster.
*/
@After
public void stopCluster() {
if (cluster != null) {
cluster.shutdown();
}
// Restore non-secure conf
UserGroupInformation.setConfiguration(new Configuration());
RollingFileSystemSink.suppliedConf = null;
RollingFileSystemSink.suppliedFilesystem = null;
}
use of org.junit.After in project hadoop by apache.
the class TestRefreshUserMappings method tearDown.
@After
public void tearDown() throws Exception {
if (cluster != null) {
cluster.shutdown();
cluster = null;
}
if (tempResource != null) {
File f = new File(tempResource);
f.delete();
tempResource = null;
}
}
use of org.junit.After in project hadoop by apache.
the class TestViewFsTrash method tearDown.
@After
public void tearDown() throws Exception {
ViewFileSystemTestSetup.tearDown(fileSystemTestHelper, fsTarget);
fsTarget.delete(new Path(fsTarget.getHomeDirectory(), ".Trash/Current"), true);
}
use of org.junit.After in project hadoop by apache.
the class TestDataNodeReconfiguration method tearDown.
@After
public void tearDown() throws Exception {
if (cluster != null) {
cluster.shutdown();
cluster = null;
}
File dir = new File(DATA_DIR);
if (dir.exists())
Assert.assertTrue("Cannot delete data-node dirs", FileUtil.fullyDelete(dir));
}
Aggregations