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

Steve Loughran commented on HADOOP-9939:
----------------------------------------

At a first glance I'm not sure that a single exception handler for the whole of 
hadoop makes sense -and if it did, you'd have to justify why it was only 
applied to one error in one individual class. Some specific auth failure 
handler seems a lot cleaner than just log/book-keep handling, as you may want 
to do more sophisticated actions on such an event.

Before worrying about that, my real question is more fundamental: *why not just 
use log4j for this?*

You can set up L4J to have different appenders, including machine readable ones 
(we have a JSON logger, there's the remote logging for chainsaw, etc). I think 
you could define a handler that does what you want simply by adding the 
relevant (custom) log4j appenders/handlers and configuring your log4j 
properties.

What may be useful here is to have a specific logger for auth problems, 
ugi.AUTH_FAILURE, which you'd then configure in Log4J for these specific 
problems. Have a look at how we did this in {{Configuration}} for deprecation 
messages as an example.
                
> Custom Processing for Errors
> ----------------------------
>
>                 Key: HADOOP-9939
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9939
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Benoy Antony
>            Assignee: Benoy Antony
>            Priority: Minor
>         Attachments: hadoop-9939.patch
>
>   Original Estimate: 20h
>  Remaining Estimate: 20h
>
> We have a use case where we want to display different error message and take 
> some bookkeeping actions when there is authentication failure in Hadoop.
> There could be  other error cases where we want to associate custom actions 
> message.
> The work  is define a framework to attach custom error processors as part of 
> exception handling . Use that framework to display custom error message for 
> authentication failures.
> Please review and let me know your comments or alternatives.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to