You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eagle.apache.org by pmujumdar <gi...@git.apache.org> on 2015/12/28 22:02:44 UTC

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

GitHub user pmujumdar opened a pull request:

    https://github.com/apache/incubator-eagle/pull/43

    https://issues.apache.org/jira/browse/EAGLE-104

    EAGLE-104: Fix the unit test TestHDFSSecuritylogParser
    The problem is that the UGI parsing method is not handling the simple authentication scenario where user name is not a kerberos principal. The patch is a minor refactoring of the method that parses the ugi.
    Added new testcases to validate the changes.  Ran unit tests, no failures in eagle-security.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pmujumdar/incubator-eagle master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-eagle/pull/43.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #43
    
----
commit 2f79c1f5d1eac076150cfb993e4e0426624f2725
Author: Prasad Mujumdar <pr...@apache.org>
Date:   2015-12-28T20:55:24Z

    EAGLE-104: Fix the unit test TestHDFSSecuritylogParser

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by pmujumdar <gi...@git.apache.org>.
Github user pmujumdar commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/43#issuecomment-171039388
  
    Create new PR #61 per review feedback. Closing this request #43.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by yonzhang <gi...@git.apache.org>.
Github user yonzhang commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/43#issuecomment-171015181
  
    I have run that in my local, it is working fine. But Prasad can you please re-open this pull request with the title prefixed by EAGLE-104 as at backend some script runs based on this naming convention.
    For example the pull request title can be "EAGLE-104 fix unit test bug in hdfs security log parser"
    After that, I will merge this on-behalf-of you


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by pmujumdar <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by pmujumdar <gi...@git.apache.org>.
GitHub user pmujumdar reopened a pull request:

    https://github.com/apache/incubator-eagle/pull/43

    https://issues.apache.org/jira/browse/EAGLE-104

    EAGLE-104: Fix the unit test TestHDFSSecuritylogParser
    The problem is that the UGI parsing method is not handling the simple authentication scenario where user name is not a kerberos principal. The patch is a minor refactoring of the method that parses the ugi.
    Added new testcases to validate the changes.  Ran unit tests, no failures in eagle-security.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pmujumdar/incubator-eagle master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-eagle/pull/43.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #43
    
----
commit baca15928ff846e6b8ab7b9293b5044fa2b70485
Author: Prasad Mujumdar <pr...@apache.org>
Date:   2015-12-28T20:55:24Z

    EAGLE-104: Fix the unit test TestHDFSSecuritylogParser

commit 52ea8c5caed74adb44902c69899968079ab76eba
Author: Prasad Mujumdar <pr...@apache.org>
Date:   2016-01-12T08:12:58Z

    EAGLE-104: Fix the unit test TestHDFSSecuritylogParser. Changes per review feedback, addition minor perf changes

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by pmujumdar <gi...@git.apache.org>.
Github user pmujumdar closed the pull request at:

    https://github.com/apache/incubator-eagle/pull/43


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by pmujumdar <gi...@git.apache.org>.
Github user pmujumdar commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/43#issuecomment-171019875
  
    ah ok. I didn't realize that. sorry about the trouble. 
    will create a new PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by pmujumdar <gi...@git.apache.org>.
Github user pmujumdar closed the pull request at:

    https://github.com/apache/incubator-eagle/pull/43


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by yonzhang <gi...@git.apache.org>.
Github user yonzhang commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/43#issuecomment-171124876
  
    Somehow I have merged this pull request, but this PR is not automatically closed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by sunlibin <gi...@git.apache.org>.
Github user sunlibin commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/43#issuecomment-170817951
  
    @pmujumdar, thanks for the fix, but please make parseUserFromUGI() without regular-expression, because it will affect our performance


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by haoch <gi...@git.apache.org>.
Github user haoch commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/43#issuecomment-170425247
  
    @sunlibin please help review this pull request.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-eagle pull request: https://issues.apache.org/jira/brows...

Posted by yonzhang <gi...@git.apache.org>.
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)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---