[ 
https://issues.apache.org/jira/browse/HDFS-10723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15408597#comment-15408597
 ] 

Vrushali C commented on HDFS-10723:
-----------------------------------

Hi [~kihwal], 
I wanted to give this jira a try but I can't assign jiras in HDFS to myself. 

Is the fix for this jira a matter of allowing the thread to sleep longer? I 
tried the test on my laptop and it passes.

Patch as follows:

{code}
diff --git 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
index 949fc74..f06383f 100644
--- 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
+++ 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestRenameWhileOpen.java
@@ -188,7 +188,7 @@ public void testWhileOpenRenameParentToNonexistentDir() 
throws IOException {
       // restart cluster with the same namenode port as before.
       // This ensures that leases are persisted in fsimage.
       cluster.shutdown();
-      try {Thread.sleep(2*MAX_IDLE_TIME);} catch (InterruptedException e) {}
+      try {Thread.sleep(8*MAX_IDLE_TIME);} catch (InterruptedException e) {}
       cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport)
                                                 .format(false)
                                                 .build();
@@ -255,7 +255,7 @@ public void testWhileOpenRenameToExistentDirectory() throws 
IOException {
       // restart cluster with the same namenode port as before.
       // This ensures that leases are persisted in fsimage.
       cluster.shutdown();
-      try {Thread.sleep(2*MAX_IDLE_TIME);} catch (InterruptedException e) {}
+      try {Thread.sleep(8*MAX_IDLE_TIME);} catch (InterruptedException e) {}
       cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport)
                                                 .format(false)
                                                 .build();
@@ -319,7 +319,7 @@ public void testWhileOpenRenameToNonExistentDirectory() 
throws IOException {
       // restart cluster with the same namenode port as before.
       // This ensures that leases are persisted in fsimage.
       cluster.shutdown();
-      try {Thread.sleep(2*MAX_IDLE_TIME);} catch (InterruptedException e) {}
+      try {Thread.sleep(8*MAX_IDLE_TIME);} catch (InterruptedException e) {}
       cluster = new MiniDFSCluster.Builder(conf).nameNodePort(nnport)
                                                 .format(false)
                                                 .build();
{code}


> TestRenameWhileOpen tries to restart NN with the same rpc port
> --------------------------------------------------------------
>
>                 Key: HDFS-10723
>                 URL: https://issues.apache.org/jira/browse/HDFS-10723
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: test
>            Reporter: Kihwal Lee
>
> In {{testWhileOpenRenameParentToNonexistentDir}},
> {code}
>       // restart cluster with the same namenode port as before.
>       // This ensures that leases are persisted in fsimage.
>       cluster.shutdown();
> {code}
> And we are getting test failures in precommit builds.
> {noformat}
> java.net.BindException: Problem binding to [localhost:47395]
>  java.net.BindException: Address already in use;
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to