[ https://issues.apache.org/jira/browse/HBASE-13314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14376882#comment-14376882 ]
Hadoop QA commented on HBASE-13314: ----------------------------------- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12706716/HBASE-13314-v1.patch against master branch at commit 65d3781897baf05ef583fce3b5e8e08cd6228f35. ATTACHMENT ID: 12706716 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 hadoop versions{color}. The patch compiles with all supported hadoop versions (2.4.1 2.5.2 2.6.0) {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 checkstyle{color}. The applied patch does not increase the total number of checkstyle errors {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn site goal succeeds with this patch. {color:green}+1 core tests{color}. The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-rest.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/newPatchFindbugsWarningshbase-annotations.html Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//artifact/patchprocess/checkstyle-aggregate.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/13375//console This message is automatically generated. > Fix NPE in HMaster.getClusterStatus() > ------------------------------------- > > Key: HBASE-13314 > URL: https://issues.apache.org/jira/browse/HBASE-13314 > Project: HBase > Issue Type: Bug > Reporter: Matteo Bertozzi > Assignee: Matteo Bertozzi > Priority: Minor > Attachments: HBASE-13314-v0.patch, HBASE-13314-v1.patch, > HBASE-13314-v1.patch > > > On a test cluster we got a > {noformat} > java.lang.NullPointerException > at > org.apache.hadoop.hbase.master.HMaster.getClusterStatus(HMaster.java:1742) > at > org.apache.hadoop.hbase.master.balancer.ClusterStatusChore.chore(ClusterStatusChore.java:50) > at org.apache.hadoop.hbase.Chore.run(Chore.java:87) > {noformat} > In HMaster.getClusterStatus() we have a couple of NPE. > listChildrenNoWatch() may return null if the node is not found > {code} > try { > backupMasterStrings = ZKUtil.listChildrenNoWatch(this.zooKeeper, > this.zooKeeper.backupMasterAddressesZNode); <--- THIS MAY RETURN NULL > } catch (KeeperException e) { > LOG.warn(this.zooKeeper.prefix("Unable to list backup servers"), e); > backupMasterStrings = new ArrayList<String>(0); > } > List<ServerName> backupMasters = new ArrayList<ServerName>( > backupMasterStrings.size()); <--- WE DON'T CHECK FOR NULL > {code} > then below, we build ClusterStatus with args that may be null > {code} > String clusterId = fileSystemManager != null ? > fileSystemManager.getClusterId().toString() : null; > Map<String, RegionState> regionsInTransition = assignmentManager != null ? > assignmentManager.getRegionStates().getRegionsInTransition() : null; > String[] coprocessors = cpHost != null ? getMasterCoprocessors() : null; > Map<ServerName, ServerLoad> onlineServers = null; > Set<ServerName> deadServers = null; > if (serverManager != null) { > deadServers = serverManager.getDeadServers().copyServerNames(); > onlineServers = serverManager.getOnlineServers(); > } > return new ClusterStatus(VersionInfo.getVersion(), clusterId, > onlineServers, deadServers, serverName, backupMasters, > regionsInTransition, coprocessors, balancerOn); > {code} > In ClusterStatus equals(), hashCode(), toString() we don't check for nulls -- This message was sent by Atlassian JIRA (v6.3.4#6332)