[ 
https://issues.apache.org/jira/browse/HDDS-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Prashant Pogde updated HDDS-2993:
---------------------------------
    Target Version/s: 1.2.0

I am managing the 1.1.0 release and we currently have more than 600 issues 
targeted for 1.1.0. I am moving the target field to 1.2.0. 

If you are actively working on this jira and believe this should be targeted to 
1.1.0 release, Please change the target field back to 1.1.0 before Feb 05, 
2021. 

> KeyManagerImpl#getFileStatus shouldn't always return null for permission, 
> owner and group
> -----------------------------------------------------------------------------------------
>
>                 Key: HDDS-2993
>                 URL: https://issues.apache.org/jira/browse/HDDS-2993
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Manager, Security
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>              Labels: Triaged
>
> The {{getFileStatus}} API always returns null for permisson, owner and group 
> at the moment.
> From the 
> [code|https://github.com/apache/hadoop-ozone/blob/5950224c735c994d0acfaada87e3eef6c306299e/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L1689-L1692]:
> {code}
>       if (fileKeyInfo != null) {
>         // this is a file
>         return new OzoneFileStatus(fileKeyInfo, scmBlockSize, false);
>       }
> {code}
> into the 
> [constructor|https://github.com/apache/hadoop-ozone/blob/2e9265864af3b1d520dc7cdca3698d306f28cd14/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OzoneFileStatus.java#L41-L45]:
> {code}
>   public OzoneFileStatus(OmKeyInfo key, long blockSize, boolean isDirectory) {
>     super(key.getDataSize(), isDirectory, key.getFactor().getNumber(),
>         blockSize, key.getModificationTime(), getPath(key.getKeyName()));
>     keyInfo = key;
>   }
> {code}
> into 
> [super|https://github.com/apache/hadoop/blob/branch-3.2.0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java#L109-L115]
>  (hadoop-common 3.2.0 jar):
> {code}
>   //We should deprecate this soon?
>   public FileStatus(long length, boolean isdir, int block_replication,
>                     long blocksize, long modification_time, Path path) {
>     this(length, isdir, block_replication, blocksize, modification_time,
>          0, null, null, null, path);
>   }
> {code}
> The constructor 
> [params|https://github.com/apache/hadoop/blob/branch-3.2.0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileStatus.java#L117-L127]:
> {code}
>   /**
>    * Constructor for file systems on which symbolic links are not supported
>    */
>   public FileStatus(long length, boolean isdir,
>                     int block_replication,
>                     long blocksize, long modification_time, long access_time,
>                     FsPermission permission, String owner, String group, 
>                     Path path) {
>     this(length, isdir, block_replication, blocksize, modification_time,
>          access_time, permission, owner, group, null, path);
>   }
> {code}
> You can see that the constructor used for Ozone's getFileStatus is always 
> filling null for permission/owner/group.
> We might want to fix this.
> CC [~xyao] [~aengineer]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to