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

Liang Xie commented on HADOOP-11433:
------------------------------------

bq. Since there are no null references
Once "hasSetZooKeeper.await(zkSessionTimeout, TimeUnit.MILLISECONDS)" is 
"false", the "zk" will be null, so the following statement 
"ActiveStandbyElector.this.processWatchEvent(zk, event)" will throw a NPE.
I think my fix does not change any semantics, and same with the current impl.
If thow an ISE, i am not sure is there any side effect or not:)

> Fix the new findbugs warning from NetUtils&ActiveStandbyElector
> ---------------------------------------------------------------
>
>                 Key: HADOOP-11433
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11433
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: ha, net
>    Affects Versions: 2.7.0
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>            Priority: Minor
>         Attachments: HADOOP-11433-001.txt
>
>
> see 
> https://builds.apache.org/job/PreCommit-HADOOP-Build/5309//artifact/patchprocess/newPatchFindbugsWarningshadoop-common.html
>  :
> {code}
> Correctness Warnings
> Code  Warning
> RV    Return value of java.util.concurrent.CountDownLatch.await(long, 
> TimeUnit) ignored in 
> org.apache.hadoop.ha.ActiveStandbyElector$WatcherWithClientRef.process(WatchedEvent)
> Multithreaded correctness Warnings
> Code  Warning
> AT    Sequence of calls to java.util.concurrent.ConcurrentHashMap may not be 
> atomic in org.apache.hadoop.net.NetUtils.canonicalizeHost(String)
> Bug type AT_OPERATION_SEQUENCE_ON_CONCURRENT_ABSTRACTION (click for details) 
> In class org.apache.hadoop.net.NetUtils
> In method org.apache.hadoop.net.NetUtils.canonicalizeHost(String)
> Type java.util.concurrent.ConcurrentHashMap
> Called method java.util.concurrent.ConcurrentHashMap.put(Object, Object)
> At NetUtils.java:[line 291]
> {code}



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

Reply via email to