You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ki...@apache.org on 2015/10/23 23:39:09 UTC
hadoop git commit: HDFS-9290. DFSClient#callAppend() is not backward
compatible for slightly older NameNodes. Contributed by Tony Wu. (cherry
picked from commit b9e0417bdf2b9655dc4256bdb43683eca1ab46be)
Repository: hadoop
Updated Branches:
refs/heads/branch-2 1c468c234 -> d24d0fd98
HDFS-9290. DFSClient#callAppend() is not backward compatible for slightly older NameNodes. Contributed by Tony Wu.
(cherry picked from commit b9e0417bdf2b9655dc4256bdb43683eca1ab46be)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d24d0fd9
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d24d0fd9
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d24d0fd9
Branch: refs/heads/branch-2
Commit: d24d0fd981883dd6489ea292605b5703ba2d0e58
Parents: 1c468c2
Author: Kihwal Lee <ki...@apache.org>
Authored: Fri Oct 23 16:38:47 2015 -0500
Committer: Kihwal Lee <ki...@apache.org>
Committed: Fri Oct 23 16:38:47 2015 -0500
----------------------------------------------------------------------
.../src/main/java/org/apache/hadoop/hdfs/DFSClient.java | 8 +++++++-
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++
2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/d24d0fd9/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
index 8a32197..8a67b18 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
+++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
@@ -1364,8 +1364,14 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory,
try {
LastBlockWithStatus blkWithStatus = namenode.append(src, clientName,
new EnumSetWritable<>(flag, CreateFlag.class));
+ HdfsFileStatus status = blkWithStatus.getFileStatus();
+ if (status == null) {
+ DFSClient.LOG.debug("NameNode is on an older version, request file " +
+ "info with additional RPC call for file: " + src);
+ status = getFileInfo(src);
+ }
return DFSOutputStream.newStreamForAppend(this, src, flag, progress,
- blkWithStatus.getLastBlock(), blkWithStatus.getFileStatus(),
+ blkWithStatus.getLastBlock(), status,
dfsClientConf.createChecksum(null), favoredNodes);
} catch(RemoteException re) {
throw re.unwrapRemoteException(AccessControlException.class,
http://git-wip-us.apache.org/repos/asf/hadoop/blob/d24d0fd9/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index b88e2ee..269c15d 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1357,6 +1357,9 @@ Release 2.7.2 - UNRELEASED
HDFS-9220. Reading small file (< 512 bytes) that is open for append fails
due to incorrect checksum (Jing Zhao via kihwal)
+ HDFS-9290. DFSClient#callAppend() is not backward compatible for slightly
+ older NameNodes. (Tony Wu via kihwal)
+
Release 2.7.1 - 2015-07-06
INCOMPATIBLE CHANGES