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

Adam Antal commented on HDFS-13890:
-----------------------------------

To sum up: as the snapshots are stored in the FSImage differently (in 
SnapshotDiffs) than it is visible from the user's side, I think it is not 
suitable for the OIV to do the calculation to restore ".snapshots" folders.

More in detail: after looking further into this, it looks a bit complicated. At 
the user's side snapshots appear in the snapshotted directories as ".snapshot" 
named folders, while in the FSImage it is saved in SnapshotDiffs incrementally 
- so in a fundamentally different format. Consequently snapshots could not be 
simply added simply like as I have previously thought. 

If a user wants to actually look the .snapshot folders as if they were 
physically there in the folder structure (as he/she sees it), we have to 
reconstruct those from the FSImage going through the SnapshotDiffSection. This 
would greatly increase the memory, cpu and time consumption of the OIV tool, 
but only if the optional flag was on. As the OIV is mainly used to examine the 
FSImage offline rather than to make immense computation, I concluded that this 
is not a feasible feature. I guess if the user wants those folders to be listed 
like in the delimited output, should rather use {{hdfs ls}} command.

Could you confirm whether my observations are valid, [~xiaochen]? I could have 
easily missed the point. Sorry for attracting attention to a not suitable 
feature.

> Allow Delimited PB OIV tool to print out INodeReferences
> --------------------------------------------------------
>
>                 Key: HDFS-13890
>                 URL: https://issues.apache.org/jira/browse/HDFS-13890
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs
>            Reporter: Adam Antal
>            Assignee: Adam Antal
>            Priority: Minor
>
> HDFS-9721 added the possibility to process PB-based FSImages containing 
> snapshots by simply ignoring them. 
> Although the XML tool can provide information about the snapshots, the user 
> may find helpful if this is shown within the Delimited output (in the 
> Delimited format).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to