hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From szets...@apache.org
Subject svn commit: r1499322 - in /hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project: ./ hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java hadoop-hdfs/ hadoop-hdfs/CHANGES.txt
Date Wed, 03 Jul 2013 11:19:22 GMT
Author: szetszwo
Date: Wed Jul  3 11:19:22 2013
New Revision: 1499322

URL: http://svn.apache.org/r1499322
Log:
svn merge -c 1499321 from branch-2 for HDFS-4954. In nfs, OpenFileCtx.getFlushedOffset() should
handle IOException.

Modified:
    hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/   (props changed)
    hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/   (props changed)
    hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
    hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

Propchange: hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/
------------------------------------------------------------------------------
  Merged /hadoop/common/branches/branch-2/hadoop-hdfs-project:r1499321

Propchange: hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/
------------------------------------------------------------------------------
  Merged /hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs:r1499321

Modified: hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java?rev=1499322&r1=1499321&r2=1499322&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
(original)
+++ hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
Wed Jul  3 11:19:22 2013
@@ -178,7 +178,7 @@ class OpenFileCtx {
   }
   
   // Get flushed offset. Note that flushed data may not be persisted.
-  private long getFlushedOffset() {
+  private long getFlushedOffset() throws IOException {
     return fos.getPos();
   }
   
@@ -515,7 +515,13 @@ class OpenFileCtx {
       commitOffset = getNextOffsetUnprotected();
     }
 
-    long flushed = getFlushedOffset();
+    long flushed = 0;
+    try {
+      flushed = getFlushedOffset();
+    } catch (IOException e) {
+      LOG.error("Can't get flushed offset, error:" + e);
+      return COMMIT_ERROR;
+    }
     LOG.info("getFlushedOffset=" + flushed + " commitOffset=" + commitOffset);
     if (flushed < commitOffset) {
       // Keep stream active

Modified: hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1499322&r1=1499321&r2=1499322&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Wed
Jul  3 11:19:22 2013
@@ -412,6 +412,9 @@ Release 2.1.0-beta - 2013-07-02
     HDFS-4943. WebHdfsFileSystem does not work when original file path has
     encoded chars.  (Jerry He via szetszwo)
 
+    HDFS-4954. In nfs, OpenFileCtx.getFlushedOffset() should handle IOException.
+    (Brandon Li via szetszwo)
+
   BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS
 
     HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes.



Mime
View raw message