hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iwasak...@apache.org
Subject hadoop git commit: HADOOP-13418. Fix javadoc warnings by JDK8 in hadoop-nfs package. Contributed by Kai Sasaki.
Date Sat, 06 Aug 2016 03:29:23 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 991823482 -> 9cdd97a15


HADOOP-13418. Fix javadoc warnings by JDK8 in hadoop-nfs package. Contributed by Kai Sasaki.

(cherry picked from commit 10ed06a0c96cbb8b70e03deeb5bb94df700f9518)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/9cdd97a1
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/9cdd97a1
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/9cdd97a1

Branch: refs/heads/branch-2
Commit: 9cdd97a15eed434003eee3064e5a67ede2670037
Parents: 9918234
Author: Masatake Iwasaki <iwasakims@apache.org>
Authored: Sat Aug 6 12:22:02 2016 +0900
Committer: Masatake Iwasaki <iwasakims@apache.org>
Committed: Sat Aug 6 12:25:05 2016 +0900

----------------------------------------------------------------------
 .../org/apache/hadoop/mount/MountInterface.java |  47 +++++-
 .../org/apache/hadoop/mount/MountResponse.java  |  26 +++-
 .../org/apache/hadoop/mount/MountdBase.java     |   4 +-
 .../java/org/apache/hadoop/nfs/NfsExports.java  |   1 +
 .../java/org/apache/hadoop/nfs/NfsTime.java     |   1 +
 .../org/apache/hadoop/nfs/nfs3/FileHandle.java  |   1 +
 .../apache/hadoop/nfs/nfs3/Nfs3Constant.java    |   6 +-
 .../apache/hadoop/nfs/nfs3/Nfs3Interface.java   | 151 ++++++++++++++++---
 .../hadoop/nfs/nfs3/request/NFS3Request.java    |   1 +
 .../hadoop/nfs/nfs3/response/NFS3Response.java  |   4 +
 .../org/apache/hadoop/oncrpc/RpcCallCache.java  |  24 ++-
 .../org/apache/hadoop/oncrpc/RpcProgram.java    |   6 +
 .../main/java/org/apache/hadoop/oncrpc/XDR.java |  20 ++-
 .../hadoop/oncrpc/security/Credentials.java     |   2 +
 .../hadoop/oncrpc/security/RpcAuthInfo.java     |   9 +-
 .../hadoop/oncrpc/security/SecurityHandler.java |  34 ++++-
 .../apache/hadoop/oncrpc/security/Verifier.java |  10 +-
 17 files changed, 296 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java
index 7002d53..9d2693d 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountInterface.java
@@ -43,7 +43,10 @@ public interface MountInterface {
       return ordinal();
     }
 
