[ https://issues.apache.org/jira/browse/HADOOP-11433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14257966#comment-14257966 ]
Akira AJISAKA commented on HADOOP-11433: ---------------------------------------- Thanks [~xieliang007] for the report and the patch. Mostly looks good to me. One suggestion: {code} + if (!hasSetZooKeeper.await(zkSessionTimeout, TimeUnit.MILLISECONDS)) { + throw new NullPointerException("zk is not set yet!"); + } {code} Since there are no null references, would you use IllegalStateException instead of NullPointerException? > 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)