hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brando...@apache.org
Subject svn commit: r1493924 [2/3] - in /hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src: main/java/org/apache/hadoop/mount/ main/java/org/apache/hadoop/nfs/ main/java/org/apache/hadoop/nfs/nfs3/ main/java/org/apache/hadoop/nfs/nfs3/request/ main/java...
Date Mon, 17 Jun 2013 20:32:14 GMT
Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READLINK3Request.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READLINK3Request.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READLINK3Request.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/READLINK3Request.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.io.IOException;
+
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * READLINK3 Request
+ */
+public class READLINK3Request extends RequestWithHandle {
+
+  public READLINK3Request(XDR xdr) throws IOException {
+    super(xdr);
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/REMOVE3Request.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/REMOVE3Request.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/REMOVE3Request.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/REMOVE3Request.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.io.IOException;
+
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * REMOVE3 Request
+ */
+public class REMOVE3Request extends RequestWithHandle {
+  private final String name;
+
+  public REMOVE3Request(XDR xdr) throws IOException {
+    super(xdr);
+    name = xdr.readString();
+  }
+
+  public String getName() {
+    return this.name;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RENAME3Request.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RENAME3Request.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RENAME3Request.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RENAME3Request.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.io.IOException;
+
+import org.apache.hadoop.nfs.nfs3.FileHandle;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * RENAME3 Request
+ */
+public class RENAME3Request {
+  private final FileHandle fromDirHandle;
+  private final String fromName;
+  private final FileHandle toDirHandle;
+  private final String toName;
+  
+  public RENAME3Request(XDR xdr) throws IOException {
+    fromDirHandle = new FileHandle();
+    if (!fromDirHandle.deserialize(xdr)) {
+      throw new IOException("can't deserialize file handle");
+    }
+    fromName = xdr.readString();
+    toDirHandle = new FileHandle();
+    if (!toDirHandle.deserialize(xdr)) {
+      throw new IOException("can't deserialize file handle");
+    }
+    toName = xdr.readString();
+  }
+  
+  public FileHandle getFromDirHandle() {
+    return fromDirHandle;
+  }
+
+  public String getFromName() {
+    return fromName;
+  }
+
+  public FileHandle getToDirHandle() {
+    return toDirHandle;
+  }
+
+  public String getToName() {
+    return toName;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RMDIR3Request.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RMDIR3Request.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RMDIR3Request.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RMDIR3Request.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.io.IOException;
+
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * RMDIR3 Request
+ */
+public class RMDIR3Request extends RequestWithHandle {
+  private final String name;
+
+  public RMDIR3Request(XDR xdr) throws IOException {
+    super(xdr);
+    name = xdr.readString();
+  }
+
+  public String getName() {
+    return this.name;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RequestWithHandle.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RequestWithHandle.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RequestWithHandle.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/RequestWithHandle.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,49 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.io.IOException;
+
+import org.apache.hadoop.nfs.nfs3.FileHandle;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * An NFS request that uses {@link FileHandle} to identify a file.
+ */
+public class RequestWithHandle {
+  protected final FileHandle handle;
+  
+  RequestWithHandle(FileHandle handle) {
+    this.handle = handle;
+  }
+  
+  RequestWithHandle(XDR xdr) throws IOException {
+    handle = new FileHandle();
+    if (!handle.deserialize(xdr)) {
+      throw new IOException("can't deserialize file handle");
+    }
+  }
+
+  public FileHandle getHandle() {
+    return this.handle;
+  }
+  
+  public void serialize(XDR xdr) {
+    handle.serialize(xdr);
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SETATTR3Request.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SETATTR3Request.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SETATTR3Request.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SETATTR3Request.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,64 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.io.IOException;
+
+import org.apache.hadoop.nfs.NfsTime;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * SETATTR3 Request
+ */
+public class SETATTR3Request extends RequestWithHandle {
+  private final SetAttr3 attr;
+
+  /* A client may request that the server check that the object is in an
+   * expected state before performing the SETATTR operation. If guard.check is
+   * TRUE, the server must compare the value of ctime to the current ctime of
+   * the object. If the values are different, the server must preserve the
+   * object attributes and must return a status of NFS3ERR_NOT_SYNC. If check is
+   * FALSE, the server will not perform this check.
+   */
+  private final boolean check;
+  private final NfsTime ctime;
+  
+  public SETATTR3Request(XDR xdr) throws IOException {
+    super(xdr);
+    attr = new SetAttr3();
+    attr.deserialize(xdr);
+    check = xdr.readBoolean();
+    if (check) {
+      ctime = NfsTime.deserialize(xdr);
+    } else {
+      ctime = null;
+    }
+  }
+  
+  public SetAttr3 getAttr() {
+    return attr;
+  }
+
+  public boolean isCheck() {
+    return check;
+  }
+
+  public NfsTime getCtime() {
+    return ctime;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SYMLINK3Request.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SYMLINK3Request.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SYMLINK3Request.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SYMLINK3Request.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.io.IOException;
+
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * SYMLINK3 Request
+ */
+public class SYMLINK3Request extends RequestWithHandle {
+  private final String name;
+  private final SetAttr3 symAttr;
+  private final String symData;
+  
+  public SYMLINK3Request(XDR xdr) throws IOException {
+    super(xdr);
+    name = xdr.readString();
+    symAttr = new SetAttr3();
+    symAttr.deserialize(xdr);
+    symData = xdr.readString();
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public SetAttr3 getSymAttr() {
+    return symAttr;
+  }
+
+  public String getSymData() {
+    return symData;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/SetAttr3.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,168 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.util.EnumSet;
+
+import org.apache.hadoop.nfs.NfsTime;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * SetAttr3 contains the file attributes that can be set from the client. The
+ * fields are the same as the similarly named fields in the NFS3Attributes
+ * structure.
+ */
+public class SetAttr3 {
+  // Options for time stamp change
+  public static final int TIME_DONT_CHANGE = 0;
+  public static final int TIME_SET_TO_SERVER_TIME = 1;
+  public static final int TIME_SET_TO_CLIENT_TIME = 2;
+
+  private int mode;
+  private int uid;
+  private int gid;
+  private long size;
+  private NfsTime atime;
+  private NfsTime mtime;
+  private EnumSet<SetAttrField> updateFields;
+
+  public static enum SetAttrField {
+    MODE, UID, GID, SIZE, ATIME, MTIME
+  };
+
+  public SetAttr3() {
+    mode = 0;
+    uid = 0;
+    gid = 0;
+    size = 0;
+    updateFields = EnumSet.noneOf(SetAttrField.class);
+  }
+
+  public int getMode() {
+    return mode;
+  }
+
+  public int getUid() {
+    return uid;
+  }
+
+  public int getGid() {
+    return gid;
+  }
+
+  public void setGid(int gid) {
+    this.gid = gid;  
+  }
+  
+  public long getSize() {
+    return size;
+  }
+
+  public NfsTime getAtime() {
+    return atime;
+  }
+
+  public NfsTime getMtime() {
+    return mtime;
+  }
+
+  public EnumSet<SetAttrField> getUpdateFields() {
+    return updateFields;
+  }
+
+  public void setUpdateFields(EnumSet<SetAttrField> updateFields) {
+    this.updateFields = updateFields;
+  }
+
+  public void serialize(XDR xdr) {
+    if (!updateFields.contains(SetAttrField.MODE)) {
+      xdr.writeBoolean(false);
+    } else {
+      xdr.writeBoolean(true);
+      xdr.writeInt(mode);
+    }
+    if (!updateFields.contains(SetAttrField.UID)) {
+      xdr.writeBoolean(false);
+    } else {
+      xdr.writeBoolean(true);
+      xdr.writeInt(uid);
+    }
+    if (!updateFields.contains(SetAttrField.GID)) {
+      xdr.writeBoolean(false);
+    } else {
+      xdr.writeBoolean(true);
+      xdr.writeInt(gid);
+    }
+    if (!updateFields.contains(SetAttrField.SIZE)) {
+      xdr.writeBoolean(false);
+    } else {
+      xdr.writeBoolean(true);
+      xdr.writeLongAsHyper(size);
+    }
+    if (!updateFields.contains(SetAttrField.ATIME)) {
+      xdr.writeBoolean(false);
+    } else {
+      xdr.writeBoolean(true);
+      atime.serialize(xdr);
+    }
+    if (!updateFields.contains(SetAttrField.MTIME)) {
+      xdr.writeBoolean(false);
+    } else {
+      xdr.writeBoolean(true);
+      mtime.serialize(xdr);
+    }
+  }
+  
+  public void deserialize(XDR xdr) {
+    if (xdr.readBoolean()) {
+      mode = xdr.readInt();
+      updateFields.add(SetAttrField.MODE);
+    }
+    if (xdr.readBoolean()) {
+      uid = xdr.readInt();
+      updateFields.add(SetAttrField.UID);
+    }
+    if (xdr.readBoolean()) {
+      gid = xdr.readInt();
+      updateFields.add(SetAttrField.GID);
+
+    }
+    if (xdr.readBoolean()) {
+      size = xdr.readHyper();
+      updateFields.add(SetAttrField.SIZE);
+
+    }
+    int timeSetHow = xdr.readInt();
+    if (timeSetHow == TIME_SET_TO_CLIENT_TIME) {
+      atime = NfsTime.deserialize(xdr);
+      updateFields.add(SetAttrField.ATIME);
+    } else if (timeSetHow == TIME_SET_TO_SERVER_TIME) {
+      atime = new NfsTime(System.currentTimeMillis());
+      updateFields.add(SetAttrField.ATIME);
+    }
+
+    timeSetHow = xdr.readInt();
+    if (timeSetHow == TIME_SET_TO_CLIENT_TIME) {
+      mtime = NfsTime.deserialize(xdr);
+      updateFields.add(SetAttrField.MTIME);
+    } else if (timeSetHow == TIME_SET_TO_SERVER_TIME) {
+      mtime = new NfsTime(System.currentTimeMillis());
+      updateFields.add(SetAttrField.MTIME);
+    }
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/WRITE3Request.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/WRITE3Request.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/WRITE3Request.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/WRITE3Request.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.request;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+import org.apache.hadoop.nfs.nfs3.FileHandle;
+import org.apache.hadoop.nfs.nfs3.Nfs3Constant.WriteStableHow;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * WRITE3 Request
+ */
+public class WRITE3Request extends RequestWithHandle {
+  private final long offset;
+  private final int count;
+  private final WriteStableHow stableHow;
+  private final ByteBuffer data;
+
+  public WRITE3Request(XDR xdr) throws IOException {
+    super(xdr);
+    offset = xdr.readHyper();
+    count = xdr.readInt();
+    stableHow = WriteStableHow.fromValue(xdr.readInt());
+    data = ByteBuffer.wrap(xdr.readFixedOpaque(xdr.readInt()));
+  }
+
+  public WRITE3Request(FileHandle handle, final long offset, final int count,
+      final WriteStableHow stableHow, final ByteBuffer data) {
+    super(handle);
+    this.offset = offset;
+    this.count = count;
+    this.stableHow = stableHow;
+    this.data = data;
+  }
+
+  public long getOffset() {
+    return this.offset;
+  }
+
+  public int getCount() {
+    return this.count;
+  }
+
+  public WriteStableHow getStableHow() {
+    return this.stableHow;
+  }
+
+  public ByteBuffer getData() {
+    return this.data;
+  }
+
+  @Override
+  public void serialize(XDR xdr) {
+    handle.serialize(xdr);
+    xdr.writeLongAsHyper(offset);
+    xdr.writeInt(count);
+    xdr.writeInt(stableHow.getValue());
+    xdr.writeInt(count);
+    xdr.writeFixedOpaque(data.array(), count);
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/ACCESS3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/ACCESS3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/ACCESS3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/ACCESS3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * ACCESS3 Response 
+ */
+public class ACCESS3Response extends NFS3Response {
+  /*
+   * A bit mask of access permissions indicating access rights for the
+   * authentication credentials provided with the request.
+   */
+  private final int access;
+  private final Nfs3FileAttributes postOpAttr;
+  
+  public ACCESS3Response(int status) {
+    this(status, new Nfs3FileAttributes(), 0);
+  }
+  
+  public ACCESS3Response(int status, Nfs3FileAttributes postOpAttr, int access) {
+    super(status);
+    this.postOpAttr = postOpAttr;
+    this.access = access;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    out.writeBoolean(true);
+    postOpAttr.serialize(out);
+    if (this.getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeInt(access);
+    }
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/COMMIT3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/COMMIT3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/COMMIT3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/COMMIT3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,58 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3Constant;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * COMMIT3 Response
+ */
+public class COMMIT3Response extends NFS3Response {
+  private final WccData fileWcc;
+  private final long verf;
+
+  public COMMIT3Response(int status) {
+    this(status, new WccData(null, null), Nfs3Constant.WRITE_COMMIT_VERF);
+  }
+
+  public COMMIT3Response(int status, WccData fileWcc, long verf) {
+    super(status);
+    this.fileWcc = fileWcc;
+    this.verf = verf;
+  }
+  
+  public WccData getFileWcc() {
+    return fileWcc;
+  }
+
+  public long getVerf() {
+    return verf;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    fileWcc.serialize(out);
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeLongAsHyper(verf);
+    }
+    return out;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/CREATE3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/CREATE3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/CREATE3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/CREATE3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,73 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.FileHandle;
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * CREATE3 Response
+ */
+public class CREATE3Response extends NFS3Response {
+  private final FileHandle objHandle;
+  private final Nfs3FileAttributes postOpObjAttr;
+  private WccData dirWcc;
+
+  public CREATE3Response(int status) {
+    this(status, null, null, null);
+  }
+
+  public CREATE3Response(int status, FileHandle handle,
+      Nfs3FileAttributes postOpObjAttr, WccData dirWcc) {
+    super(status);
+    this.objHandle = handle;
+    this.postOpObjAttr = postOpObjAttr;
+    this.dirWcc = dirWcc;
+  }
+
+  public FileHandle getObjHandle() {
+    return objHandle;
+  }
+
+  public Nfs3FileAttributes getPostOpObjAttr() {
+    return postOpObjAttr;
+  }
+
+  public WccData getDirWcc() {
+    return dirWcc;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeBoolean(true); // Handle follows
+      objHandle.serialize(out);
+      out.writeBoolean(true); // Attributes follow
+      postOpObjAttr.serialize(out);
+    }
+    if (dirWcc == null) {
+      dirWcc = new WccData(null, null);
+    }
+    dirWcc.serialize(out);
+
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/FSINFO3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/FSINFO3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/FSINFO3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/FSINFO3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,131 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.NfsTime;
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * FSINFO3 Response
+ */
+public class FSINFO3Response extends NFS3Response {
+  private final Nfs3FileAttributes postOpAttr;
+  /*
+   * The maximum size in bytes of a READ request supported by the server. Any
+   * READ with a number greater than rtmax will result in a short read of rtmax
+   * bytes or less.
+   */
+  private final int rtmax;
+  /*
+   * The preferred size of a READ request. This should be the same as rtmax
+   * unless there is a clear benefit in performance or efficiency.
+   */
+  private final int rtpref;
+  /* The suggested multiple for the size of a READ request. */
+  private final int rtmult;
+  /*
+   * The maximum size of a WRITE request supported by the server. In general,
+   * the client is limited by wtmax since there is no guarantee that a server
+   * can handle a larger write. Any WRITE with a count greater than wtmax will
+   * result in a short write of at most wtmax bytes.
+   */
+  private final int wtmax;
+  /*
+   * The preferred size of a WRITE request. This should be the same as wtmax
+   * unless there is a clear benefit in performance or efficiency.
+   */
+  private final int wtpref;
+  /*
+   * The suggested multiple for the size of a WRITE request.
+   */
+  private final int wtmult;
+  /* The preferred size of a READDIR request. */
+  private final int dtpref;
+  /* The maximum size of a file on the file system. */
+  private final long maxFileSize;
+  /*
+   * The server time granularity. When setting a file time using SETATTR, the
+   * server guarantees only to preserve times to this accuracy. If this is {0,
+   * 1}, the server can support nanosecond times, {0, 1000000} denotes
+   * millisecond precision, and {1, 0} indicates that times are accurate only to
+   * the nearest second.
+   */
+  private final NfsTime timeDelta;
+  /*
+   * A bit mask of file system properties. The following values are defined:
+   * 
+   * FSF_LINK If this bit is 1 (TRUE), the file system supports hard links.
+   * 
+   * FSF_SYMLINK If this bit is 1 (TRUE), the file system supports symbolic
+   * links.
+   * 
+   * FSF_HOMOGENEOUS If this bit is 1 (TRUE), the information returned by
+   * PATHCONF is identical for every file and directory in the file system. If
+   * it is 0 (FALSE), the client should retrieve PATHCONF information for each
+   * file and directory as required.
+   * 
+   * FSF_CANSETTIME If this bit is 1 (TRUE), the server will set the times for a
+   * file via SETATTR if requested (to the accuracy indicated by time_delta). If
+   * it is 0 (FALSE), the server cannot set times as requested.
+   */
+  private final int properties;
+
+  public FSINFO3Response(int status) {
+    this(status, new Nfs3FileAttributes(), 0, 0, 0, 0, 0, 0, 0, 0, null, 0);
+  }
+
+  public FSINFO3Response(int status, Nfs3FileAttributes postOpAttr, int rtmax,
+      int rtpref, int rtmult, int wtmax, int wtpref, int wtmult, int dtpref,
+      long maxFileSize, NfsTime timeDelta, int properties) {
+    super(status);
+    this.postOpAttr = postOpAttr;
+    this.rtmax = rtmax;
+    this.rtpref = rtpref;
+    this.rtmult = rtmult;
+    this.wtmax = wtmax;
+    this.wtpref = wtpref;
+    this.wtmult = wtmult;
+    this.dtpref = dtpref;
+    this.maxFileSize = maxFileSize;
+    this.timeDelta = timeDelta;
+    this.properties = properties;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    out.writeBoolean(true);
+    postOpAttr.serialize(out);
+
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeInt(rtmax);
+      out.writeInt(rtpref);
+      out.writeInt(rtmult);
+      out.writeInt(wtmax);
+      out.writeInt(wtpref);
+      out.writeInt(wtmult);
+      out.writeInt(dtpref);
+      out.writeLongAsHyper(maxFileSize);
+      timeDelta.serialize(out);
+      out.writeInt(properties);
+   }
+    return out;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/FSSTAT3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/FSSTAT3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/FSSTAT3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/FSSTAT3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,113 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * FSSTAT3 Response
+ */
+public class FSSTAT3Response extends NFS3Response {
+  private Nfs3FileAttributes postOpAttr;
+
+  // The total size, in bytes, of the file system.
+  private final long tbytes;
+
+  // The amount of free space, in bytes, in the file system.
+  private final long fbytes;
+
+  /*
+   * The amount of free space, in bytes, available to the user identified by the
+   * authentication information in the RPC. (This reflects space that is
+   * reserved by the file system; it does not reflect any quota system
+   * implemented by the server.)
+   */
+  private final long abytes;
+
+  /*
+   * The total number of file slots in the file system. (On a UNIX server, this
+   * often corresponds to the number of inodes configured.)
+   */
+  private final long tfiles;
+
+  /* The number of free file slots in the file system. */
+  private final long ffiles;
+
+  /*
+   * The number of free file slots that are available to the user corresponding
+   * to the authentication information in the RPC. (This reflects slots that are
+   * reserved by the file system; it does not reflect any quota system
+   * implemented by the server.)
+   */
+  private final long afiles;
+
+  /*
+   * A measure of file system volatility: this is the number of seconds for
+   * which the file system is not expected to change. For a volatile, frequently
+   * updated file system, this will be 0. For an immutable file system, such as
+   * a CD-ROM, this would be the largest unsigned integer. For file systems that
+   * are infrequently modified, for example, one containing local executable
+   * programs and on-line documentation, a value corresponding to a few hours or
+   * days might be used. The client may use this as a hint in tuning its cache
+   * management. Note however, this measure is assumed to be dynamic and may
+   * change at any time.
+   */
+  private final int invarsec;
+
+  public FSSTAT3Response(int status) {
+    this(status, null, 0, 0, 0, 0, 0, 0, 0);
+  }
+
+  public FSSTAT3Response(int status, Nfs3FileAttributes postOpAttr,
+      long tbytes, long fbytes, long abytes, long tfiles, long ffiles,
+      long afiles, int invarsec) {
+    super(status);
+    this.postOpAttr = postOpAttr;
+    this.tbytes = tbytes;
+    this.fbytes = fbytes;
+    this.abytes = abytes;
+    this.tfiles = tfiles;
+    this.ffiles = ffiles;
+    this.afiles = afiles;
+    this.invarsec = invarsec;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    out.writeBoolean(true);
+    if (postOpAttr == null) {
+      postOpAttr = new Nfs3FileAttributes();
+    }
+    postOpAttr.serialize(out);
+
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeLongAsHyper(tbytes);
+      out.writeLongAsHyper(fbytes);
+      out.writeLongAsHyper(abytes);
+      out.writeLongAsHyper(tfiles);
+      out.writeLongAsHyper(ffiles);
+      out.writeLongAsHyper(afiles);
+      out.writeInt(invarsec);
+    }
+    return out;
+
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/GETATTR3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/GETATTR3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/GETATTR3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/GETATTR3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * GETATTR3 Response
+ */
+public class GETATTR3Response extends NFS3Response {
+  private Nfs3FileAttributes postOpAttr;
+  public GETATTR3Response(int status) {
+    this(status, new Nfs3FileAttributes());
+  }
+  
+  public GETATTR3Response(int status, Nfs3FileAttributes attrs) {
+    super(status);
+    this.postOpAttr = attrs;
+  }
+  
+  public void setPostOpAttr(Nfs3FileAttributes postOpAttr) {
+    this.postOpAttr = postOpAttr;
+  }
+  
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      postOpAttr.serialize(out);
+    }
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/LOOKUP3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/LOOKUP3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/LOOKUP3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/LOOKUP3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import java.io.IOException;
+
+import org.apache.hadoop.nfs.nfs3.FileHandle;
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * LOOKUP3 Response
+ */
+public class LOOKUP3Response extends NFS3Response {
+  private final FileHandle fileHandle;
+  private final Nfs3FileAttributes postOpObjAttr; // Can be null
+  private final Nfs3FileAttributes postOpDirAttr; // Can be null
+
+  public LOOKUP3Response(int status) {
+    this(status, null, new Nfs3FileAttributes(), new Nfs3FileAttributes());
+  }
+
+  public LOOKUP3Response(int status, FileHandle fileHandle,
+      Nfs3FileAttributes postOpObjAttr, Nfs3FileAttributes postOpDirAttributes) {
+    super(status);
+    this.fileHandle = fileHandle;
+    this.postOpObjAttr = postOpObjAttr;
+    this.postOpDirAttr = postOpDirAttributes;
+  }
+
+  public LOOKUP3Response(XDR xdr) throws IOException {
+    super(-1);
+    fileHandle = new FileHandle();
+    status = xdr.readInt();
+    Nfs3FileAttributes objAttr = null;
+    if (status == Nfs3Status.NFS3_OK) {
+      if (!fileHandle.deserialize(xdr)) {
+        throw new IOException("can't deserialize file handle");
+      }
+      objAttr = xdr.readBoolean() ? Nfs3FileAttributes.deserialize(xdr) : null;
+    }
+    postOpObjAttr = objAttr;
+    postOpDirAttr = xdr.readBoolean() ? Nfs3FileAttributes.deserialize(xdr)
+        : null;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    if (this.status == Nfs3Status.NFS3_OK) {
+      fileHandle.serialize(out);
+      out.writeBoolean(true); // Attribute follows
+      postOpObjAttr.serialize(out);
+    }
+
+    out.writeBoolean(true); // Attribute follows
+    postOpDirAttr.serialize(out);
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/MKDIR3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/MKDIR3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/MKDIR3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/MKDIR3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,69 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.FileHandle;
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * MKDIR3 Response
+ */
+public class MKDIR3Response extends NFS3Response {
+  private final FileHandle objFileHandle;
+  private final Nfs3FileAttributes objAttr;
+  private final WccData dirWcc;
+  
+  public MKDIR3Response(int status) {
+    this(status, null, null, new WccData(null, null));
+  }
+  
+  public MKDIR3Response(int status, FileHandle handle, Nfs3FileAttributes attr,
+      WccData dirWcc) {
+    super(status);
+    this.objFileHandle = handle;
+    this.objAttr = attr;
+    this.dirWcc = dirWcc;
+  }
+  
+  public FileHandle getObjFileHandle() {
+    return objFileHandle;
+  }
+
+  public Nfs3FileAttributes getObjAttr() {
+    return objAttr;
+  }
+
+  public WccData getDirWcc() {
+    return dirWcc;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeBoolean(true); // Handle follows
+      objFileHandle.serialize(out);
+      out.writeBoolean(true); // Attributes follow
+      objAttr.serialize(out);
+    }
+    dirWcc.serialize(out);
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.oncrpc.RpcAcceptedReply;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * Abstract class for a NFSv3 response
+ */
+abstract public class NFS3Response {
+  protected int status;
+
+  public NFS3Response(int status) {
+    this.status = status;
+  }
+
+  public int getStatus() {
+    return this.status;
+  }
+
+  public void setStatus(int status) {
+    this.status = status;
+  }
+  
+  public XDR send(XDR out, int xid) {
+    RpcAcceptedReply.voidReply(out, xid);
+    out.writeInt(this.getStatus());
+    return out;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/PATHCONF3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/PATHCONF3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/PATHCONF3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/PATHCONF3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,95 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * PATHCONF3 Response
+ */
+public class PATHCONF3Response extends NFS3Response {
+  private final Nfs3FileAttributes postOpAttr;
+
+  /* The maximum number of hard links to an object. */
+  private final int linkMax;
+
+  /* The maximum length of a component of a filename. */
+  private final int nameMax;
+
+  /*
+   * If TRUE, the server will reject any request that includes a name longer
+   * than name_max with the error, NFS3ERR_NAMETOOLONG. If FALSE, any length
+   * name over name_max bytes will be silently truncated to name_max bytes.
+   */
+  private final boolean noTrunc;
+
+  /*
+   * If TRUE, the server will reject any request to change either the owner or
+   * the group associated with a file if the caller is not the privileged user.
+   * (Uid 0.)
+   */
+  private final boolean chownRestricted;
+
+  /*
+   * If TRUE, the server file system does not distinguish case when interpreting
+   * filenames.
+   */
+  private final boolean caseInsensitive;
+
+  /*
+   * If TRUE, the server file system will preserve the case of a name during a
+   * CREATE, MKDIR, MKNOD, SYMLINK, RENAME, or LINK operation.
+   */
+  private final boolean casePreserving;
+
+  public PATHCONF3Response(int status) {
+    this(status, new Nfs3FileAttributes(), 0, 0, false, false, false, false);
+  }
+
+  public PATHCONF3Response(int status, Nfs3FileAttributes postOpAttr,
+      int linkMax, int nameMax, boolean noTrunc, boolean chownRestricted,
+      boolean caseInsensitive, boolean casePreserving) {
+    super(status);
+    this.postOpAttr = postOpAttr;
+    this.linkMax = linkMax;
+    this.nameMax = nameMax;
+    this.noTrunc = noTrunc;
+    this.chownRestricted = chownRestricted;
+    this.caseInsensitive = caseInsensitive;
+    this.casePreserving = casePreserving;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    out.writeBoolean(true);
+    postOpAttr.serialize(out);
+
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeInt(linkMax);
+      out.writeInt(nameMax);
+      out.writeBoolean(noTrunc);
+      out.writeBoolean(chownRestricted);
+      out.writeBoolean(caseInsensitive);
+      out.writeBoolean(casePreserving);
+    }
+    return out;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READ3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READ3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READ3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READ3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import java.nio.ByteBuffer;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * READ3 Response
+ */
+public class READ3Response extends NFS3Response {
+  private final Nfs3FileAttributes postOpAttr;
+  private final int count; // The real bytes of read data
+  private final boolean eof;
+  private final ByteBuffer data;
+
+  public READ3Response(int status) {
+    this(status, new Nfs3FileAttributes(), 0, false, null);
+  }
+  
+  public READ3Response(int status, Nfs3FileAttributes postOpAttr, int count,
+      boolean eof, ByteBuffer data) {
+    super(status);
+    this.postOpAttr = postOpAttr;
+    this.count = count;
+    this.eof = eof;
+    this.data = data;
+  }
+
+  public Nfs3FileAttributes getPostOpAttr() {
+    return postOpAttr;
+  }
+
+  public int getCount() {
+    return count;
+  }
+
+  public boolean isEof() {
+    return eof;
+  }
+
+  public ByteBuffer getData() {
+    return data;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    out.writeBoolean(true); // Attribute follows
+    postOpAttr.serialize(out);
+
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeInt(count);
+      out.writeBoolean(eof);
+      out.writeInt(count);
+      out.writeFixedOpaque(data.array(), count);
+    }
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+import com.google.common.collect.ObjectArrays;
+
+/**
+ * READDIR3 Response
+ */
+public class READDIR3Response extends NFS3Response {
+  private final Nfs3FileAttributes postOpDirAttr;
+  private final long cookieVerf;
+  private final DirList3 dirList;
+
+  public static class Entry3 {
+    private final long fileId;
+    private final String name;
+    private final long cookie;
+    
+    public Entry3(long fileId, String name, long cookie) {
+      this.fileId = fileId;
+      this.name = name;
+      this.cookie = cookie;
+    }
+
+    long getFileId() {
+      return fileId;
+    }
+
+    String getName() {
+      return name;
+    }
+
+    long getCookie() {
+      return cookie;
+    }
+  }
+
+  public static class DirList3 {
+    final Entry3 entries[];
+    final boolean eof;
+    
+    public DirList3(Entry3[] entries, boolean eof) {
+      this.entries = ObjectArrays.newArray(entries, entries.length);
+      this.eof = eof;
+    }
+  }
+
+  public READDIR3Response(int status) {
+    this(status, new Nfs3FileAttributes());
+  }
+
+  public READDIR3Response(int status, Nfs3FileAttributes postOpAttr) {
+    this(status, postOpAttr, 0, null); 
+  }
+
+  public READDIR3Response(int status, Nfs3FileAttributes postOpAttr,
+      final long cookieVerf, final DirList3 dirList) {
+    super(status);
+    this.postOpDirAttr = postOpAttr;
+    this.cookieVerf = cookieVerf;
+    this.dirList = dirList;
+  }
+
+  public Nfs3FileAttributes getPostOpAttr() {
+    return postOpDirAttr;
+  }
+
+  public long getCookieVerf() {
+    return cookieVerf;
+  }
+
+  public DirList3 getDirList() {
+    return dirList;
+  }
+
+  @Override
+  public XDR send(XDR xdr, int xid) {
+    super.send(xdr, xid);
+    xdr.writeBoolean(true); // Attributes follow
+    postOpDirAttr.serialize(xdr);
+
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      xdr.writeLongAsHyper(cookieVerf);
+      Entry3[] f = dirList.entries;
+      for (int i = 0; i < f.length; i++) {
+        xdr.writeBoolean(true); // Value follows
+        xdr.writeLongAsHyper(f[i].getFileId());
+        xdr.writeString(f[i].getName());
+        xdr.writeLongAsHyper(f[i].getCookie());
+      }
+
+      xdr.writeBoolean(false);
+      xdr.writeBoolean(dirList.eof);
+    }
+    return xdr;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,114 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.FileHandle;
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+import com.google.common.collect.ObjectArrays;
+
+/**
+ * READDIRPLUS3 Response
+ */
+public class READDIRPLUS3Response  extends NFS3Response {
+  private Nfs3FileAttributes postOpDirAttr;
+  private final long cookieVerf;
+  private final DirListPlus3 dirListPlus;
+
+  public static class EntryPlus3 {
+    private final long fileId;
+    private final String name;
+    private final long cookie;
+    private final Nfs3FileAttributes nameAttr;
+    private final FileHandle objFileHandle;
+
+    public EntryPlus3(long fileId, String name, long cookie,
+        Nfs3FileAttributes nameAttr, FileHandle objFileHandle) {
+      this.fileId = fileId;
+      this.name = name;
+      this.cookie = cookie;
+      this.nameAttr = nameAttr;
+      this.objFileHandle = objFileHandle;
+    }
+
+    void seralize(XDR xdr) {
+      xdr.writeLongAsHyper(fileId);
+      xdr.writeString(name);
+      xdr.writeLongAsHyper(cookie);
+      xdr.writeBoolean(true);
+      nameAttr.serialize(xdr);
+      xdr.writeBoolean(true);
+      objFileHandle.serialize(xdr);
+    }
+  }
+
+  public static class DirListPlus3 {
+    EntryPlus3 entries[];
+    boolean eof;
+    
+    public DirListPlus3(EntryPlus3[] entries, boolean eof) {
+      this.entries = ObjectArrays.newArray(entries, entries.length);
+      this.eof = eof;
+    }
+
+    EntryPlus3[] getEntries() {
+      return entries;
+    }
+    
+    boolean getEof() {
+      return eof;
+    }
+  }
+
+  public READDIRPLUS3Response(int status) {
+    this(status, null, 0, null);
+  }
+
+  public READDIRPLUS3Response(int status, Nfs3FileAttributes postOpDirAttr,
+      final long cookieVerf, final DirListPlus3 dirListPlus) {
+    super(status);
+    this.postOpDirAttr = postOpDirAttr;
+    this.cookieVerf = cookieVerf;
+    this.dirListPlus = dirListPlus;
+  }
+  
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    out.writeBoolean(true); // attributes follow
+    if (postOpDirAttr == null) {
+      postOpDirAttr = new Nfs3FileAttributes();
+    }
+    postOpDirAttr.serialize(out);
+    
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeLongAsHyper(cookieVerf);
+      EntryPlus3[] f = dirListPlus.getEntries();
+      for (int i = 0; i < f.length; i++) {
+        out.writeBoolean(true); // next
+        f[i].seralize(out);
+      }
+
+      out.writeBoolean(false);
+      out.writeBoolean(dirListPlus.getEof());
+    }
+    return out;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READLINK3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READLINK3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READLINK3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READLINK3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * READLINK3 Response
+ */
+public class READLINK3Response extends NFS3Response {
+  private final Nfs3FileAttributes postOpSymlinkAttr;
+  private final byte path[];
+
+  public READLINK3Response(int status) {
+    this(status, new Nfs3FileAttributes(), new byte[0]);
+  }
+
+  public READLINK3Response(int status, Nfs3FileAttributes postOpAttr,
+      byte path[]) {
+    super(status);
+    this.postOpSymlinkAttr = postOpAttr;
+    this.path = new byte[path.length];
+    System.arraycopy(path, 0, this.path, 0, path.length);
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    out.writeBoolean(true); // Attribute follows
+    postOpSymlinkAttr.serialize(out);
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeFixedOpaque(path, path.length);
+    }
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/REMOVE3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/REMOVE3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/REMOVE3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/REMOVE3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * REMOVE3 Response
+ */
+public class REMOVE3Response extends NFS3Response {
+  private WccData dirWcc;
+
+  public REMOVE3Response(int status) {
+    this(status, null);
+  }
+
+  public REMOVE3Response(int status, WccData dirWcc) {
+    super(status);
+    this.dirWcc = dirWcc;
+  }
+  
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    if (dirWcc == null) {
+      dirWcc = new WccData(null, null);
+    }
+    dirWcc.serialize(out);
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/RENAME3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/RENAME3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/RENAME3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/RENAME3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * RENAME3 Response
+ */
+public class RENAME3Response extends NFS3Response {
+  private final WccData fromDirWcc;
+  private final WccData toDirWcc;
+
+  public RENAME3Response(int status) {
+    this(status, new WccData(null, null), new WccData(null, null));
+  }
+  
+  public RENAME3Response(int status, WccData fromWccData, WccData toWccData) {
+    super(status);
+    this.fromDirWcc = fromWccData;
+    this.toDirWcc = toWccData;
+  }
+
+  public WccData getFromDirWcc() {
+    return fromDirWcc;
+  }
+
+  public WccData getToDirWcc() {
+    return toDirWcc;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    fromDirWcc.serialize(out);
+    toDirWcc.serialize(out);
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/RMDIR3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/RMDIR3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/RMDIR3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/RMDIR3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * RMDIR3 Response
+ */
+public class RMDIR3Response extends NFS3Response {
+  private final WccData dirWcc;
+
+  public RMDIR3Response(int status) {
+    this(status, new WccData(null, null));
+  }
+
+  public RMDIR3Response(int status, WccData wccData) {
+    super(status);
+    this.dirWcc = wccData;
+  }
+  
+  public WccData getDirWcc() {
+    return dirWcc;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    dirWcc.serialize(out);
+    return out;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/SETATTR3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/SETATTR3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/SETATTR3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/SETATTR3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * SETATTR3 Response
+ */
+public class SETATTR3Response extends NFS3Response {
+  private final WccData wccData;
+
+  public SETATTR3Response(int status) {
+    this(status, new WccData(null, null));
+  }
+  
+  public SETATTR3Response(int status, WccData wccData) {
+    super(status);
+    this.wccData = wccData;
+  }
+
+  public WccData getWccData() {
+    return wccData;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    wccData.serialize(out);
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/SYMLINK3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/SYMLINK3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/SYMLINK3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/SYMLINK3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,70 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.FileHandle;
+import org.apache.hadoop.nfs.nfs3.Nfs3FileAttributes;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * SYMLINK3 Response
+ */
+public class SYMLINK3Response extends NFS3Response {
+  private final FileHandle objFileHandle;
+  private final Nfs3FileAttributes objPostOpAttr;
+  private final WccData dirWcc;
+  
+  public SYMLINK3Response(int status) {
+    this(status, null, null, new WccData(null, null));
+  }
+  
+  public SYMLINK3Response(int status, FileHandle handle,
+      Nfs3FileAttributes attrs, WccData dirWcc) {
+    super(status);
+    this.objFileHandle = handle;
+    this.objPostOpAttr = attrs;
+    this.dirWcc = dirWcc;
+  }
+  
+  public FileHandle getObjFileHandle() {
+    return objFileHandle;
+  }
+
+  public Nfs3FileAttributes getObjPostOpAttr() {
+    return objPostOpAttr;
+  }
+
+  public WccData getDirWcc() {
+    return dirWcc;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    if (this.getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeBoolean(true);
+      objFileHandle.serialize(out);
+      objPostOpAttr.serialize(out);
+    }
+    out.writeBoolean(true);
+    dirWcc.serialize(out);
+    
+    return out;
+  }
+}
\ No newline at end of file

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/VoidResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/VoidResponse.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/VoidResponse.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/VoidResponse.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.oncrpc.RpcAcceptedReply;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * A void NFSv3 response
+ */
+public class VoidResponse extends NFS3Response {
+
+  public VoidResponse(int status) {
+    super(status);
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    RpcAcceptedReply.voidReply(out, xid);
+    return out;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/WRITE3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/WRITE3Response.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/WRITE3Response.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/WRITE3Response.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,71 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.nfs3.Nfs3Constant;
+import org.apache.hadoop.nfs.nfs3.Nfs3Status;
+import org.apache.hadoop.nfs.nfs3.Nfs3Constant.WriteStableHow;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * WRITE3 Response
+ */
+public class WRITE3Response extends NFS3Response {
+  private final WccData fileWcc; // return on both success and failure
+  private final int count;
+  private final WriteStableHow stableHow;
+  private final long verifer;
+
+  public WRITE3Response(int status) {
+    this(status, new WccData(null, null), 0, WriteStableHow.UNSTABLE,
+        Nfs3Constant.WRITE_COMMIT_VERF);
+  }
+  
+  public WRITE3Response(int status, WccData fileWcc, int count,
+      WriteStableHow stableHow, long verifier) {
+    super(status);
+    this.fileWcc = fileWcc;
+    this.count = count;
+    this.stableHow = stableHow;
+    this.verifer = verifier;
+  }
+
+  public int getCount() {
+    return count;
+  }
+
+  public WriteStableHow getStableHow() {
+    return stableHow;
+  }
+
+  public long getVerifer() {
+    return verifer;
+  }
+
+  @Override
+  public XDR send(XDR out, int xid) {
+    super.send(out, xid);
+    fileWcc.serialize(out);
+    if (getStatus() == Nfs3Status.NFS3_OK) {
+      out.writeInt(count);
+      out.writeInt(stableHow.getValue());
+      out.writeLongAsHyper(verifer);
+    }
+    return out;
+  }
+}

Added: hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/WccAttr.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/WccAttr.java?rev=1493924&view=auto
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/WccAttr.java (added)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/WccAttr.java Mon Jun 17 20:32:13 2013
@@ -0,0 +1,66 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.nfs.nfs3.response;
+
+import org.apache.hadoop.nfs.NfsTime;
+import org.apache.hadoop.oncrpc.XDR;
+
+/**
+ * WccAttr saves attributes used for weak cache consistency
+ */
+public class WccAttr {
+  long size;
+  NfsTime mtime; // in milliseconds
+  NfsTime ctime; // in milliseconds
+
+  public long getSize() {
+    return size;
+  }
+
+  public NfsTime getMtime() {
+    return mtime;
+  }
+
+  public NfsTime getCtime() {
+    return ctime;
+  }
+
+  public WccAttr() {
+    this.size = 0;
+    mtime = null;
+    ctime = null;
+  }
+
+  public WccAttr(long size, NfsTime mtime, NfsTime ctime) {
+    this.size = size;
+    this.mtime = mtime;
+    this.ctime = ctime;
+  }
+
+  public void serialize(XDR out) {
+    out.writeLongAsHyper(size);
+    if (mtime == null) {
+      mtime = new NfsTime(0);
+    }
+    mtime.serialize(out);
+    if (ctime == null) {
+      ctime = new NfsTime(0);
+    }
+    ctime.serialize(out);
+  }
+}
\ No newline at end of file



Mime
View raw message