You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2023/02/13 14:31:42 UTC
[hadoop] branch trunk updated: HDFS-16904. Close webhdfs during TestSymlinkHdfs teardown (#5372)
This is an automated email from the ASF dual-hosted git repository.
stevel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new f42c89dffb9 HDFS-16904. Close webhdfs during TestSymlinkHdfs teardown (#5372)
f42c89dffb9 is described below
commit f42c89dffb93a02119dbdad0bb253950e8495893
Author: Steve Vaughan <em...@stevevaughan.me>
AuthorDate: Mon Feb 13 09:31:32 2023 -0500
HDFS-16904. Close webhdfs during TestSymlinkHdfs teardown (#5372)
This is a followup to the original patch, 08f58ecf07f, which it supercedes
* Switch to org.apache.hadoop.io.IOUtils and closeStream.
* Use cleanupWithLogger to include error logging
Contributed by Steve Vaughan Jr
---
.../src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java
index 650a75e5698..12930d01acf 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfs.java
@@ -23,7 +23,6 @@ import static org.junit.Assert.fail;
import java.io.IOException;
import java.net.URI;
-import org.apache.commons.io.IOUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.hdfs.DFSConfigKeys;
@@ -37,11 +36,14 @@ import org.apache.hadoop.hdfs.server.namenode.NameNode;
import org.apache.hadoop.hdfs.web.WebHdfsConstants;
import org.apache.hadoop.hdfs.web.WebHdfsFileSystem;
import org.apache.hadoop.hdfs.web.WebHdfsTestUtil;
+import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.ipc.RemoteException;
import org.apache.hadoop.test.GenericTestUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.slf4j.event.Level;
/**
@@ -53,6 +55,9 @@ abstract public class TestSymlinkHdfs extends SymlinkBaseTest {
GenericTestUtils.setLogLevel(NameNode.stateChangeLog, Level.TRACE);
}
+ private static final Logger LOG = LoggerFactory.getLogger(
+ TestSymlinkHdfs.class);
+
protected static MiniDFSCluster cluster;
protected static WebHdfsFileSystem webhdfs;
protected static DistributedFileSystem dfs;
@@ -100,7 +105,7 @@ abstract public class TestSymlinkHdfs extends SymlinkBaseTest {
if (cluster != null) {
cluster.shutdown();
}
- IOUtils.closeQuietly(webhdfs);
+ IOUtils.cleanupWithLogger(LOG, webhdfs);
}
@Test(timeout=10000)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org