From 249cb210f5fcd865dca5cf6c1196109acf83000c Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Thu, 27 Apr 2017 16:12:27 +0900 Subject: [PATCH] HDFS-11697. Add javadoc for storage policy and erasure coding policy. Contributed by Kai Sasaki. --- .../hadoop/hdfs/protocol/HdfsFileStatus.java | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsFileStatus.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsFileStatus.java index 17926a5e63..c3866022d5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsFileStatus.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsFileStatus.java @@ -58,7 +58,7 @@ public class HdfsFileStatus { public static final byte[] EMPTY_NAME = new byte[0]; /** - * Constructor + * Constructor. * @param length the number of bytes the file has * @param isdir if the path is a directory * @param block_replication the replication factor @@ -68,9 +68,13 @@ public class HdfsFileStatus { * @param permission permission * @param owner the owner of the path * @param group the group of the path + * @param symlink symlink target encoded in java UTF8 or null * @param path the local name in java UTF8 encoding the same as that in-memory * @param fileId the file id + * @param childrenNum the number of children. Used by directory. * @param feInfo the file's encryption info + * @param storagePolicy ID which specifies storage policy + * @param ecPolicy the erasure coding policy */ public HdfsFileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, @@ -157,7 +161,7 @@ public final long getAccessTime() { /** * Get FsPermission associated with the file. - * @return permssion + * @return permission */ public final FsPermission getPermission() { return permission; @@ -180,7 +184,7 @@ public final String getGroup() { } /** - * Check if the local name is empty + * Check if the local name is empty. * @return true if the name is empty */ public final boolean isEmptyLocalName() { @@ -188,7 +192,7 @@ public final boolean isEmptyLocalName() { } /** - * Get the string representation of the local name + * Get the string representation of the local name. * @return the local name in string */ public final String getLocalName() { @@ -196,7 +200,7 @@ public final String getLocalName() { } /** - * Get the Java UTF8 representation of the local name + * Get the Java UTF8 representation of the local name. * @return the local name in java UTF8 */ public final byte[] getLocalNameInBytes() { @@ -204,7 +208,7 @@ public final byte[] getLocalNameInBytes() { } /** - * Get the string representation of the full path name + * Get the string representation of the full path name. * @param parent the parent path * @return the full path in string */ @@ -222,7 +226,7 @@ public final String getFullName(final String parent) { } /** - * Get the full path + * Get the full path. * @param parent the parent path * @return the full path */ @@ -254,6 +258,10 @@ public final FileEncryptionInfo getFileEncryptionInfo() { return feInfo; } + /** + * Get the erasure coding policy if it's set. + * @return the erasure coding policy + */ public ErasureCodingPolicy getErasureCodingPolicy() { return ecPolicy; }