[jira] [Updated] (HBASE-13314) Fix NPE in HMaster.getClusterStatus()
[ https://issues.apache.org/jira/browse/HBASE-13314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matteo Bertozzi updated HBASE-13314: Resolution: Fixed Fix Version/s: 1.1.0 1.0.1 2.0.0 Status: Resolved (was: Patch Available) > 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 > Fix For: 2.0.0, 1.0.1, 1.1.0 > > 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(0); > } > List backupMasters = new ArrayList( > 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 regionsInTransition = assignmentManager != null ? > assignmentManager.getRegionStates().getRegionsInTransition() : null; > String[] coprocessors = cpHost != null ? getMasterCoprocessors() : null; > Map onlineServers = null; > Set 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)
[jira] [Updated] (HBASE-13314) Fix NPE in HMaster.getClusterStatus()
[ https://issues.apache.org/jira/browse/HBASE-13314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matteo Bertozzi updated HBASE-13314: Attachment: HBASE-13314-v1.patch > 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(0); > } > List backupMasters = new ArrayList( > 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 regionsInTransition = assignmentManager != null ? > assignmentManager.getRegionStates().getRegionsInTransition() : null; > String[] coprocessors = cpHost != null ? getMasterCoprocessors() : null; > Map onlineServers = null; > Set 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)
[jira] [Updated] (HBASE-13314) Fix NPE in HMaster.getClusterStatus()
[ https://issues.apache.org/jira/browse/HBASE-13314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matteo Bertozzi updated HBASE-13314: Attachment: HBASE-13314-v1.patch > 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 > > > 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(0); > } > List backupMasters = new ArrayList( > 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 regionsInTransition = assignmentManager != null ? > assignmentManager.getRegionStates().getRegionsInTransition() : null; > String[] coprocessors = cpHost != null ? getMasterCoprocessors() : null; > Map onlineServers = null; > Set 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)
[jira] [Updated] (HBASE-13314) Fix NPE in HMaster.getClusterStatus()
[ https://issues.apache.org/jira/browse/HBASE-13314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matteo Bertozzi updated HBASE-13314: Status: Patch Available (was: Open) > 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 > > > 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(0); > } > List backupMasters = new ArrayList( > 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 regionsInTransition = assignmentManager != null ? > assignmentManager.getRegionStates().getRegionsInTransition() : null; > String[] coprocessors = cpHost != null ? getMasterCoprocessors() : null; > Map onlineServers = null; > Set 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)
[jira] [Updated] (HBASE-13314) Fix NPE in HMaster.getClusterStatus()
[ https://issues.apache.org/jira/browse/HBASE-13314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matteo Bertozzi updated HBASE-13314: Attachment: HBASE-13314-v0.patch > 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 > > > 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(0); > } > List backupMasters = new ArrayList( > 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 regionsInTransition = assignmentManager != null ? > assignmentManager.getRegionStates().getRegionsInTransition() : null; > String[] coprocessors = cpHost != null ? getMasterCoprocessors() : null; > Map onlineServers = null; > Set 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)