You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2015/05/11 20:57:02 UTC
[jira] [Commented] (HBASE-13663) HMaster fails to restart 'HMaster:
Failed to become active master'
[ https://issues.apache.org/jira/browse/HBASE-13663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14538436#comment-14538436 ]
Ted Yu commented on HBASE-13663:
--------------------------------
Here is related code where NPE happened:
{code}
for (HRegionLocation hrl : locations) {
HRegionInfo regionInfo = hrl.getRegionInfo();
{code}
In this case hrl was null.
>From MetaTableAccessor#getRegionLocations():
{code}
// In case the region replica is newly created, it's location might be null. We usually do not
// have HRL's in RegionLocations object with null ServerName. They are handled as null HRLs.
if (location == null || location.getServerName() == null) {
locations.add(null);
{code}
This means that it was possible for null HRegionLocation to appear in the return value.
Attached is patch which handles this situation.
> HMaster fails to restart 'HMaster: Failed to become active master'
> ------------------------------------------------------------------
>
> Key: HBASE-13663
> URL: https://issues.apache.org/jira/browse/HBASE-13663
> Project: HBase
> Issue Type: Bug
> Components: hbase
> Affects Versions: 1.1.0
> Reporter: Romil Choksi
> Assignee: Ted Yu
>
> HMaster fails to restart 'HMaster: Failed to become active master'
> from Master log:
> {code}
> 2015-05-08 11:25:14,020 FATAL [MasterNOde:16000.activeMasterManager] master.HMaster: Failed to become active master
> java.lang.NullPointerException
> at org.apache.hadoop.hbase.master.AssignmentManager.rebuildUserRegions(AssignmentManager.java:2885)
> at org.apache.hadoop.hbase.master.AssignmentManager.joinCluster(AssignmentManager.java:483)
> at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:763)
> at org.apache.hadoop.hbase.master.HMaster.access$500(HMaster.java:182)
> at org.apache.hadoop.hbase.master.HMaster$1.run(HMaster.java:1632)
> at java.lang.Thread.run(Thread.java:745)
> 2015-05-08 11:25:14,023 FATAL [MasterNOde:16000.activeMasterManager] master.HMaster: Master server abort: loaded coprocessors are: []
> 2015-05-08 11:25:14,023 FATAL [MasterNOde:16000.activeMasterManager] master.HMaster: Unhandled exception. Starting shutdown.
> java.lang.NullPointerException
> at org.apache.hadoop.hbase.master.AssignmentManager.rebuildUserRegions(AssignmentManager.java:2885)
> at org.apache.hadoop.hbase.master.AssignmentManager.joinCluster(AssignmentManager.java:483)
> at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:763)
> at org.apache.hadoop.hbase.master.HMaster.access$500(HMaster.java:182)
> at org.apache.hadoop.hbase.master.HMaster$1.run(HMaster.java:1632)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)