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

ASF GitHub Bot commented on EAGLE-104:
--------------------------------------

Github user pmujumdar commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/43#issuecomment-170839212
  
    @sunlibin Thanks for the feedback.
    I see there are a bunch of regex checks already in that code path. But this 
is called on every log entry, fair enough. I updated the patch to restore the 
old code and added the missing case for non-kerberos principal.
    Also since removed some of the trim() methods which are not really needed 
which should help the performance a bit more.
    Rebased the branch and ran tests successfully in parent directory 
eagle-security. Fixed a couple of license header issues that hit on latest 
master.


> Fix the unit test TestHDFSSecuritylogParser  
> ---------------------------------------------
>
>                 Key: EAGLE-104
>                 URL: https://issues.apache.org/jira/browse/EAGLE-104
>             Project: Eagle
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Prasad Mujumdar
>         Attachments: EAGLE-104.1.patch
>
>
> The test fails with following error
> {noformat}
> java.lang.StringIndexOutOfBoundsException">
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at
> java.lang.String.substring(String.java:1911) at
> org.apache.eagle.security.util.LogParseUtil.parseUserFromUGI(LogParseUtil.java:39)
> at
> org.apache.eagle.security.securitylog.parse.HDFSSecurityLogParser.parseAttr(HDFSSecurityLogParser.java:78)
> at
> org.apache.eagle.security.securitylog.parse.HDFSSecurityLogParser.parse(HDFSSecurityLogParser.java:52)
> at
> org.apache.eagle.security.TestHDFSSecuritylogParser.test(TestHDFSSecuritylogParser.java:36)
> {noformat}
> Looks like the problem is that the UGI parsing method is not handling the 
> simple authentication scenario where user name is not a kerberos principal. 



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

Reply via email to