HDFS-7916. 'reportBadBlocks' from datanodes to standby Node BPServiceActor goes for infinite loop (Contributed by Vinayakumar B)
(cherry picked from commit 867d5d2675
)
This commit is contained in:
parent
27970b3f46
commit
beb0fd0d60
|
@ -97,6 +97,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-7922. ShortCircuitCache#close is not releasing
|
HDFS-7922. ShortCircuitCache#close is not releasing
|
||||||
ScheduledThreadPoolExecutors (Rakesh R via Colin P. McCabe)
|
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
|
Release 2.7.0 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
|
||||||
import org.apache.hadoop.hdfs.protocol.LocatedBlock;
|
import org.apache.hadoop.hdfs.protocol.LocatedBlock;
|
||||||
import org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolClientSideTranslatorPB;
|
import org.apache.hadoop.hdfs.protocolPB.DatanodeProtocolClientSideTranslatorPB;
|
||||||
import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration;
|
import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration;
|
||||||
|
import org.apache.hadoop.ipc.StandbyException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ReportBadBlockAction is an instruction issued by {{BPOfferService}} to
|
* ReportBadBlockAction is an instruction issued by {{BPOfferService}} to
|
||||||
|
@ -58,8 +59,11 @@ public class ReportBadBlockAction implements BPServiceActorAction {
|
||||||
dnArr, uuids, types) };
|
dnArr, uuids, types) };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
bpNamenode.reportBadBlocks(locatedBlock);
|
bpNamenode.reportBadBlocks(locatedBlock);
|
||||||
} catch (IOException e){
|
} 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 "
|
throw new BPServiceActorActionException("Failed to report bad block "
|
||||||
+ block + " to namenode: ");
|
+ block + " to namenode: ");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue