commit 2bd0f373255668ceb58a6913a0fcd5eb58327e24 Author: Virag Kothari Date: Tue Sep 30 21:00:15 2014 -0700 preMasterInitialization() cp hook at wrong place 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 3d474f2..b16de57 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 @@ -499,7 +499,16 @@ public class HMaster extends HRegionServer implements MasterServices, Server { * Note, there may be dross in zk from previous runs; it'll get addressed * below after we determine if cluster startup or failover. */ + this.cpHost = new MasterCoprocessorHost(this, this.conf); + if (this.cpHost != null) { + try { + this.cpHost.preMasterInitialization(); + } catch (IOException e) { + LOG.error("Coprocessor preMasterInitialization() hook failed", e); + } + } + status.setStatus("Initializing Master file system"); this.masterActiveTime = System.currentTimeMillis(); @@ -529,8 +538,7 @@ public class HMaster extends HRegionServer implements MasterServices, Server { // initialize master side coprocessors before we start handling requests status.setStatus("Initializing master coprocessors"); - this.cpHost = new MasterCoprocessorHost(this, this.conf); - + // start up all service threads. status.setStatus("Initializing master service threads"); startServiceThreads(); @@ -629,14 +637,6 @@ public class HMaster extends HRegionServer implements MasterServices, Server { status.setStatus("Starting quota manager"); initQuotaManager(); - if (this.cpHost != null) { - try { - this.cpHost.preMasterInitialization(); - } catch (IOException e) { - LOG.error("Coprocessor preMasterInitialization() hook failed", e); - } - } - status.markComplete("Initialization successful"); LOG.info("Master has completed initialization"); initialized = true;