hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1590154 - in /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master: HMaster.java HMasterCommandLine.java
Date Fri, 25 Apr 2014 21:31:42 GMT
Author: stack
Date: Fri Apr 25 21:31:42 2014
New Revision: 1590154

URL: http://svn.apache.org/r1590154
Log:
HBASE-11081 Trunk Master won't start; looking for Constructor that takes conf only

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1590154&r1=1590153&r2=1590154&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Fri
Apr 25 21:31:42 2014
@@ -1752,11 +1752,11 @@ public class HMaster extends HRegionServ
    * @return HMaster instance.
    */
   public static HMaster constructMaster(Class<? extends HMaster> masterClass,
-      final Configuration conf)  {
+      final Configuration conf, final ConsensusProvider cp)  {
     try {
       Constructor<? extends HMaster> c =
-        masterClass.getConstructor(Configuration.class);
-      return c.newInstance(conf);
+        masterClass.getConstructor(Configuration.class, ConsensusProvider.class);
+      return c.newInstance(conf, cp);
     } catch (InvocationTargetException ite) {
       Throwable target = ite.getTargetException() != null?
         ite.getTargetException(): ite;

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java?rev=1590154&r1=1590153&r2=1590154&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMasterCommandLine.java
Fri Apr 25 21:31:42 2014
@@ -37,6 +37,7 @@ import org.apache.hadoop.hbase.LocalHBas
 import org.apache.hadoop.hbase.ZooKeeperConnectionException;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 import org.apache.hadoop.hbase.consensus.ConsensusProvider;
+import org.apache.hadoop.hbase.consensus.ConsensusProviderFactory;
 import org.apache.hadoop.hbase.regionserver.HRegionServer;
 import org.apache.hadoop.hbase.util.JVMClusterUtil;
 import org.apache.hadoop.hbase.util.ServerCommandLine;
@@ -186,7 +187,8 @@ public class HMasterCommandLine extends 
         waitOnMasterThreads(cluster);
       } else {
         logProcessInfo(getConf());
-        HMaster master = HMaster.constructMaster(masterClass, conf);
+        ConsensusProvider cp = ConsensusProviderFactory.getConsensusProvider(conf);
+        HMaster master = HMaster.constructMaster(masterClass, conf, cp);
         if (master.isStopped()) {
           LOG.info("Won't bring the Master up as a shutdown is requested");
           return 1;



Mime
View raw message