Merge r:1343944 HDFS-3398. Client will not retry when primaryDN is down once it's just got pipeline. Contributed by Amith D K.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1343948 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4688044c40
commit
48a439ea7e
|
@ -121,6 +121,9 @@ Release 2.0.1-alpha - UNRELEASED
|
|||
HDFS-3452. BKJM:Switch from standby to active fails and NN gets shut down
|
||||
due to delay in clearing of lock. (umamahesh)
|
||||
|
||||
HDFS-3398. Client will not retry when primaryDN is down once it's just got pipeline.
|
||||
(Amith D K via umamahesh)
|
||||
|
||||
Release 2.0.0-alpha - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -507,8 +507,15 @@ public class DFSOutputStream extends FSOutputSummer implements Syncable {
|
|||
}
|
||||
|
||||
// write out data to remote datanode
|
||||
blockStream.write(buf.array(), buf.position(), buf.remaining());
|
||||
blockStream.flush();
|
||||
try {
|
||||
blockStream.write(buf.array(), buf.position(), buf.remaining());
|
||||
blockStream.flush();
|
||||
} catch (IOException e) {
|
||||
// HDFS-3398 treat primary DN is down since client is unable to
|
||||
// write to primary DN
|
||||
errorIndex = 0;
|
||||
throw e;
|
||||
}
|
||||
lastPacket = System.currentTimeMillis();
|
||||
|
||||
if (one.isHeartbeatPacket()) { //heartbeat packet
|
||||
|
|
Loading…
Reference in New Issue