[ https://issues.apache.org/jira/browse/HDFS-17546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17854893#comment-17854893 ]
ASF GitHub Bot commented on HDFS-17546: --------------------------------------- simbadzina commented on code in PR #6873: URL: https://github.com/apache/hadoop/pull/6873#discussion_r1639044953 ########## hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestCombinedHostsFileReader.java: ########## @@ -19,14 +19,23 @@ import java.io.File; import java.io.FileWriter; +import java.io.IOException; +import java.util.concurrent.Callable; import org.apache.hadoop.hdfs.protocol.DatanodeAdminProperties; import org.apache.hadoop.test.GenericTestUtils; import org.junit.Before; +import org.junit.Rule; Review Comment: Unnecessary import. ########## hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestCombinedHostsFileReader.java: ########## @@ -19,14 +19,23 @@ import java.io.File; import java.io.FileWriter; +import java.io.IOException; +import java.util.concurrent.Callable; import org.apache.hadoop.hdfs.protocol.DatanodeAdminProperties; import org.apache.hadoop.test.GenericTestUtils; import org.junit.Before; +import org.junit.Rule; import org.junit.After; import org.junit.Test; +import org.mockito.invocation.InvocationOnMock; +import org.mockito.stubbing.Answer; +import org.junit.rules.ExpectedException; Review Comment: Unnecessary import. ########## hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/util/TestCombinedHostsFileReader.java: ########## @@ -44,8 +53,15 @@ public class TestCombinedHostsFileReader { private final File legacyFile = new File(TESTCACHEDATADIR, "legacy.dfs.hosts.json"); + @Rule + public final ExpectedException exception = ExpectedException.none(); Review Comment: This variable is not used anywhere. > Implementing Timeout for HostFileReader when FS hangs > ----------------------------------------------------- > > Key: HDFS-17546 > URL: https://issues.apache.org/jira/browse/HDFS-17546 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Reporter: Simbarashe Dzinamarira > Assignee: Simbarashe Dzinamarira > Priority: Minor > Labels: pull-request-available > > Certain implementations of Hadoop have the dfs.hosts file residing on NAS/NFS > and potentially with symlinks. If the FS hangs for any reason, the > refreshNodes call would infinitely hang on the HostsFileReader until the FS > returns. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org