From c4df7fb70e544c865d59fe6dd04b0167b7a0fa4b Mon Sep 17 00:00:00 2001 From: Brandon Li Date: Fri, 27 Sep 2013 21:37:47 +0000 Subject: [PATCH] HDFS-5268. Merging change r1527087 from trunk git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1527092 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java | 8 ++++---- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java index a1fd8afdf01..36b57d1e19b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java +++ b/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java @@ -424,7 +424,7 @@ class OpenFileCtx { LOG.warn("Haven't noticed any partial overwrite for a sequential file" + " write requests. Treat it as a real random write, no support."); response = new WRITE3Response(Nfs3Status.NFS3ERR_INVAL, wccData, 0, - WriteStableHow.UNSTABLE, 0); + WriteStableHow.UNSTABLE, Nfs3Constant.WRITE_COMMIT_VERF); } else { if (LOG.isDebugEnabled()) { LOG.debug("Process perfectOverWrite"); @@ -561,7 +561,7 @@ class OpenFileCtx { if (comparator.compare(readbuffer, 0, readCount, data, 0, count) != 0) { LOG.info("Perfect overwrite has different content"); response = new WRITE3Response(Nfs3Status.NFS3ERR_INVAL, wccData, 0, - stableHow, 0); + stableHow, Nfs3Constant.WRITE_COMMIT_VERF); } else { LOG.info("Perfect overwrite has same content," + " updating the mtime, then return success"); @@ -573,12 +573,12 @@ class OpenFileCtx { LOG.info("Got error when processing perfect overwrite, path=" + path + " error:" + e); return new WRITE3Response(Nfs3Status.NFS3ERR_IO, wccData, 0, stableHow, - 0); + Nfs3Constant.WRITE_COMMIT_VERF); } wccData.setPostOpAttr(postOpAttr); response = new WRITE3Response(Nfs3Status.NFS3_OK, wccData, count, - stableHow, 0); + stableHow, Nfs3Constant.WRITE_COMMIT_VERF); } return response; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index a625b7036d7..28171a94a1b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -113,6 +113,8 @@ Release 2.1.2 - UNRELEASED HDFS-5031. BlockScanner scans the block multiple times. (Vinay via Arpit Agarwal) + HDFS-5268. NFS write commit verifier is not set in a few places (brandonli) + Release 2.1.1-beta - 2013-09-23 INCOMPATIBLE CHANGES