From 6ae7b9f800f6d349cfeef50950d4eb72d1c1709f Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Thu, 20 Oct 2016 11:09:20 -0500 Subject: [PATCH] HDFS-10627. Volume Scanner marks a block as "suspect" even if the exception is network-related. Contributed by Rushabh S Shah. Updated CHANGES.txt (cherry picked from commit 5c0bffddc0cb824a8a2751bcd0dc3e15ce081727) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../org/apache/hadoop/hdfs/server/datanode/BlockSender.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index b19863b5a33..b3eaf6a8f9d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -172,6 +172,9 @@ Release 2.7.4 - UNRELEASED HDFS-9444. Add utility to find set of available ephemeral ports to ServerSocketUtil. (Masatake Iwasaki via Brahma Reddy Battula) + HDFS-10627. Volume Scanner marks a block as "suspect" even if + the exception is network-related. (Rushabh S Shah via kihwal) + Release 2.7.3 - 2016-08-25 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java index 80061d32e6f..82fea00658f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockSender.java @@ -613,10 +613,10 @@ class BlockSender implements java.io.Closeable { String ioem = e.getMessage(); if (!ioem.startsWith("Broken pipe") && !ioem.startsWith("Connection reset")) { LOG.error("BlockSender.sendChunks() exception: ", e); - } - datanode.getBlockScanner().markSuspectBlock( + datanode.getBlockScanner().markSuspectBlock( volumeRef.getVolume().getStorageID(), block); + } } throw ioeToSocketException(e); }