HDFS-6567. Normalize the order of public final in HdfsFileStatus. Contributed by Tassapol Athiapinya.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1617779 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Haohui Mai 2014-08-13 17:45:47 +00:00
parent a34dafe325
commit 03d8ff496a
3 changed files with 23 additions and 20 deletions

View File

@ -396,6 +396,9 @@ Release 2.6.0 - UNRELEASED
HDFS-6836. HDFS INFO logging is verbose & uses file appenders. (Xiaoyu HDFS-6836. HDFS INFO logging is verbose & uses file appenders. (Xiaoyu
Yao via Arpit Agarwal) Yao via Arpit Agarwal)
HDFS-6567. Normalize the order of public final in HdfsFileStatus.
(Tassapol Athiapinya via wheat9)
OPTIMIZATIONS OPTIMIZATIONS
HDFS-6690. Deduplicate xattr names in memory. (wang) HDFS-6690. Deduplicate xattr names in memory. (wang)

View File

@ -91,7 +91,7 @@ public class HdfsFileStatus {
* Get the length of this file, in bytes. * Get the length of this file, in bytes.
* @return the length of this file, in bytes. * @return the length of this file, in bytes.
*/ */
final public long getLen() { public final long getLen() {
return length; return length;
} }
@ -99,7 +99,7 @@ public class HdfsFileStatus {
* Is this a directory? * Is this a directory?
* @return true if this is a directory * @return true if this is a directory
*/ */
final public boolean isDir() { public final boolean isDir() {
return isdir; return isdir;
} }
@ -115,7 +115,7 @@ public class HdfsFileStatus {
* Get the block size of the file. * Get the block size of the file.
* @return the number of bytes * @return the number of bytes
*/ */
final public long getBlockSize() { public final long getBlockSize() {
return blocksize; return blocksize;
} }
@ -123,7 +123,7 @@ public class HdfsFileStatus {
* Get the replication factor of a file. * Get the replication factor of a file.
* @return the replication factor of a file. * @return the replication factor of a file.
*/ */
final public short getReplication() { public final short getReplication() {
return block_replication; return block_replication;
} }
@ -131,7 +131,7 @@ public class HdfsFileStatus {
* Get the modification time of the file. * Get the modification time of the file.
* @return the modification time of file in milliseconds since January 1, 1970 UTC. * @return the modification time of file in milliseconds since January 1, 1970 UTC.
*/ */
final public long getModificationTime() { public final long getModificationTime() {
return modification_time; return modification_time;
} }
@ -139,7 +139,7 @@ public class HdfsFileStatus {
* Get the access time of the file. * Get the access time of the file.
* @return the access time of file in milliseconds since January 1, 1970 UTC. * @return the access time of file in milliseconds since January 1, 1970 UTC.
*/ */
final public long getAccessTime() { public final long getAccessTime() {
return access_time; return access_time;
} }
@ -147,7 +147,7 @@ public class HdfsFileStatus {
* Get FsPermission associated with the file. * Get FsPermission associated with the file.
* @return permssion * @return permssion
*/ */
final public FsPermission getPermission() { public final FsPermission getPermission() {
return permission; return permission;
} }
@ -155,7 +155,7 @@ public class HdfsFileStatus {
* Get the owner of the file. * Get the owner of the file.
* @return owner of the file * @return owner of the file
*/ */
final public String getOwner() { public final String getOwner() {
return owner; return owner;
} }
@ -163,7 +163,7 @@ public class HdfsFileStatus {
* Get the group associated with the file. * Get the group associated with the file.
* @return group for the file. * @return group for the file.
*/ */
final public String getGroup() { public final String getGroup() {
return group; return group;
} }
@ -171,7 +171,7 @@ public class HdfsFileStatus {
* Check if the local name is empty * Check if the local name is empty
* @return true if the name is empty * @return true if the name is empty
*/ */
final public boolean isEmptyLocalName() { public final boolean isEmptyLocalName() {
return path.length == 0; return path.length == 0;
} }
@ -179,7 +179,7 @@ public class HdfsFileStatus {
* Get the string representation of the local name * Get the string representation of the local name
* @return the local name in string * @return the local name in string
*/ */
final public String getLocalName() { public final String getLocalName() {
return DFSUtil.bytes2String(path); return DFSUtil.bytes2String(path);
} }
@ -187,7 +187,7 @@ public class HdfsFileStatus {
* 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 * @return the local name in java UTF8
*/ */
final public byte[] getLocalNameInBytes() { public final byte[] getLocalNameInBytes() {
return path; return path;
} }
@ -196,7 +196,7 @@ public class HdfsFileStatus {
* @param parent the parent path * @param parent the parent path
* @return the full path in string * @return the full path in string
*/ */
final public String getFullName(final String parent) { public final String getFullName(final String parent) {
if (isEmptyLocalName()) { if (isEmptyLocalName()) {
return parent; return parent;
} }
@ -214,7 +214,7 @@ public class HdfsFileStatus {
* @param parent the parent path * @param parent the parent path
* @return the full path * @return the full path
*/ */
final public Path getFullPath(final Path parent) { public final Path getFullPath(final Path parent) {
if (isEmptyLocalName()) { if (isEmptyLocalName()) {
return parent; return parent;
} }
@ -226,23 +226,23 @@ public class HdfsFileStatus {
* Get the string representation of the symlink. * Get the string representation of the symlink.
* @return the symlink as a string. * @return the symlink as a string.
*/ */
final public String getSymlink() { public final String getSymlink() {
return DFSUtil.bytes2String(symlink); return DFSUtil.bytes2String(symlink);
} }
final public byte[] getSymlinkInBytes() { public final byte[] getSymlinkInBytes() {
return symlink; return symlink;
} }
final public long getFileId() { public final long getFileId() {
return fileId; return fileId;
} }
final public int getChildrenNum() { public final int getChildrenNum() {
return childrenNum; return childrenNum;
} }
final public FileStatus makeQualified(URI defaultUri, Path path) { public final FileStatus makeQualified(URI defaultUri, Path path) {
return new FileStatus(getLen(), isDir(), getReplication(), return new FileStatus(getLen(), isDir(), getReplication(),
getBlockSize(), getModificationTime(), getBlockSize(), getModificationTime(),
getAccessTime(), getAccessTime(),

View File

@ -67,7 +67,7 @@ public class HdfsLocatedFileStatus extends HdfsFileStatus {
return locations; return locations;
} }
final public LocatedFileStatus makeQualifiedLocated(URI defaultUri, public final LocatedFileStatus makeQualifiedLocated(URI defaultUri,
Path path) { Path path) {
return new LocatedFileStatus(getLen(), isDir(), getReplication(), return new LocatedFileStatus(getLen(), isDir(), getReplication(),
getBlockSize(), getModificationTime(), getBlockSize(), getModificationTime(),