hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brando...@apache.org
Subject svn commit: r1499190 - in /hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop: mount/ nfs/nfs3/ nfs/nfs3/response/
Date Wed, 03 Jul 2013 03:55:43 GMT
Author: brandonli
Date: Wed Jul  3 03:55:42 2013
New Revision: 1499190

URL: http://svn.apache.org/r1499190
Log:
HDFS-4762,HDFS-4948. Merging change r1499029,r1499041,r1499152 from trunk to branch-2

Modified:
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Base.java
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java
    hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java?rev=1499190&r1=1499189&r2=1499190&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
Wed Jul  3 03:55:42 2013
@@ -50,7 +50,6 @@ abstract public class MountdBase {
 
   /* Start UDP server */
   private void startUDPServer() {
-    rpcProgram.register(PortmapMapping.TRANSPORT_UDP);
     SimpleUdpServer udpServer = new SimpleUdpServer(rpcProgram.getPort(),
         rpcProgram, 1);
     udpServer.run();
@@ -58,14 +57,17 @@ abstract public class MountdBase {
 
   /* Start TCP server */
   private void startTCPServer() {
-    rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
     SimpleTcpServer tcpServer = new SimpleTcpServer(rpcProgram.getPort(),
         rpcProgram, 1);
     tcpServer.run();
   }
 
-  public void start() {
+  public void start(boolean register) {
     startUDPServer();
     startTCPServer();
+    if (register) {
+      rpcProgram.register(PortmapMapping.TRANSPORT_UDP);
+      rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
+    }
   }
 }

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Base.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Base.java?rev=1499190&r1=1499189&r2=1499190&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Base.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Base.java
Wed Jul  3 03:55:42 2013
@@ -52,10 +52,12 @@ public abstract class Nfs3Base {
     this.rpcProgram = program;
   }
 
-  public void start() {
-    mountd.start();     // Start mountd
-    rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
-    startTCPServer();   // Start TCP server
+  public void start(boolean register) {
+    mountd.start(register); // Start mountd
+    startTCPServer(); // Start TCP server
+    if (register) {
+      rpcProgram.register(PortmapMapping.TRANSPORT_TCP);
+    }
   }
 
   private void startTCPServer() {

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java?rev=1499190&r1=1499189&r2=1499190&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3FileAttributes.java
Wed Jul  3 03:55:42 2013
@@ -96,6 +96,22 @@ public class Nfs3FileAttributes {
     this.ctime = this.mtime;
   }
   
+  public Nfs3FileAttributes(Nfs3FileAttributes other) {
+    this.type = other.getType();
+    this.mode = other.getMode();
+    this.nlink = other.getNlink();
+    this.uid = other.getUid();
+    this.gid = other.getGid();
+    this.size = other.getSize();
+    this.used = other.getUsed();
+    this.rdev = new Specdata3();
+    this.fsid = other.getFsid();
+    this.fileid = other.getFileid();
+    this.mtime = new NfsTime(other.getMtime());
+    this.atime = new NfsTime(other.getAtime());
+    this.ctime = new NfsTime(other.getCtime());
+  }
+
   public void serialize(XDR xdr) {
     xdr.writeInt(type);
     xdr.writeInt(mode);

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java?rev=1499190&r1=1499189&r2=1499190&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIR3Response.java
Wed Jul  3 03:55:42 2013
@@ -61,6 +61,7 @@ public class READDIR3Response extends NF
     
     public DirList3(Entry3[] entries, boolean eof) {
       this.entries = ObjectArrays.newArray(entries, entries.length);
+      System.arraycopy(this.entries, 0, entries, 0, entries.length);
       this.eof = eof;
     }
   }

Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java?rev=1499190&r1=1499189&r2=1499190&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/READDIRPLUS3Response.java
Wed Jul  3 03:55:42 2013
@@ -65,6 +65,7 @@ public class READDIRPLUS3Response  exten
     
     public DirListPlus3(EntryPlus3[] entries, boolean eof) {
       this.entries = ObjectArrays.newArray(entries, entries.length);
+      System.arraycopy(this.entries, 0, entries, 0, entries.length);
       this.eof = eof;
     }
 



Mime
View raw message