-    /** @return the procedure corresponding to the value. */
+    /** The procedure of given value.
+     * @param value specifies the procedure index
+     * @return the procedure corresponding to the value.
+     */
     public static MNTPROC fromValue(int value) {
       if (value < 0 || value >= values().length) {
         return null;
@@ -52,19 +55,51 @@ public interface MountInterface {
     }
   }
 
-  /** MNTPROC_NULL - Do Nothing */
+  /**
+   * MNTPRC_NULL - Do Nothing.
+   * @param out XDR response used in NFS protocol
+   * @param xid transaction id
+   * @param client represents IP address
+   * @return XDR response
+   */
   public XDR nullOp(XDR out, int xid, InetAddress client);
 
-  /** MNTPROC_MNT - Add mount entry */
+  /**
+   * MNTPROC_MNT - Add mount entry.
+   * @param xdr XDR message used in NFS protocol
+   * @param out XDR response used in NFS protocol
+   * @param xid transaction id
+   * @param client represents IP address
+   * @return XDR response
+   */
   public XDR mnt(XDR xdr, XDR out, int xid, InetAddress client);
 
-  /** MNTPROC_DUMP - Return mount entries */
+  /**
+   * MNTPROC_DUMP - Return mount entries.
+   * @param out XDR response used in NFS protocol
+   * @param xid transaction id
+   * @param client represents IP address
+   * @return XDR response
+   */
   public XDR dump(XDR out, int xid, InetAddress client);
 
-  /** MNTPROC_UMNT - Remove mount entry */
+  /**
+   * MNTPROC_UMNT - Remove mount entry.
+   * @param xdr XDR message used in NFS protocol
+   * @param out XDR response used in NFS protocol
+   * @param xid transaction id
+   * @param client represents IP address
+   * @return XDR response
+   */
   public XDR umnt(XDR xdr, XDR out, int xid, InetAddress client);
 
-  /** MNTPROC_UMNTALL - Remove all mount entries */
+  /**
+   * MNTPROC_UMNTALL - Remove all mount entries.
+   * @param out XDR response used in NFS protocol
+   * @param xid transaction id
+   * @param client represents IP address
+   * @return XDR response
+   */
   public XDR umntall(XDR out, int xid, InetAddress client);
   
   /** MNTPROC_EXPORT and MNTPROC_EXPORTALL - Return export list */

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountResponse.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountResponse.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountResponse.java
index a073f87..07b779e 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountResponse.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountResponse.java
@@ -36,7 +36,14 @@ public class MountResponse {
   private MountResponse() {
   }
   
-  /** Response for RPC call {@link MountInterface.MNTPROC#MNT} */
+  /**
+   * Response for RPC call {@link MountInterface.MNTPROC#MNT}.
+   * @param status status of mount response
+   * @param xdr XDR message object
+   * @param xid transaction id
+   * @param handle file handle
+   * @return response XDR
+   */
   public static XDR writeMNTResponse(int status, XDR xdr, int xid,
       byte[] handle) {
     RpcAcceptedReply.getAcceptInstance(xid, new VerifierNone()).write(xdr);
@@ -50,7 +57,13 @@ public class MountResponse {
     return xdr;
   }
 
-  /** Response for RPC call {@link MountInterface.MNTPROC#DUMP} */
+  /**
+   * Response for RPC call {@link MountInterface.MNTPROC#DUMP}.
+   * @param xdr XDR message object
+   * @param xid transaction id
+   * @param mounts mount entries
+   * @return response XDR
+   */
   public static XDR writeMountList(XDR xdr, int xid, List<MountEntry> mounts) {
     RpcAcceptedReply.getAcceptInstance(xid, new VerifierNone()).write(xdr);
     for (MountEntry mountEntry : mounts) {
@@ -62,7 +75,14 @@ public class MountResponse {
     return xdr;
   }
   
-  /** Response for RPC call {@link MountInterface.MNTPROC#EXPORT} */
+  /**
+   * Response for RPC call {@link MountInterface.MNTPROC#EXPORT}.
+   * @param xdr XDR message object
+   * @param xid transaction id
+   * @param exports export list
+   * @param hostMatcher the list of export host
+   * @return response XDR
+   */
   public static XDR writeExportList(XDR xdr, int xid, List<String> exports,
       List<NfsExports> hostMatcher) {
     assert (exports.size() == hostMatcher.size());

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
index 92ca7ec..1ef0085 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/mount/MountdBase.java
@@ -48,8 +48,8 @@ abstract public class MountdBase {
 
   /**
    * Constructor
-   * @param program
-   * @throws IOException
+   * @param program  rpc server which handles mount request
+   * @throws IOException fail to construct MountdBase
    */
   public MountdBase(RpcProgram program) throws IOException {
     rpcProgram = program;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsExports.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsExports.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsExports.java
index af96565..a299ff0 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsExports.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsExports.java
@@ -172,6 +172,7 @@ public class NfsExports {
   
   /**
    * Return the configured group list
+   * @return host group list
    */
   public String[] getHostGroupList() {
     int listSize = mMatches.size();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsTime.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsTime.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsTime.java
index 8a76667..3caf720 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsTime.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/NfsTime.java
@@ -54,6 +54,7 @@ public class NfsTime {
 
   /**
    * Get the total time in milliseconds
+   * @return convert to milli seconds
    */
   public long getMilliSeconds() {
     return (long) (seconds) * 1000 + (long) (nseconds) / 1000000;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/FileHandle.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/FileHandle.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/FileHandle.java
index f58c8b3..bff5eec 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/FileHandle.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/FileHandle.java
@@ -45,6 +45,7 @@ public class FileHandle {
 
   /**
    * Handle is a 32 bytes number. For HDFS, the last 8 bytes is fileId.
+   * @param v file id
    */
   public FileHandle(long v) {
     fileId = v;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java
index 6ab6f6f..de587a6 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Constant.java
@@ -76,7 +76,11 @@ public class Nfs3Constant {
       return ordinal();
     }
 
-    /** @return the procedure corresponding to the value. */
+    /**
+     * Convert to NFS procedure.
+     * @param value specify the index of NFS procedure
+     * @return the procedure corresponding to the value.
+     */
     public static NFSPROC3 fromValue(int value) {
       if (value < 0 || value >= values().length) {
         return null;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Interface.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Interface.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Interface.java
index 9bca9e7..b54785d 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Interface.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/Nfs3Interface.java
@@ -26,69 +26,176 @@ import org.apache.hadoop.oncrpc.XDR;
  */
 public interface Nfs3Interface {
 
-  /** NULL: Do nothing */
+  /**
+   * NULL: Do nothing.
+   * @return null NFS procedure
+   */
   public NFS3Response nullProcedure();
 
-  /** GETATTR: Get file attributes */
+  /**
+   * GETATTR: Get file attributes.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response getattr(XDR xdr, RpcInfo info);
 
-  /** SETATTR: Set file attributes */
+  /**
+   * SETATTR: Set file attributes.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response setattr(XDR xdr, RpcInfo info);
 
-  /** LOOKUP: Lookup filename */
+  /**
+   * LOOKUP: Lookup filename.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response lookup(XDR xdr, RpcInfo info);
 
-  /** ACCESS: Check access permission */
+  /**
+   * ACCESS: Check access permission.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response access(XDR xdr, RpcInfo info);
 
-    /** READLINK: Read from symbolic link */
+  /** READLINK: Read from symbolic link.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response readlink(XDR xdr, RpcInfo info);
 
-  /** READ: Read from file */
+  /**
+   * READ: Read from file.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response read(XDR xdr, RpcInfo info);
 
-  /** WRITE: Write to file */
+  /**
+   * WRITE: Write to file.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response write(XDR xdr, RpcInfo info);
 
-  /** CREATE: Create a file */
+  /**
+   * CREATE: Create a file.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response create(XDR xdr, RpcInfo info);
 
-  /** MKDIR: Create a directory */
+  /**
+   * MKDIR: Create a directory.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response mkdir(XDR xdr, RpcInfo info);
 
-  /** SYMLINK: Create a symbolic link */
+  /**
+   * SYMLINK: Create a symbolic link.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response symlink(XDR xdr, RpcInfo info);
 
-  /** MKNOD: Create a special device */
+  /**
+   * MKNOD: Create a special device.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response mknod(XDR xdr, RpcInfo info);
 
-  /** REMOVE: Remove a file */
+  /**
+   * REMOVE: Remove a file.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response remove(XDR xdr, RpcInfo info);
 
-  /** RMDIR: Remove a directory */
+  /**
+   * RMDIR: Remove a directory.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response rmdir(XDR xdr, RpcInfo info);
 
-  /** RENAME: Rename a file or directory */
+  /**
+   * RENAME: Rename a file or directory.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response rename(XDR xdr, RpcInfo info);
 
-  /** LINK: create link to an object */
+  /**
+   * LINK: create link to an object.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response link(XDR xdr, RpcInfo info);
 
-  /** READDIR: Read From directory */
+  /**
+   * READDIR: Read From directory.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response readdir(XDR xdr, RpcInfo info);
 
-  /** READDIRPLUS: Extended read from directory */
+  /**
+   * READDIRPLUS: Extended read from directory.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response readdirplus(XDR xdr, RpcInfo info);
   
-  /** FSSTAT: Get dynamic file system information */
+  /**
+   * FSSTAT: Get dynamic file system information.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response fsstat(XDR xdr, RpcInfo info);
 
-  /** FSINFO: Get static file system information */
+  /**
+   * FSINFO: Get static file system information.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response fsinfo(XDR xdr, RpcInfo info);
 
-  /** PATHCONF: Retrieve POSIX information */
+  /**
+   * PATHCONF: Retrieve POSIX information.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response pathconf(XDR xdr, RpcInfo info);
 
-  /** COMMIT: Commit cached data on a server to stable storage */
+  /**
+   * COMMIT: Commit cached data on a server to stable storage.
+   * @param xdr XDR message
+   * @param info context of rpc message
+   * @return NFSv3 response
+   */
   public NFS3Response commit(XDR xdr, RpcInfo info);
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/NFS3Request.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/NFS3Request.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/NFS3Request.java
index cffa215..b8e7a9b 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/NFS3Request.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/request/NFS3Request.java
@@ -40,6 +40,7 @@ public abstract class NFS3Request {
   
   /**
    * Subclass should implement. Usually handle is the first to be serialized
+   * @param xdr XDR message
    */
   public abstract void serialize(XDR xdr);
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java
index 2a2a1e4..98a9db3 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/nfs/nfs3/response/NFS3Response.java
@@ -43,6 +43,10 @@ public class NFS3Response {
   /**
    * Write the response, along with the rpc header (including verifier), to the
    * XDR.
+   * @param out XDR output message
+   * @param xid transaction id
+   * @param verifier verifies reply
+   * @return XDR response
    */
   public XDR serialize(XDR out, int xid, Verifier verifier) {
     RpcAcceptedReply reply = RpcAcceptedReply.getAcceptInstance(xid, verifier);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcCallCache.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcCallCache.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcCallCache.java
index 0c857be..2d6f30e 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcCallCache.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcCallCache.java
@@ -122,12 +122,20 @@ public class RpcCallCache {
     };
   }
   
-  /** Return the program name */
+  /**
+   * Return the program name.
+   * @return RPC program name
+   */
   public String getProgram() {
     return program;
   }
 
-  /** Mark a request as completed and add corresponding response to the cache */
+  /**
+   * Mark a request as completed and add corresponding response to the cache.
+   * @param clientId client IP address
+   * @param xid transaction id
+   * @param response RPC response
+   */
   public void callCompleted(InetAddress clientId, int xid, RpcResponse response) {
     ClientRequest req = new ClientRequest(clientId, xid);
     CacheEntry e;
@@ -140,6 +148,9 @@ public class RpcCallCache {
   /**
    * Check the cache for an entry. If it does not exist, add the request
    * as in progress.
+   * @param clientId client IP address
+   * @param xid transaction id
+   * @return cached entry
    */
   public CacheEntry checkOrAddToCache(InetAddress clientId, int xid) {
     ClientRequest req = new ClientRequest(clientId, xid);
@@ -154,14 +165,17 @@ public class RpcCallCache {
     return e;
   }
   
-  /** Return number of cached entries */
+  /**
+   * Return number of cached entries.
+   * @return cache size
+   */
   public int size() {
     return map.size();
   }
   
   /** 
-   * Iterator to the cache entries 
-   * @return iterator
+   * Iterator to the cache entries.
+   * @return iterator cache iterator
    */
   @VisibleForTesting
   public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcProgram.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcProgram.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcProgram.java
index b782ae5..cebfcfa 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcProgram.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/RpcProgram.java
@@ -87,6 +87,8 @@ public abstract class RpcProgram extends SimpleChannelUpstreamHandler {
 
   /**
    * Register this program with the local portmapper.
+   * @param transport transport layer for port map
+   * @param boundPort port number of bounded RPC program
    */
   public void register(int transport, int boundPort) {
     if (boundPort != port) {
@@ -104,6 +106,8 @@ public abstract class RpcProgram extends SimpleChannelUpstreamHandler
{
   
   /**
    * Unregister this program with the local portmapper.
+   * @param transport transport layer for port map
+   * @param boundPort port number of bounded RPC program
    */
   public void unregister(int transport, int boundPort) {
     if (boundPort != port) {
@@ -121,6 +125,8 @@ public abstract class RpcProgram extends SimpleChannelUpstreamHandler
{
   
   /**
    * Register the program with Portmap or Rpcbind
+   * @param mapEntry port map entries
+   * @param set specifies registration or not
    */
   protected void register(PortmapMapping mapEntry, boolean set) {
     XDR mappingRequest = PortmapRequest.create(mapEntry, set);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/XDR.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/XDR.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/XDR.java
index b135388..acdc51c 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/XDR.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/XDR.java
@@ -219,7 +219,12 @@ public final class XDR {
     }
   }
 
-  /** check if the rest of data has more than len bytes */
+  /**
+   * check if the rest of data has more than len bytes.
+   * @param xdr XDR message
+   * @param len minimum remaining length
+   * @return specify remaining length is enough or not
+   */
   public static boolean verifyLength(XDR xdr, int len) {
     return xdr.buf.remaining() >= len;
   }
@@ -231,7 +236,12 @@ public final class XDR {
     return b;
   }
 
-  /** Write an XDR message to a TCP ChannelBuffer */
+  /**
+   * Write an XDR message to a TCP ChannelBuffer.
+   * @param request XDR request
+   * @param last specifies last request or not
+   * @return TCP buffer
+   */
   public static ChannelBuffer writeMessageTcp(XDR request, boolean last) {
     Preconditions.checkState(request.state == XDR.State.WRITING);
     ByteBuffer b = request.buf.duplicate();
@@ -243,7 +253,11 @@ public final class XDR {
     return ChannelBuffers.copiedBuffer(headerBuf, b);
   }
 
-  /** Write an XDR message to a UDP ChannelBuffer */
+  /**
+   * Write an XDR message to a UDP ChannelBuffer.
+   * @param response XDR response
+   * @return UDP buffer
+   */
   public static ChannelBuffer writeMessageUdp(XDR response) {
     Preconditions.checkState(response.state == XDR.State.READING);
     // TODO: Investigate whether making a copy of the buffer is necessary.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Credentials.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Credentials.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Credentials.java
index 639a1e5..fe4350b 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Credentials.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Credentials.java
@@ -48,6 +48,8 @@ public abstract class Credentials extends RpcAuthInfo {
   
   /**
    * Write AuthFlavor and the credentials to the XDR
+   * @param cred credentials
+   * @param xdr XDR message
    */
   public static void writeFlavorAndCredentials(Credentials cred, XDR xdr) {
     if (cred instanceof CredentialsNone) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/RpcAuthInfo.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/RpcAuthInfo.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/RpcAuthInfo.java
index 65ebd30..5244272 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/RpcAuthInfo.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/RpcAuthInfo.java
@@ -57,10 +57,15 @@ public abstract class RpcAuthInfo {
     this.flavor = flavor;
   }
   
-  /** Load auth info */
+  /**
+   * Load auth info.
+   * @param xdr XDR message
+   */
   public abstract void read(XDR xdr);
   
-  /** Write auth info */
+  /** Write auth info.
+   * @param xdr XDR message
+   */
   public abstract void write(XDR xdr);
   
   public AuthFlavor getFlavor() {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/SecurityHandler.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/SecurityHandler.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/SecurityHandler.java
index 063082e..93efba8 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/SecurityHandler.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/SecurityHandler.java
@@ -41,27 +41,51 @@ public abstract class SecurityHandler {
     return false;
   }
 
-  /** Used by GSS */
+  /**
+   * Used by GSS.
+   * @param request RPC request
+   * @param data request data
+   * @throws IOException fail to unwrap RPC call
+   * @return XDR response
+   */
   public XDR unwrap(RpcCall request, byte[] data ) throws IOException {
     throw new UnsupportedOperationException();
   }
   
-  /** Used by GSS */
+  /**
+   * Used by GSS.
+   * @param request RPC request
+   * @param response RPC response
+   * @throws IOException fail to wrap RPC call
+   * @return response byte buffer
+   */
   public byte[] wrap(RpcCall request, XDR response) throws IOException {
     throw new UnsupportedOperationException();
   }
   
-  /** Used by AUTH_SYS */
+  /**
+   * Used by AUTH_SYS.
+   * Return the uid of the NFS user credential.
+   * @return uid
+   */
   public int getUid() {
     throw new UnsupportedOperationException();
   }
   
-  /** Used by AUTH_SYS */
+  /**
+   * Used by AUTH_SYS.
+   * Return the gid of the NFS user credential.
+   * @return gid
+   */
   public int getGid() {
     throw new UnsupportedOperationException();
   }
 
-  /** Used by AUTH_SYS */
+  /**
+   * Used by AUTH_SYS.
+   * Return the auxiliary gids of the NFS user credential.
+   * @return auxiliary gids
+   */
   public int[] getAuxGids() {
     throw new UnsupportedOperationException();
   }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9cdd97a1/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
index e60db97..f3202a1 100644
--- a/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
+++ b/hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/security/Verifier.java
@@ -33,7 +33,11 @@ public abstract class Verifier extends RpcAuthInfo {
     super(flavor);
   }
 
-  /** Read both AuthFlavor and the verifier from the XDR */
+  /**
+   * Read both AuthFlavor and the verifier from the XDR.
+   * @param xdr XDR message
+   * @return verifier
+   */
   public static Verifier readFlavorAndVerifier(XDR xdr) {
     AuthFlavor flavor = AuthFlavor.fromValue(xdr.readInt());
     final Verifier verifer;
@@ -50,7 +54,9 @@ public abstract class Verifier extends RpcAuthInfo {
   }
   
   /**
-   * Write AuthFlavor and the verifier to the XDR
+   * Write AuthFlavor and the verifier to the XDR.
+   * @param verifier written to XDR
+   * @param xdr XDR message
    */
   public static void writeFlavorAndVerifier(Verifier verifier, XDR xdr) {
     if (verifier instanceof VerifierNone) {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message