hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brando...@apache.org
Subject svn commit: r1539740 - /hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READ3Request.java
Date Thu, 07 Nov 2013 18:02:38 GMT
Author: brandonli
Date: Thu Nov  7 18:02:37 2013
New Revision: 1539740

URL: http://svn.apache.org/r1539740
Log:
HDFS-5252. Stable write is not handled correctly in someplace. Contributed by Brandon Li

Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READ3Request.java

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READ3Request.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READ3Request.java?rev=1539740&r1=1539739&r2=1539740&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READ3Request.java
(original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READ3Request.java
Thu Nov  7 18:02:37 2013
@@ -19,8 +19,11 @@ package org.apache.hadoop.nfs.nfs3.reque
 
 import java.io.IOException;
 
+import org.apache.hadoop.nfs.nfs3.FileHandle;
 import org.apache.hadoop.oncrpc.XDR;
 
+import com.google.common.annotations.VisibleForTesting;
+
 /**
  * READ3 Request
  */
@@ -34,6 +37,13 @@ public class READ3Request extends Reques
     count = xdr.readInt();
   }
 
+  @VisibleForTesting
+  public READ3Request(FileHandle handle, long offset, int count) {
+    super(handle);
+    this.offset = offset;
+    this.count = count;
+  }
+  
   public long getOffset() {
     return this.offset;
   }
@@ -41,4 +51,11 @@ public class READ3Request extends Reques
   public int getCount() {
     return this.count;
   }
+  
+  @Override
+  public void serialize(XDR xdr) {
+    handle.serialize(xdr);
+    xdr.writeLongAsHyper(offset);
+    xdr.writeInt(count);
+  }
 }
\ No newline at end of file



Mime
View raw message