You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2011/09/24 19:49:26 UTC
[jira] [Created] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
TestMasterFailover failure in Hbase-0.92#17
-------------------------------------------
Key: HBASE-4479
URL: https://issues.apache.org/jira/browse/HBASE-4479
Project: HBase
Issue Type: Bug
Reporter: ramkrishna.s.vasudevan
Assignee: ramkrishna.s.vasudevan
Priority: Minor
When the master restarted it was not able to get any servers online and the restart was a clean restart.
Hence there were no regions to assign.
Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "ramkrishna.s.vasudevan (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4479:
------------------------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4479.patch
>
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "ramkrishna.s.vasudevan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119347#comment-13119347 ]
ramkrishna.s.vasudevan commented on HBASE-4479:
-----------------------------------------------
@Ted
Testcases are running now. Will submit the patch once done.
The fix is just a one line fix. Correct me if this will not be ok.
In assignAllUserRegions() just
{code}
List<ServerName> servers = serverManager.getOnlineServersList();
+ if(servers.size() == 0) return;
{code}
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "Ted Yu (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120040#comment-13120040 ]
Ted Yu commented on HBASE-4479:
-------------------------------
+1 on patch.
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4479.patch
>
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "Ted Yu (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119264#comment-13119264 ]
Ted Yu commented on HBASE-4479:
-------------------------------
The above analysis makes sense.
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "ramkrishna.s.vasudevan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119258#comment-13119258 ]
ramkrishna.s.vasudevan commented on HBASE-4479:
-----------------------------------------------
As per my analysis
When a master tries to come up and due to ZK exception if fails and we call abort where we try once again if things get back to normal.
{code}
if (t != null && t instanceof KeeperException.SessionExpiredException) {
try {
LOG.info("Primary Master trying to recover from ZooKeeper session " +
"expiry.");
return !tryRecoveringExpiredZKSession();
} catch (Throwable newT) {
LOG.error("Primary master encountered unexpected exception while " +
"trying to recover from ZooKeeper session" +
" expiry. Proceeding with server abort.", newT);
}
}
{code}
Here we try to assign the ROOT and META and the RS hosting it may not be online that time.
So carry on with processRIT and this being a clean cluster startup we try to assignAllUserRegions().
As part of which we try to retainAssignment().
Here the no of servers itself is 0 .
{code}
for (ServerName server : servers) {
assignments.put(server, new ArrayList<HRegionInfo>());
}
{code}
assignments.size() = 0.
{code}
else {
int size = assignments.size();
assignments.get(servers.get(RANDOM.nextInt(size))).add(region.getKey());
}
{code}
This throws illegalArgumentException which makes the master to abort.
Though this may be a testcase failure there is a rare chance that this can also happen in real time and the attempt made to bring the master alive due to ZK exception may not work because of this.
Pls correct me if am wrong.
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "ramkrishna.s.vasudevan (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4479:
------------------------------------------
Attachment: HBASE-4479.patch
Kindly review the patch. If it is fine i can commit it.
I have run all the testcases. And all are working fine.
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4479.patch
>
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "ramkrishna.s.vasudevan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119246#comment-13119246 ]
ramkrishna.s.vasudevan commented on HBASE-4479:
-----------------------------------------------
{code}
2011-10-01 06:13:12,255 ERROR [main-EventThread] master.HMaster(1275): Primary master encountered unexpected exception while trying to recover from ZooKeeper session expiry. Proceeding with server abort.
java.lang.IllegalArgumentException: n must be positive
at java.util.Random.nextInt(Random.java:250)
at org.apache.hadoop.hbase.master.DefaultLoadBalancer.retainAssignment(DefaultLoadBalancer.java:590)
at org.apache.hadoop.hbase.master.AssignmentManager.assignAllUserRegions(AssignmentManager.java:1880)
at org.apache.hadoop.hbase.master.AssignmentManager.processRegionsInTransition(AssignmentManager.java:385)
at org.apache.hadoop.hbase.master.AssignmentManager.processRegionsInTransition(AssignmentManager.java:338)
at org.apache.hadoop.hbase.master.HMaster.tryRecoveringExpiredZKSession(HMaster.java:1250)
at org.apache.hadoop.hbase.master.HMaster.abortNow(HMaster.java:1273)
at org.apache.hadoop.hbase.master.HMaster.abort(HMaster.java:1212)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.connectionEvent(ZooKeeperWatcher.java:324)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.process(ZooKeeperWatcher.java:242)
at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:530)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:506)
2011-10-01 06:13:12,255 FATAL [main-EventThread] master.HMaster(1213): master:42546-0x132be1ce3a00009 master:42546-0x132be1ce3a00009 received expired from ZooKeeper, aborting
org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired
at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.connectionEvent(ZooKeeperWatcher.java:324)
at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.process(ZooKeeperWatcher.java:242)
at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:530)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:506)
2011-10-01 06:13:12,256 INFO [main-EventThread] master.HMaster(1343): Aborting
{code}
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120724#comment-13120724 ]
Hudson commented on HBASE-4479:
-------------------------------
Integrated in HBase-0.92 #44 (See [https://builds.apache.org/job/HBase-0.92/44/])
HBASE-4479 TestMasterFailover failure in Hbase-0.92#17 (Ram)
ramkrishna :
Files :
* /hbase/branches/0.92/CHANGES.txt
* /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4479.patch
>
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "ramkrishna.s.vasudevan (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119234#comment-13119234 ]
ramkrishna.s.vasudevan commented on HBASE-4479:
-----------------------------------------------
The same problem is observed in HBase-Trunk build #2276
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120769#comment-13120769 ]
Hudson commented on HBASE-4479:
-------------------------------
Integrated in HBase-TRUNK #2295 (See [https://builds.apache.org/job/HBase-TRUNK/2295/])
HBASE-4479 TestMasterFailover failure in Hbase-0.92#17(Ram)
ramkrishna :
Files :
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4479.patch
>
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "Lars Hofhansl (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120665#comment-13120665 ]
Lars Hofhansl commented on HBASE-4479:
--------------------------------------
+1 looks good to me
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Attachments: HBASE-4479.patch
>
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (HBASE-4479) TestMasterFailover failure in
Hbase-0.92#17
Posted by "ramkrishna.s.vasudevan (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HBASE-4479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ramkrishna.s.vasudevan updated HBASE-4479:
------------------------------------------
Fix Version/s: 0.92.0
Hadoop Flags: Reviewed
Status: Patch Available (was: Open)
Integrated to trunk and 0.92.
Thanks for the review Ted and Lars.
> TestMasterFailover failure in Hbase-0.92#17
> -------------------------------------------
>
> Key: HBASE-4479
> URL: https://issues.apache.org/jira/browse/HBASE-4479
> Project: HBase
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
> Priority: Minor
> Fix For: 0.92.0
>
> Attachments: HBASE-4479.patch
>
>
> When the master restarted it was not able to get any servers online and the restart was a clean restart.
> Hence there were no regions to assign.
> Hence the retainAssignment tries to get one of the regions and uses RANDOM.getInt(size). Here size is 0.
> So ideally 0 is not accepted here. Hence we have got an exception making the master not to come up and the test case timeout.
> Though we need to see if really no regions was expected when the master came up, but this JIRA's intent is to deal such scenario where the size can be 0.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira