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/trunk@1343944 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
787c08c05a
commit
47a29c6329
@ -507,8 +507,15 @@ public void run() {
|
||||
}
|
||||
|
||||
// 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
Block a user