From 4e4d4fcc7c965fd565646c69b0d6cfd2a5639d85 Mon Sep 17 00:00:00 2001 From: jianghuazhu <740087514@qq.com> Date: Mon, 6 Sep 2021 18:06:12 +0800 Subject: [PATCH] HDFS-16204. Improve FSDirEncryptionZoneOp related parameter comments. (#3368) --- .../server/namenode/FSDirEncryptionZoneOp.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirEncryptionZoneOp.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirEncryptionZoneOp.java index f5b8895e9e..0969679be1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirEncryptionZoneOp.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirEncryptionZoneOp.java @@ -75,7 +75,7 @@ private FSDirEncryptionZoneOp() {} * Invoke KeyProvider APIs to generate an encrypted data encryption key for * an encryption zone. Should not be called with any locks held. * - * @param fsd fsdirectory + * @param fsd the namespace tree. * @param ezKeyName key name of an encryption zone * @return New EDEK, or null if ezKeyName is null * @throws IOException @@ -142,11 +142,12 @@ static KeyProvider.Metadata ensureKeyIsInitialized(final FSDirectory fsd, /** * Create an encryption zone on directory path using the specified key. * - * @param fsd fsdirectory + * @param fsd the namespace tree. * @param srcArg the path of a directory which will be the root of the * encryption zone. The directory must be empty * @param pc permission checker to check fs permission - * @param cipher cipher + * @param cipher the name of the cipher suite, which will be used + * when it is generated. * @param keyName name of a key which must be present in the configured * KeyProvider * @param logRetryCache whether to record RPC ids in editlog for retry cache @@ -180,7 +181,7 @@ static FileStatus createEncryptionZone(final FSDirectory fsd, /** * Get the encryption zone for the specified path. * - * @param fsd fsdirectory + * @param fsd the namespace tree. * @param srcArg the path of a file or directory to get the EZ for * @param pc permission checker to check fs permission * @return the EZ with file status. @@ -400,7 +401,7 @@ static void saveFileXAttrsForBatch(FSDirectory fsd, /** * Set the FileEncryptionInfo for an INode. * - * @param fsd fsdirectory + * @param fsd the namespace tree. * @param info file encryption information * @param flag action when setting xattr. Either CREATE or REPLACE. * @throws IOException @@ -430,7 +431,7 @@ static void setFileEncryptionInfo(final FSDirectory fsd, * returns a consolidated FileEncryptionInfo instance. Null is returned * for non-encrypted or raw files. * - * @param fsd fsdirectory + * @param fsd the namespace tree. * @param iip inodes in the path containing the file, passed in to * avoid obtaining the list of inodes again * @return consolidated file encryption info; null for non-encrypted files @@ -487,7 +488,7 @@ static FileEncryptionInfo getFileEncryptionInfo(final FSDirectory fsd, * else throw a retry exception. The startFile method generates the EDEK * outside of the lock so the zone must be reverified. * - * @param dir fsdirectory + * @param dir the namespace tree. * @param iip inodes in the file path * @param ezInfo the encryption key * @return FileEncryptionInfo for the file