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

Andrew Wang commented on HDFS-6917:
-----------------------------------

Hey Colin, I like the idea of this a lot. These tools would have been really 
useful when I was debugging some cluster issues. Some review comments:

* Can clean up the imports in DebugAdmin, I can tell where it was copy pasted 
from ;)
* Missing some indentation in the super() calls in each command
* Need tests :)

VerifyBlock:
* Hardcoding 7 is okay, but slightly better would be {{2 + 
DataChecksum.HEADER_LEN}}.
* CHECKSUMS_PER_BUF seems kinda large. With 512B per checksum, we're allocating 
a 64MB data buffer. I figure 8MB would be enough to still get good disk perf.
* metaDidRead is unused

RecoverLease:
* Could print the current retry count when sleeping/looping
* I expected the default # of retries to be 0, so the command by default tries 
to do a single recoverLease

> Add an hdfs debug command to validate blocks, call recoverlease, etc.
> ---------------------------------------------------------------------
>
>                 Key: HDFS-6917
>                 URL: https://issues.apache.org/jira/browse/HDFS-6917
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs-client
>    Affects Versions: 2.6.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-6917.001.patch, HDFS-6917.002.patch
>
>
> HDFS should have a debug command which could validate HDFS block files, call 
> recoverLease, and have some other functionality.  These commands would be 
> purely for debugging and would appear under a separate command hierarchy 
> inside the hdfs command.  There would be no guarantee of API stability for 
> these commands and the debug submenu would not be listed by just typing the 
> "hdfs" command.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to