hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manoj Govindassamy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12201) INode#getSnapshotINode() should get INodeAttributes from INodeAttributesProvider for the current INode
Date Wed, 26 Jul 2017 19:10:00 GMT

    [ https://issues.apache.org/jira/browse/HDFS-12201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16102133#comment-16102133
] 

Manoj Govindassamy commented on HDFS-12201:
-------------------------------------------

Adding [~yzhangal], [~jojochuang], [~jingzhao], [~zhz] for more discussion.

> INode#getSnapshotINode() should get INodeAttributes from INodeAttributesProvider for
the current INode
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-12201
>                 URL: https://issues.apache.org/jira/browse/HDFS-12201
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: snapshots
>    Affects Versions: 2.8.0
>            Reporter: Manoj Govindassamy
>            Assignee: Manoj Govindassamy
>
> {{INodeFile}}
> {noformat}
>   @Override
>   public INodeFileAttributes getSnapshotINode(final int snapshotId) {
>     FileWithSnapshotFeature sf = this.getFileWithSnapshotFeature();
>     if (sf != null) {
>       return sf.getDiffs().getSnapshotINode(snapshotId, this);
>     } else {
>       return this;
>     }
>   }
> {noformat}
> {{AbstractINodeDiffList#getSnapshotINode}}
> {noformat}
>   public A getSnapshotINode(final int snapshotId, final A currentINode) {
>     final D diff = getDiffById(snapshotId);
>     final A inode = diff == null? null: diff.getSnapshotINode();
>     return inode == null? currentINode: inode;
>   }
> {noformat}
> INodeFile, INodeDirectory #getSnapshotINode() returns the current INode's local INodeAttributes
if there is anything available for the given snapshot id. When there is an INodeAttributesProvider
configured, attributes are retrieved from this external provider instead of the local. But,
getSnapshotINode always returns the local attributes without retrieving them from attributes
provider. 



--
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