This is an automated email from the ASF dual-hosted git repository.
weichiu 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 1524e2e HDFS-12487. FsDatasetSpi.isValidBlock() lacks null pointer
check inside and neither do the callers. Contributed by liumi.
1524e2e is described below
commit 1524e2e6c52aba966cbbf1d8025ba165688ab9bb
Author: Wei-Chiu Chuang <[email protected]>
AuthorDate: Fri Jun 21 18:17:36 2019 -0700
HDFS-12487. FsDatasetSpi.isValidBlock() lacks null pointer check inside and
neither do the callers. Contributed by liumi.
---
.../java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
index 75e5d9a..f8d4ea4 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java
@@ -905,6 +905,11 @@ public class DiskBalancer {
while (!iter.atEnd() && item.getErrorCount() < getMaxError(item)) {
try {
ExtendedBlock block = iter.nextBlock();
+ if(null == block){
+ LOG.info("NextBlock call returned null.No valid block to copy. {}",
+ item.toJson());
+ return block;
+ }
if (block != null) {
// A valid block is a finalized block, we iterate until we get
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]