This is an automated email from the ASF dual-hosted git repository.

hexiaoqiao pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.4 by this push:
     new 77844e9115c HDFS-17706. TestBlockTokenWithDFSStriped fails due to 
closed streams. (#7275). Contribtued by Felix N.
77844e9115c is described below

commit 77844e9115caafc6419da615d5624879d2f7b8ed
Author: Felix Nguyen <174066851+kokon...@users.noreply.github.com>
AuthorDate: Mon Jan 13 20:44:58 2025 +0800

    HDFS-17706. TestBlockTokenWithDFSStriped fails due to closed streams. 
(#7275). Contribtued by Felix N.
    
    Signed-off-by: He Xiaoqiao <hexiaoq...@apache.org>
    (cherry picked from commit 266dad1617d599f7d247b54d03b4741f85cd6460)
---
 .../hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java      | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java
index 428e252839c..f6243cdebbd 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFS.java
@@ -582,6 +582,9 @@ public class TestBlockTokenWithDFS {
 
     // restart the namenode to allow DFSClient to re-fetch tokens
     cluster.restartNameNode(0);
+    // Reopen closed streams
+    in1 = fs.open(fileToRead);
+    in3 = fs.open(fileToRead);
     // verify blockSeekTo() works again (by transparently re-fetching
     // tokens from namenode)
     in1.seek(0);


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

Reply via email to