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

Leslin (Hong Xiang Lin) commented on FLUME-1216:
------------------------------------------------

Hi, Mike
I reproduced this defect with MIT Kerberos security.  There are two ways to 
give useful message about keytab missing. 

1. Just log this error and return false in HDFSEventSink#authenticate() like 
below. This way is consistent with kerbConfPrincipal.isEmpty() or 
kerbKeytab.isEmpty().  And HDFSEventSink will not fail. 
    LOG.error("The keyTab file: " + kerbKeytab + " is nonexistent or can't 
read."
    + " Please specify a keytab to use for Kerberos auth. with read access");
    return false;

2. Do keytab file check with this precondition, this will thrown exception and 
failed immediately. I prefer to this way as it may help user figure out the 
problem quickly if users already setup Hadoop with security. 
    File kfile = new File(kerbKeytab);
    Preconditions.checkArgument(kfile.canRead(), "The keyTab file: %s is 
nonexistent or can't read.", kerbKeytab );

What's your opinion?  Can I take this JIRA?  Thank you!

Regards
Leslin
                
> Need useful error message when keytab does not exist
> ----------------------------------------------------
>
>                 Key: FLUME-1216
>                 URL: https://issues.apache.org/jira/browse/FLUME-1216
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>            Reporter: Mike Percy
>
> If keytab file does not exist, no useful error message is printed by HDFS sink

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to