瀏覽代碼

HDFS-16238.Improve comments related to EncryptionZoneManager. (#3483)

Co-authored-by: zhujianghua <zhujianghua@zhujianghuadeMacBook-Pro.local>
Reviewed-by: He Xiaoqiao <hexiaoqiao@apache.org>
Reviewed-by: Viraj Jasani <vjasani@apache.org>
jianghuazhu 3 年之前
父節點
當前提交
1789c7c8c0

+ 10 - 9
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EncryptionZoneManager.java

@@ -616,8 +616,8 @@ public class EncryptionZoneManager {
   /**
   /**
    * Resolves the path to inode id, then check if it's the same as the inode id
    * Resolves the path to inode id, then check if it's the same as the inode id
    * passed in. This is necessary to filter out zones in snapshots.
    * passed in. This is necessary to filter out zones in snapshots.
-   * @param zoneId
-   * @param zonePath
+   * @param zoneId of the encryption zone
+   * @param zonePath encryption zone inode path
    * @return true if path resolve to the id, false if not.
    * @return true if path resolve to the id, false if not.
    * @throws AccessControlException
    * @throws AccessControlException
    * @throws ParentNotDirectoryException
    * @throws ParentNotDirectoryException
@@ -645,8 +645,8 @@ public class EncryptionZoneManager {
   /**
   /**
    * Re-encrypts the given encryption zone path. If the given path is not the
    * Re-encrypts the given encryption zone path. If the given path is not the
    * root of an encryption zone, an exception is thrown.
    * root of an encryption zone, an exception is thrown.
-   * @param zoneIIP
-   * @param keyVersionName
+   * @param zoneIIP encryption zone inodes in the path containing the file
+   * @param keyVersionName encryption zone version
    * @throws IOException
    * @throws IOException
    */
    */
   List<XAttr> reencryptEncryptionZone(final INodesInPath zoneIIP,
   List<XAttr> reencryptEncryptionZone(final INodesInPath zoneIIP,
@@ -677,7 +677,7 @@ public class EncryptionZoneManager {
    * Cancels the currently-running re-encryption of the given encryption zone.
    * Cancels the currently-running re-encryption of the given encryption zone.
    * If the given path is not the root of an encryption zone,
    * If the given path is not the root of an encryption zone,
    * an exception is thrown.
    * an exception is thrown.
-   * @param zoneIIP
+   * @param zoneIIP encryption zone inodes in the path containing the file
    * @throws IOException
    * @throws IOException
    */
    */
   List<XAttr> cancelReencryptEncryptionZone(final INodesInPath zoneIIP)
   List<XAttr> cancelReencryptEncryptionZone(final INodesInPath zoneIIP)
@@ -700,7 +700,8 @@ public class EncryptionZoneManager {
    * Cursor-based listing of zone re-encryption status.
    * Cursor-based listing of zone re-encryption status.
    * <p>
    * <p>
    * Called while holding the FSDirectory lock.
    * Called while holding the FSDirectory lock.
-   * @param prevId
+   * @param prevId for a given encryption zone id, a larger and more
+   *               encryption zone can be found
    * @throws IOException
    * @throws IOException
    */
    */
   BatchedListEntries<ZoneReencryptionStatus> listReencryptionStatus(
   BatchedListEntries<ZoneReencryptionStatus> listReencryptionStatus(
@@ -742,8 +743,8 @@ public class EncryptionZoneManager {
 
 
   /**
   /**
    * Return whether an INode is an encryption zone root.
    * Return whether an INode is an encryption zone root.
-   * @param inode
-   * @param name
+   * @param inode of the encryption zone inode
+   * @param name the path name of the encrypted zone inode
    * @return true when INode is an encryption zone root else false
    * @return true when INode is an encryption zone root else false
    * @throws FileNotFoundException
    * @throws FileNotFoundException
    */
    */
@@ -767,7 +768,7 @@ public class EncryptionZoneManager {
    * Return whether an INode is an encryption zone root.
    * Return whether an INode is an encryption zone root.
    *
    *
    * @param inode the zone inode
    * @param inode the zone inode
-   * @param name
+   * @param name the path name of the encrypted zone inode
    * @throws IOException if the inode is not a directory,
    * @throws IOException if the inode is not a directory,
    *                     or is a directory but not the root of an EZ.
    *                     or is a directory but not the root of an EZ.
    */
    */