From c55d639e8f539585cf2f2b29a1875004f92bc2de Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Fri, 23 Oct 2020 09:47:10 -0700 Subject: [PATCH] HDFS-15459. TestBlockTokenWithDFSStriped fails intermittently. Contributed by Ahmed Hussein. (cherry picked from commit e7aa4da0a26988fcf5880311067e62a15e05fc1e) --- .../server/blockmanagement/TestBlockTokenWithDFSStriped.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFSStriped.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFSStriped.java index 0b39456bf8..124db17e6c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFSStriped.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockTokenWithDFSStriped.java @@ -136,7 +136,7 @@ protected boolean isBlockTokenExpired(LocatedBlock lb) throws IOException { LocatedBlock[] internalBlocks = StripedBlockUtil.parseStripedBlockGroup (lsb, cellSize, dataBlocks, parityBlocks); for (LocatedBlock internalBlock : internalBlocks) { - if(super.isBlockTokenExpired(internalBlock)){ + if(internalBlock != null && super.isBlockTokenExpired(internalBlock)) { return true; } }