You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2019/06/22 01:18:58 UTC
[hadoop] branch trunk updated: HDFS-12487.
FsDatasetSpi.isValidBlock() lacks null pointer check inside and neither do
the callers. Contributed by liumi.
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 <we...@apache.org>
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: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org