You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Ethan Rose (Jira)" <ji...@apache.org> on 2021/10/20 20:40:07 UTC

[jira] [Updated] (HDDS-2993) KeyManagerImpl#getFileStatus shouldn't always return null for permission, owner and group

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

Ethan Rose updated HDDS-2993:
-----------------------------
    Target Version/s: 1.3.0  (was: 1.2.0)

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

If you are actively working on this jira and believe this should be targeted for the 1.2.0 release, Please reach out to me via Apache email or Slack.

> 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: Apache Ozone
>          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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org