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

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

Github user yonzhang commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/43#issuecomment-170804388
  
    I run this unit test in my local and observed the following errors
    
-------------------------------------------------------------------------------
    Test set: org.apache.eagle.security.TestHDFSSecuritylogParser
    
-------------------------------------------------------------------------------
    Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.404 sec 
<<< FAILURE!
    testSimpleAuth(org.apache.eagle.security.TestHDFSSecuritylogParser)  Time 
elapsed: 0.002 sec  <<< ERROR!
    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.verifyParserAttributes(TestHDFSSecuritylogParser.java:63)
            at 
org.apache.eagle.security.TestHDFSSecuritylogParser.testSimpleAuth(TestHDFSSecuritylogParser.java:38)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
            at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
            at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
            at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
            at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
            at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
            at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
            at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
            at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
            at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
            at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
            at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
            at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
            at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
            at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
            at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)


> 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