Andrew Wang commented on HDFS-11009:

Thanks for the rev Xiao,

bq. Good point. I'm keeping it for consistency with other debug commands: -meta 
for verifyMeta and -path for recoverLease are flagged. Please let me know if 
you feel strongly.

I don't feel strongly, and honestly this pattern is prevalent enough throughout 
other HDFS commands that I think it's better to maintain for consistency.

bq. I don't think BlockScanner would catch this and work, but I tried 
restarting DN locally (in a single DN env), and after FBR the block is readable 
again. It's not a 'divergent state' in this case, just DNs with corrupt 
replicas and good replicas, right?

My concern was that if we regenerate the meta file for a corrupted block, it 
won't show up as corrupted. AFAIK the DN does not compare its checksums against 
other DNs, so we would have a replica that shows as good, but is in fact 
corrupted. If I'm right here, it'd be nice to discuss this a bit in the 

Few other nits:

* Could we fix the verifyMeta help text while we're here to also remove the 
"[]"? The "-block" flag looks required to me.
* "If a block file is specified, we will compute the checksums from the block 
file, and save it to the specified output metadata file." Since it says "If", 
it makes it sound like specifying a block file is optional, but it's actually 

> Add a tool to reconstruct block meta file from CLI
> --------------------------------------------------
>                 Key: HDFS-11009
>                 URL: https://issues.apache.org/jira/browse/HDFS-11009
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>            Reporter: Xiao Chen
>            Assignee: Xiao Chen
>         Attachments: HDFS-11009.01.patch, HDFS-11009.02.patch, 
> HDFS-11009.03.patch
> If the block file on local disk presents, but the meta file is missing, it's 
> theoretically possible to manually restore the meta file and have the block 
> readable.
> This jira is to propose to add such a tool to do that.

This message was sent by Atlassian JIRA

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

Reply via email to