HDFS-7916. 'reportBadBlocks' from datanodes to standby Node BPServiceActor goes for infinite loop (Contributed by Vinayakumar B)

This commit is contained in:
Vinayakumar B 2015-04-02 08:12:00 +05:30
parent f383fd9b6c
commit 867d5d2675
2 changed files with 9 additions and 2 deletions

View File

@ -412,6 +412,9 @@ Release 2.8.0 - UNRELEASED
HDFS-7922. ShortCircuitCache#close is not releasing
ScheduledThreadPoolExecutors (Rakesh R via Colin P. McCabe)
HDFS-7916. 'reportBadBlocks' from datanodes to standby Node BPServiceActor
goes for infinite loop (vinayakumarb)
Release 2.7.0 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -26,6 +26,7 @@
import org.apache.hadoop.hdfs.protocol.LocatedBlock;
import org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolClientSideTranslatorPB;
import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration;
import org.apache.hadoop.ipc.StandbyException;
/**
* ReportBadBlockAction is an instruction issued by {{BPOfferService}} to
@ -58,8 +59,11 @@ public void reportTo(DatanodeProtocolClientSideTranslatorPB bpNamenode,
dnArr, uuids, types) };
try {
bpNamenode.reportBadBlocks(locatedBlock);
} catch (IOException e){
bpNamenode.reportBadBlocks(locatedBlock);
} catch (StandbyException e) {
DataNode.LOG.warn("Failed to report bad block " + block
+ " to standby namenode");
} catch (IOException e) {
throw new BPServiceActorActionException("Failed to report bad block "
+ block + " to namenode: ");
}