HDFS-6567. Merge r1617779 from trunk.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1617780 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
100ae93d42
commit
e9bd4578d6
|
@ -138,6 +138,9 @@ Release 2.6.0 - UNRELEASED
|
|||
HDFS-6836. HDFS INFO logging is verbose & uses file appenders. (Xiaoyu
|
||||
Yao via Arpit Agarwal)
|
||||
|
||||
HDFS-6567. Normalize the order of public final in HdfsFileStatus.
|
||||
(Tassapol Athiapinya via wheat9)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-6690. Deduplicate xattr names in memory. (wang)
|
||||
|
|
|
@ -91,7 +91,7 @@ public class HdfsFileStatus {
|
|||
* Get 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;
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ public class HdfsFileStatus {
|
|||
* Is this a directory?
|
||||
* @return true if this is a directory
|
||||
*/
|
||||
final public boolean isDir() {
|
||||
public final boolean isDir() {
|
||||
return isdir;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class HdfsFileStatus {
|
|||
* Get the block size of the file.
|
||||
* @return the number of bytes
|
||||
*/
|
||||
final public long getBlockSize() {
|
||||
public final long getBlockSize() {
|
||||
return blocksize;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ public class HdfsFileStatus {
|
|||
* Get the replication factor of a file.
|
||||
* @return the replication factor of a file.
|
||||
*/
|
||||
final public short getReplication() {
|
||||
public final short getReplication() {
|
||||
return block_replication;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ public class HdfsFileStatus {
|
|||
* Get the modification time of the file.
|
||||
* @return the modification time of file in milliseconds since January 1, 1970 UTC.
|
||||
*/
|
||||
final public long getModificationTime() {
|
||||
public final long getModificationTime() {
|
||||
return modification_time;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ public class HdfsFileStatus {
|
|||
* Get the access time of the file.
|
||||
* @return the access time of file in milliseconds since January 1, 1970 UTC.
|
||||
*/
|
||||
final public long getAccessTime() {
|
||||
public final long getAccessTime() {
|
||||
return access_time;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ public class HdfsFileStatus {
|
|||
* Get FsPermission associated with the file.
|
||||
* @return permssion
|
||||
*/
|
||||
final public FsPermission getPermission() {
|
||||
public final FsPermission getPermission() {
|
||||
return permission;
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ public class HdfsFileStatus {
|
|||
* Get the owner of the file.
|
||||
* @return owner of the file
|
||||
*/
|
||||
final public String getOwner() {
|
||||
public final String getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ public class HdfsFileStatus {
|
|||
* Get the group associated with the file.
|
||||
* @return group for the file.
|
||||
*/
|
||||
final public String getGroup() {
|
||||
public final String getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ public class HdfsFileStatus {
|
|||
* Check if the local name is empty
|
||||
* @return true if the name is empty
|
||||
*/
|
||||
final public boolean isEmptyLocalName() {
|
||||
public final boolean isEmptyLocalName() {
|
||||
return path.length == 0;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ public class HdfsFileStatus {
|
|||
* Get the string representation of the local name
|
||||
* @return the local name in string
|
||||
*/
|
||||
final public String getLocalName() {
|
||||
public final String getLocalName() {
|
||||
return DFSUtil.bytes2String(path);
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ public class HdfsFileStatus {
|
|||
* Get the Java UTF8 representation of the local name
|
||||
* @return the local name in java UTF8
|
||||
*/
|
||||
final public byte[] getLocalNameInBytes() {
|
||||
public final byte[] getLocalNameInBytes() {
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ public class HdfsFileStatus {
|
|||
* @param parent the parent path
|
||||
* @return the full path in string
|
||||
*/
|
||||
final public String getFullName(final String parent) {
|
||||
public final String getFullName(final String parent) {
|
||||
if (isEmptyLocalName()) {
|
||||
return parent;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ public class HdfsFileStatus {
|
|||
* @param parent the parent path
|
||||
* @return the full path
|
||||
*/
|
||||
final public Path getFullPath(final Path parent) {
|
||||
public final Path getFullPath(final Path parent) {
|
||||
if (isEmptyLocalName()) {
|
||||
return parent;
|
||||
}
|
||||
|
@ -226,23 +226,23 @@ public class HdfsFileStatus {
|
|||
* Get the string representation of the symlink.
|
||||
* @return the symlink as a string.
|
||||
*/
|
||||
final public String getSymlink() {
|
||||
public final String getSymlink() {
|
||||
return DFSUtil.bytes2String(symlink);
|
||||
}
|
||||
|
||||
final public byte[] getSymlinkInBytes() {
|
||||
public final byte[] getSymlinkInBytes() {
|
||||
return symlink;
|
||||
}
|
||||
|
||||
final public long getFileId() {
|
||||
public final long getFileId() {
|
||||
return fileId;
|
||||
}
|
||||
|
||||
final public int getChildrenNum() {
|
||||
public final int getChildrenNum() {
|
||||
return childrenNum;
|
||||
}
|
||||
|
||||
final public FileStatus makeQualified(URI defaultUri, Path path) {
|
||||
public final FileStatus makeQualified(URI defaultUri, Path path) {
|
||||
return new FileStatus(getLen(), isDir(), getReplication(),
|
||||
getBlockSize(), getModificationTime(),
|
||||
getAccessTime(),
|
||||
|
|
|
@ -67,7 +67,7 @@ public class HdfsLocatedFileStatus extends HdfsFileStatus {
|
|||
return locations;
|
||||
}
|
||||
|
||||
final public LocatedFileStatus makeQualifiedLocated(URI defaultUri,
|
||||
public final LocatedFileStatus makeQualifiedLocated(URI defaultUri,
|
||||
Path path) {
|
||||
return new LocatedFileStatus(getLen(), isDir(), getReplication(),
|
||||
getBlockSize(), getModificationTime(),
|
||||
|
|
Loading…
Reference in New Issue