hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rushabh S Shah (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-12970) HdfsFileStatus#getPath returning null.
Date Fri, 29 Dec 2017 21:56:00 GMT
Rushabh S Shah created HDFS-12970:
-------------------------------------

             Summary: HdfsFileStatus#getPath returning null.
                 Key: HDFS-12970
                 URL: https://issues.apache.org/jira/browse/HDFS-12970
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: hdfs
    Affects Versions: 3.1.0
            Reporter: Rushabh S Shah
            Priority: Critical


After HDFS-12681, HdfsFileStatus#getPath() returns null.
I don't think this is expected.

Relevant code chunk
Both the implementation of {{HdfsFileStatus}} sets it to null.
{code:title=HdfsNamedFileStatus.java|borderStyle=solid}
  HdfsNamedFileStatus(long length, boolean isdir, int replication,
                      long blocksize, long mtime, long atime,
                      FsPermission permission, Set<Flags> flags,
                      String owner, String group,
                      byte[] symlink, byte[] path, long fileId,
                      int childrenNum, FileEncryptionInfo feInfo,
                      byte storagePolicy, ErasureCodingPolicy ecPolicy) {
    super(length, isdir, replication, blocksize, mtime, atime,
        HdfsFileStatus.convert(isdir, symlink != null, permission, flags),
        owner, group, null, null,           ------ The last null is for path.
        HdfsFileStatus.convert(flags));
{code}


{code:title=HdfsLocatedFileStatus.java|borderStyle=solid}
  HdfsLocatedFileStatus(long length, boolean isdir, int replication,
                        long blocksize, long mtime, long atime,
                        FsPermission permission, EnumSet<Flags> flags,
                        String owner, String group,
                        byte[] symlink, byte[] path, long fileId,
                        int childrenNum, FileEncryptionInfo feInfo,
                        byte storagePolicy, ErasureCodingPolicy ecPolicy,
                        LocatedBlocks hdfsloc) {
    super(length, isdir, replication, blocksize, mtime, atime,
        HdfsFileStatus.convert(isdir, symlink != null, permission, flags),
        owner, group, null, null, HdfsFileStatus.convert(flags),  -- The last null on this
line is for path.
        null);
{code}




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message