[ 
https://issues.apache.org/jira/browse/HADOOP-3452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12600436#action_12600436
 ] 

Steve Loughran commented on HADOOP-3452:
----------------------------------------

Scanning for strings is very, very brittle, and not a good way to do system 
management. The fact that it is the only way to verify that rpm and yum are 
working are design errors on the part of those tools, not an example of good 
programming to follow. 

- At the very least NameNodeFsck should offer public constants for the status 
strings, rather than this:

replace "Status: " + (isHealthy() ? "HEALTHY" : "CORRUPT"))



The client could then look for NameNodeFsck.STATUS_HEALTHY, a string that would 
(currently) be "Status: HEALTHY" when all was well.

-it would be better for the servlet response to include an HTTP error code 
(500?) on corruption, though that leads to two problems
 -you need to buffer the output if you want to change the error code
 -java.net is atrocious at accessing the contents of error pages

Looking at NameNodeFsck, I think it would be good to remove all knowledge of 
the fact it is running under a servlet from its code -that is "view", not 
"model. This would give us the option of using alternate ways to invoke 
filesystem checks than http requests.

> fsck exit code would be better if non-zero when FS corrupt
> ----------------------------------------------------------
>
>                 Key: HADOOP-3452
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3452
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Pete Wyckoff
>            Priority: Minor
>             Fix For: 0.18.0
>
>         Attachments: HADOOP-3452-1.patch
>
>
> fsck exit code would be better if behaved like other sys admin tools and exit 
> code indicated healthy/corrupt or other  errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to