[
https://issues.apache.org/jira/browse/HBASE-21004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16568701#comment-16568701
]
stack commented on HBASE-21004:
-------------------------------
.002 TestZooKeeper seems flakey. It passes locally. Stole the below from
HBASE-20159 to fix the TestMasterShutdown. Fixed checkstyle.
{code}
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index 9bb12c1fe1..c157e37eac 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -546,18 +552,20 @@ public class HMaster extends HRegionServer implements
MasterServices {
public void run() {
try {
if (!conf.getBoolean("hbase.testing.nocluster", false)) {
- try {
- int infoPort = putUpJettyServer();
- startActiveMasterManager(infoPort);
- } catch (Throwable t) {
- // Make sure we log the exception.
- String error = "Failed to become Active Master";
- LOG.error(error, t);
- // Abort should have been called already.
- if (!isAborted()) {
- abort(error, t);
+ Threads.setDaemonThreadRunning(new Thread(() -> {
+ try {
+ int infoPort = putUpJettyServer();
+ startActiveMasterManager(infoPort);
+ } catch (Throwable t) {
+ // Make sure we log the exception.
+ String error = "Failed to become Active Master";
+ LOG.error(error, t);
+ // Abort should have been called already.
+ if (!isAborted()) {
+ abort(error, t);
+ }
}
- }
+ }));
}
// Fall in here even if we have been aborted. Need to run the shutdown
services and
// the super run call will do this for us.
{code}
> Backport to branch-2.0 HBASE-20708 "Remove the usage of RecoverMetaProcedure"
> -----------------------------------------------------------------------------
>
> Key: HBASE-21004
> URL: https://issues.apache.org/jira/browse/HBASE-21004
> Project: HBase
> Issue Type: Sub-task
> Components: amv2
> Reporter: stack
> Assignee: stack
> Priority: Major
> Fix For: 2.0.2
>
> Attachments: HBASE-21004.branch-2.0.001.patch,
> HBASE-21004.branch-2.0.002.patch
>
>
> Backport parent issue to branch-2.0.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)