[ 
https://issues.apache.org/jira/browse/HADOOP-18362?focusedWorklogId=795108&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-795108
 ]

ASF GitHub Bot logged work on HADOOP-18362:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Jul/22 03:06
            Start Date: 26/Jul/22 03:06
    Worklog Time Spent: 10m 
      Work Description: MEILIDEKCL opened a new pull request, #4625:
URL: https://github.com/apache/hadoop/pull/4625

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   After modifying the ZKFailoverController.java, we will get clear information.
   Running org.apache.hadoop.ha.TestZKFailoverController when 
hadoop.security.groups.cache.secs is zero or negative number, it will throw 
clear Exception like below.
   
   [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
0.904 s <<< FAILURE! - in org.apache.hadoop.ha.TestZKFailoverController
   [ERROR] 
testGracefulFailoverMultipleZKfcs(org.apache.hadoop.ha.TestZKFailoverController)
 Time elapsed: 0.724 s <<< ERROR!
   java.lang.IllegalArgumentException: duration must be positive: 0 MILLISECONDS
   at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115)
   at 
com.google.common.cache.CacheBuilder.refreshAfterWrite(CacheBuilder.java:633)
   
   ### How was this patch tested?
   
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 795108)
    Time Spent: 0.5h  (was: 20m)

> Running org.apache.hadoop.ha.TestZKFailoverController when 
> "hadoop.security.groups.cache.secs" is zero or negative numbers will throw 
> ambiguous exception
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-18362
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18362
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.10.2
>         Environment: Linux version 4.15.0-142-generic 
> (buildd@lgw01-amd64-039) (gcc version 5.4.0 20160609 (Ubuntu 
> 5.4.0-6ubuntu1~16.04.12))
>            Reporter: Jingxuan Fu
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> {quote}<property>
>   <name>hadoop.security.groups.cache.secs</name>
>   <value>300</value>
>   <description>
>     This is the config controlling the validity of the entries in the cache
>     containing the user->group mapping. When this duration has expired,
>     then the implementation of the group mapping provider is invoked to get
>     the groups of the user and then cached back.
>   </description>
> </property>
> {quote}
> As we see  in core-default.xml of hadoop.security.groups.cache.secs,  the 
> default value is 300. But when we set it to zero or negative number and  then 
> run 
> org.apache.hadoop.ha.TestZKFailoverController#testGracefulFailoverMultipleZKfcs,
>  it will throw NullPointerException as below:
> {quote}{{[INFO] Running org.apache.hadoop.ha.TestZKFailoverController}}
> {{[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
> 0.932 s <<< FAILURE! - in org.apache.hadoop.ha.TestZKFailoverController}}
> {{[ERROR] 
> testGracefulFailoverMultipleZKfcs(org.apache.hadoop.ha.TestZKFailoverController)
>   Time elapsed: 0.799 s  <<< ERROR!}}
> {{java.lang.NullPointerException}}
> {{        at 
> org.apache.hadoop.ha.ZKFailoverController.run(ZKFailoverController.java:188)}}
> {{        at 
> org.apache.hadoop.ha.MiniZKFCCluster.start(MiniZKFCCluster.java:116)}}
> {{        at 
> org.apache.hadoop.ha.TestZKFailoverController.testGracefulFailoverMultipleZKfcs(TestZKFailoverController.java:581)}}
> {{        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)}}
> {{        at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)}}
> {{        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)}}
> {{        at java.lang.reflect.Method.invoke(Method.java:498)}}
> {{        at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)}}
> {{        at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)}}
> {{        at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)}}
> {{        at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)}}
> {{        at 
> org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:55)}}
> {{        at 
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)}}
> {{        at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)}}
> {{        at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:53)}}
> {{        at 
> org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)}}
> {{        at 
> org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)}}
> {{        at java.util.concurrent.FutureTask.run(FutureTask.java:266)}}
> {{        at java.lang.Thread.run(Thread.java:748)}}
> {quote}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to