hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [01/28] hbase-site git commit: Published site at .
Date Sat, 20 Jan 2018 15:31:21 GMT
Repository: hbase-site
Updated Branches:
  refs/heads/asf-site 16ccb963d -> 90170c417


http://git-wip-us.apache.org/repos/asf/hbase-site/blob/90170c41/testdevapidocs/src-html/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.html
----------------------------------------------------------------------
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.html
b/testdevapidocs/src-html/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.html
index bd24493..23c8ab8 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/master/balancer/TestRegionsOnMasterOptions.html
@@ -58,166 +58,169 @@
 <span class="sourceLineNo">050</span> * Test options for regions on master; none,
system, or any (i.e. master is like any other<a name="line.50"></a>
 <span class="sourceLineNo">051</span> * regionserver). Checks how regions are
deployed when each of the options are enabled.<a name="line.51"></a>
 <span class="sourceLineNo">052</span> * It then does kill combinations to make
sure the distribution is more than just for startup.<a name="line.52"></a>
-<span class="sourceLineNo">053</span> */<a name="line.53"></a>
-<span class="sourceLineNo">054</span>@Category({MediumTests.class})<a name="line.54"></a>
-<span class="sourceLineNo">055</span>public class TestRegionsOnMasterOptions
{<a name="line.55"></a>
-<span class="sourceLineNo">056</span>  private static final Logger LOG = LoggerFactory.getLogger(TestRegionsOnMasterOptions.class);<a
name="line.56"></a>
-<span class="sourceLineNo">057</span>  @Rule public TestName name = new TestName();<a
name="line.57"></a>
-<span class="sourceLineNo">058</span>  @Rule public final TestRule timeout =
CategoryBasedTimeout.builder().withTimeout(this.getClass()).<a name="line.58"></a>
-<span class="sourceLineNo">059</span>    withLookingForStuckThread(true).build();<a
name="line.59"></a>
-<span class="sourceLineNo">060</span>  private final static HBaseTestingUtility
TEST_UTIL = new HBaseTestingUtility();<a name="line.60"></a>
-<span class="sourceLineNo">061</span>  private Configuration c;<a name="line.61"></a>
-<span class="sourceLineNo">062</span>  private String tablesOnMasterOldValue;<a
name="line.62"></a>
-<span class="sourceLineNo">063</span>  private String systemTablesOnMasterOldValue;<a
name="line.63"></a>
-<span class="sourceLineNo">064</span>  private static final int SLAVES = 3;<a
name="line.64"></a>
-<span class="sourceLineNo">065</span>  private static final int MASTERS = 2;<a
name="line.65"></a>
-<span class="sourceLineNo">066</span>  // Make the count of REGIONS high enough
so I can distingush case where master is only carrying<a name="line.66"></a>
-<span class="sourceLineNo">067</span>  // system regions from the case where
it is carrying any region; i.e. 2 system regions vs more<a name="line.67"></a>
-<span class="sourceLineNo">068</span>  // if user + system.<a name="line.68"></a>
-<span class="sourceLineNo">069</span>  private static final int REGIONS = 12;<a
name="line.69"></a>
-<span class="sourceLineNo">070</span>  private static final int SYSTEM_REGIONS
= 2; // ns and meta -- no acl unless enabled.<a name="line.70"></a>
-<span class="sourceLineNo">071</span><a name="line.71"></a>
-<span class="sourceLineNo">072</span>  @Before<a name="line.72"></a>
-<span class="sourceLineNo">073</span>  public void setup() {<a name="line.73"></a>
-<span class="sourceLineNo">074</span>    this.c = TEST_UTIL.getConfiguration();<a
name="line.74"></a>
-<span class="sourceLineNo">075</span>    this.tablesOnMasterOldValue = c.get(LoadBalancer.TABLES_ON_MASTER);<a
name="line.75"></a>
-<span class="sourceLineNo">076</span>    this.systemTablesOnMasterOldValue =
c.get(LoadBalancer.SYSTEM_TABLES_ON_MASTER);<a name="line.76"></a>
-<span class="sourceLineNo">077</span>  }<a name="line.77"></a>
-<span class="sourceLineNo">078</span><a name="line.78"></a>
-<span class="sourceLineNo">079</span>  @After<a name="line.79"></a>
-<span class="sourceLineNo">080</span>  public void tearDown() {<a name="line.80"></a>
-<span class="sourceLineNo">081</span>    unset(LoadBalancer.TABLES_ON_MASTER,
this.tablesOnMasterOldValue);<a name="line.81"></a>
-<span class="sourceLineNo">082</span>    unset(LoadBalancer.SYSTEM_TABLES_ON_MASTER,
this.systemTablesOnMasterOldValue);<a name="line.82"></a>
-<span class="sourceLineNo">083</span>  }<a name="line.83"></a>
-<span class="sourceLineNo">084</span><a name="line.84"></a>
-<span class="sourceLineNo">085</span>  private void unset(final String key, final
String value) {<a name="line.85"></a>
-<span class="sourceLineNo">086</span>    if (value == null) {<a name="line.86"></a>
-<span class="sourceLineNo">087</span>      c.unset(key);<a name="line.87"></a>
-<span class="sourceLineNo">088</span>    } else {<a name="line.88"></a>
-<span class="sourceLineNo">089</span>      c.set(key, value);<a name="line.89"></a>
-<span class="sourceLineNo">090</span>    }<a name="line.90"></a>
-<span class="sourceLineNo">091</span>  }<a name="line.91"></a>
-<span class="sourceLineNo">092</span><a name="line.92"></a>
-<span class="sourceLineNo">093</span>  @Test<a name="line.93"></a>
-<span class="sourceLineNo">094</span>  public void testRegionsOnAllServers()
throws Exception {<a name="line.94"></a>
-<span class="sourceLineNo">095</span>    c.setBoolean(LoadBalancer.TABLES_ON_MASTER,
true);<a name="line.95"></a>
-<span class="sourceLineNo">096</span>    c.setBoolean(LoadBalancer.SYSTEM_TABLES_ON_MASTER,
false);<a name="line.96"></a>
-<span class="sourceLineNo">097</span>    int rsCount = (REGIONS + SYSTEM_REGIONS)/(SLAVES
+ 1/*Master*/);<a name="line.97"></a>
-<span class="sourceLineNo">098</span>    checkBalance(rsCount, rsCount);<a
name="line.98"></a>
-<span class="sourceLineNo">099</span>  }<a name="line.99"></a>
-<span class="sourceLineNo">100</span><a name="line.100"></a>
-<span class="sourceLineNo">101</span>  @Test<a name="line.101"></a>
-<span class="sourceLineNo">102</span>  public void testNoRegionOnMaster() throws
Exception {<a name="line.102"></a>
-<span class="sourceLineNo">103</span>    c.setBoolean(LoadBalancer.TABLES_ON_MASTER,
false);<a name="line.103"></a>
-<span class="sourceLineNo">104</span>    c.setBoolean(LoadBalancer.SYSTEM_TABLES_ON_MASTER,
false);<a name="line.104"></a>
-<span class="sourceLineNo">105</span>    int rsCount = (REGIONS + SYSTEM_REGIONS)/SLAVES;<a
name="line.105"></a>
-<span class="sourceLineNo">106</span>    checkBalance(0, rsCount);<a name="line.106"></a>
-<span class="sourceLineNo">107</span>  }<a name="line.107"></a>
-<span class="sourceLineNo">108</span><a name="line.108"></a>
-<span class="sourceLineNo">109</span>  @Ignore // Fix this. The Master startup
doesn't allow Master reporting as a RegionServer, not<a name="line.109"></a>
-<span class="sourceLineNo">110</span>  // until way late after the Master startup
finishes. Needs more work.<a name="line.110"></a>
-<span class="sourceLineNo">111</span>  @Test<a name="line.111"></a>
-<span class="sourceLineNo">112</span>  public void testSystemTablesOnMaster()
throws Exception {<a name="line.112"></a>
-<span class="sourceLineNo">113</span>    c.setBoolean(LoadBalancer.TABLES_ON_MASTER,
true);<a name="line.113"></a>
-<span class="sourceLineNo">114</span>    c.setBoolean(LoadBalancer.SYSTEM_TABLES_ON_MASTER,
true);<a name="line.114"></a>
-<span class="sourceLineNo">115</span>    // IS THIS SHORT-CIRCUIT RPC? Yes. Here
is how it looks currently if I have an exception<a name="line.115"></a>
-<span class="sourceLineNo">116</span>    // thrown in doBatchMutate inside a
Region.<a name="line.116"></a>
-<span class="sourceLineNo">117</span>    //<a name="line.117"></a>
-<span class="sourceLineNo">118</span>    //    java.lang.Exception<a name="line.118"></a>
-<span class="sourceLineNo">119</span>    //    at org.apache.hadoop.hbase.regionserver.HRegion.doBatchMutate(HRegion.java:3845)<a
name="line.119"></a>
-<span class="sourceLineNo">120</span>    //    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:2972)<a
name="line.120"></a>
-<span class="sourceLineNo">121</span>    //    at org.apache.hadoop.hbase.regionserver.RSRpcServices.mutate(RSRpcServices.java:2751)<a
name="line.121"></a>
-<span class="sourceLineNo">122</span>    //    at org.apache.hadoop.hbase.client.ClientServiceCallable.doMutate(ClientServiceCallable.java:55)<a
name="line.122"></a>
-<span class="sourceLineNo">123</span>    //    at org.apache.hadoop.hbase.client.HTable$3.rpcCall(HTable.java:585)<a
name="line.123"></a>
-<span class="sourceLineNo">124</span>    //    at org.apache.hadoop.hbase.client.HTable$3.rpcCall(HTable.java:579)<a
name="line.124"></a>
-<span class="sourceLineNo">125</span>    //    at org.apache.hadoop.hbase.client.RegionServerCallable.call(RegionServerCallable.java:126)<a
name="line.125"></a>
-<span class="sourceLineNo">126</span>    //    at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithRetries(RpcRetryingCallerImpl.java:106)<a
name="line.126"></a>
-<span class="sourceLineNo">127</span>    //    at org.apache.hadoop.hbase.client.HTable.put(HTable.java:589)<a
name="line.127"></a>
-<span class="sourceLineNo">128</span>    //    at org.apache.hadoop.hbase.master.TableNamespaceManager.insertIntoNSTable(TableNamespaceManager.java:156)<a
name="line.128"></a>
-<span class="sourceLineNo">129</span>    //    at org.apache.hadoop.hbase.master.procedure.CreateNamespaceProcedure.insertIntoNSTable(CreateNamespaceProcedure.java:222)<a
name="line.129"></a>
-<span class="sourceLineNo">130</span>    //    at org.apache.hadoop.hbase.master.procedure.CreateNamespaceProcedure.executeFromState(CreateNamespaceProcedure.java:76)<a
name="line.130"></a>
-<span class="sourceLineNo">131</span>    //    at org.apache.hadoop.hbase.master.procedure.CreateNamespaceProcedure.executeFromState(CreateNamespaceProcedure.java:40)<a
name="line.131"></a>
-<span class="sourceLineNo">132</span>    //    at org.apache.hadoop.hbase.procedure2.StateMachineProcedure.execute(StateMachineProcedure.java:181)<a
name="line.132"></a>
-<span class="sourceLineNo">133</span>    //    at org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:847)<a
name="line.133"></a>
-<span class="sourceLineNo">134</span>    //    at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:1440)<a
name="line.134"></a>
-<span class="sourceLineNo">135</span>    //    at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.executeProcedure(ProcedureExecutor.java:1209)<a
name="line.135"></a>
-<span class="sourceLineNo">136</span>    //    at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$800(ProcedureExecutor.java:79)<a
name="line.136"></a>
-<span class="sourceLineNo">137</span>    //    at org.apache.hadoop.hbase.procedure2.ProcedureExecutor$WorkerThread.run(ProcedureExecutor.java:1719)<a
name="line.137"></a>
-<span class="sourceLineNo">138</span>    //<a name="line.138"></a>
-<span class="sourceLineNo">139</span>    // If I comment out the ConnectionUtils
ConnectionImplementation content, I see this:<a name="line.139"></a>
-<span class="sourceLineNo">140</span>    //<a name="line.140"></a>
-<span class="sourceLineNo">141</span>    //    java.lang.Exception<a name="line.141"></a>
-<span class="sourceLineNo">142</span>    //    at org.apache.hadoop.hbase.regionserver.HRegion.doBatchMutate(HRegion.java:3845)<a
name="line.142"></a>
-<span class="sourceLineNo">143</span>    //    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:2972)<a
name="line.143"></a>
-<span class="sourceLineNo">144</span>    //    at org.apache.hadoop.hbase.regionserver.RSRpcServices.mutate(RSRpcServices.java:2751)<a
name="line.144"></a>
-<span class="sourceLineNo">145</span>    //    at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:41546)<a
name="line.145"></a>
-<span class="sourceLineNo">146</span>    //    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:406)<a
name="line.146"></a>
-<span class="sourceLineNo">147</span>    //    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)<a
name="line.147"></a>
-<span class="sourceLineNo">148</span>    //    at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:278)<a
name="line.148"></a>
-<span class="sourceLineNo">149</span>    //    at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:258)<a
name="line.149"></a>
-<span class="sourceLineNo">150</span><a name="line.150"></a>
-<span class="sourceLineNo">151</span>    checkBalance(SYSTEM_REGIONS, REGIONS/SLAVES);<a
name="line.151"></a>
-<span class="sourceLineNo">152</span>  }<a name="line.152"></a>
+<span class="sourceLineNo">053</span> * NOTE: Regions on Master does not work
well. See HBASE-19828. Until addressed, disabling this<a name="line.53"></a>
+<span class="sourceLineNo">054</span> * test.<a name="line.54"></a>
+<span class="sourceLineNo">055</span> */<a name="line.55"></a>
+<span class="sourceLineNo">056</span>@Ignore<a name="line.56"></a>
+<span class="sourceLineNo">057</span>@Category({MediumTests.class})<a name="line.57"></a>
+<span class="sourceLineNo">058</span>public class TestRegionsOnMasterOptions
{<a name="line.58"></a>
+<span class="sourceLineNo">059</span>  private static final Logger LOG = LoggerFactory.getLogger(TestRegionsOnMasterOptions.class);<a
name="line.59"></a>
+<span class="sourceLineNo">060</span>  @Rule public TestName name = new TestName();<a
name="line.60"></a>
+<span class="sourceLineNo">061</span>  @Rule public final TestRule timeout =
CategoryBasedTimeout.builder().withTimeout(this.getClass()).<a name="line.61"></a>
+<span class="sourceLineNo">062</span>    withLookingForStuckThread(true).build();<a
name="line.62"></a>
+<span class="sourceLineNo">063</span>  private final static HBaseTestingUtility
TEST_UTIL = new HBaseTestingUtility();<a name="line.63"></a>
+<span class="sourceLineNo">064</span>  private Configuration c;<a name="line.64"></a>
+<span class="sourceLineNo">065</span>  private String tablesOnMasterOldValue;<a
name="line.65"></a>
+<span class="sourceLineNo">066</span>  private String systemTablesOnMasterOldValue;<a
name="line.66"></a>
+<span class="sourceLineNo">067</span>  private static final int SLAVES = 3;<a
name="line.67"></a>
+<span class="sourceLineNo">068</span>  private static final int MASTERS = 2;<a
name="line.68"></a>
+<span class="sourceLineNo">069</span>  // Make the count of REGIONS high enough
so I can distingush case where master is only carrying<a name="line.69"></a>
+<span class="sourceLineNo">070</span>  // system regions from the case where
it is carrying any region; i.e. 2 system regions vs more<a name="line.70"></a>
+<span class="sourceLineNo">071</span>  // if user + system.<a name="line.71"></a>
+<span class="sourceLineNo">072</span>  private static final int REGIONS = 12;<a
name="line.72"></a>
+<span class="sourceLineNo">073</span>  private static final int SYSTEM_REGIONS
= 2; // ns and meta -- no acl unless enabled.<a name="line.73"></a>
+<span class="sourceLineNo">074</span><a name="line.74"></a>
+<span class="sourceLineNo">075</span>  @Before<a name="line.75"></a>
+<span class="sourceLineNo">076</span>  public void setup() {<a name="line.76"></a>
+<span class="sourceLineNo">077</span>    this.c = TEST_UTIL.getConfiguration();<a
name="line.77"></a>
+<span class="sourceLineNo">078</span>    this.tablesOnMasterOldValue = c.get(LoadBalancer.TABLES_ON_MASTER);<a
name="line.78"></a>
+<span class="sourceLineNo">079</span>    this.systemTablesOnMasterOldValue =
c.get(LoadBalancer.SYSTEM_TABLES_ON_MASTER);<a name="line.79"></a>
+<span class="sourceLineNo">080</span>  }<a name="line.80"></a>
+<span class="sourceLineNo">081</span><a name="line.81"></a>
+<span class="sourceLineNo">082</span>  @After<a name="line.82"></a>
+<span class="sourceLineNo">083</span>  public void tearDown() {<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    unset(LoadBalancer.TABLES_ON_MASTER,
this.tablesOnMasterOldValue);<a name="line.84"></a>
+<span class="sourceLineNo">085</span>    unset(LoadBalancer.SYSTEM_TABLES_ON_MASTER,
this.systemTablesOnMasterOldValue);<a name="line.85"></a>
+<span class="sourceLineNo">086</span>  }<a name="line.86"></a>
+<span class="sourceLineNo">087</span><a name="line.87"></a>
+<span class="sourceLineNo">088</span>  private void unset(final String key, final
String value) {<a name="line.88"></a>
+<span class="sourceLineNo">089</span>    if (value == null) {<a name="line.89"></a>
+<span class="sourceLineNo">090</span>      c.unset(key);<a name="line.90"></a>
+<span class="sourceLineNo">091</span>    } else {<a name="line.91"></a>
+<span class="sourceLineNo">092</span>      c.set(key, value);<a name="line.92"></a>
+<span class="sourceLineNo">093</span>    }<a name="line.93"></a>
+<span class="sourceLineNo">094</span>  }<a name="line.94"></a>
+<span class="sourceLineNo">095</span><a name="line.95"></a>
+<span class="sourceLineNo">096</span>  @Test<a name="line.96"></a>
+<span class="sourceLineNo">097</span>  public void testRegionsOnAllServers()
throws Exception {<a name="line.97"></a>
+<span class="sourceLineNo">098</span>    c.setBoolean(LoadBalancer.TABLES_ON_MASTER,
true);<a name="line.98"></a>
+<span class="sourceLineNo">099</span>    c.setBoolean(LoadBalancer.SYSTEM_TABLES_ON_MASTER,
false);<a name="line.99"></a>
+<span class="sourceLineNo">100</span>    int rsCount = (REGIONS + SYSTEM_REGIONS)/(SLAVES
+ 1/*Master*/);<a name="line.100"></a>
+<span class="sourceLineNo">101</span>    checkBalance(rsCount, rsCount);<a
name="line.101"></a>
+<span class="sourceLineNo">102</span>  }<a name="line.102"></a>
+<span class="sourceLineNo">103</span><a name="line.103"></a>
+<span class="sourceLineNo">104</span>  @Test<a name="line.104"></a>
+<span class="sourceLineNo">105</span>  public void testNoRegionOnMaster() throws
Exception {<a name="line.105"></a>
+<span class="sourceLineNo">106</span>    c.setBoolean(LoadBalancer.TABLES_ON_MASTER,
false);<a name="line.106"></a>
+<span class="sourceLineNo">107</span>    c.setBoolean(LoadBalancer.SYSTEM_TABLES_ON_MASTER,
false);<a name="line.107"></a>
+<span class="sourceLineNo">108</span>    int rsCount = (REGIONS + SYSTEM_REGIONS)/SLAVES;<a
name="line.108"></a>
+<span class="sourceLineNo">109</span>    checkBalance(0, rsCount);<a name="line.109"></a>
+<span class="sourceLineNo">110</span>  }<a name="line.110"></a>
+<span class="sourceLineNo">111</span><a name="line.111"></a>
+<span class="sourceLineNo">112</span>  @Ignore // Fix this. The Master startup
doesn't allow Master reporting as a RegionServer, not<a name="line.112"></a>
+<span class="sourceLineNo">113</span>  // until way late after the Master startup
finishes. Needs more work.<a name="line.113"></a>
+<span class="sourceLineNo">114</span>  @Test<a name="line.114"></a>
+<span class="sourceLineNo">115</span>  public void testSystemTablesOnMaster()
throws Exception {<a name="line.115"></a>
+<span class="sourceLineNo">116</span>    c.setBoolean(LoadBalancer.TABLES_ON_MASTER,
true);<a name="line.116"></a>
+<span class="sourceLineNo">117</span>    c.setBoolean(LoadBalancer.SYSTEM_TABLES_ON_MASTER,
true);<a name="line.117"></a>
+<span class="sourceLineNo">118</span>    // IS THIS SHORT-CIRCUIT RPC? Yes. Here
is how it looks currently if I have an exception<a name="line.118"></a>
+<span class="sourceLineNo">119</span>    // thrown in doBatchMutate inside a
Region.<a name="line.119"></a>
+<span class="sourceLineNo">120</span>    //<a name="line.120"></a>
+<span class="sourceLineNo">121</span>    //    java.lang.Exception<a name="line.121"></a>
+<span class="sourceLineNo">122</span>    //    at org.apache.hadoop.hbase.regionserver.HRegion.doBatchMutate(HRegion.java:3845)<a
name="line.122"></a>
+<span class="sourceLineNo">123</span>    //    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:2972)<a
name="line.123"></a>
+<span class="sourceLineNo">124</span>    //    at org.apache.hadoop.hbase.regionserver.RSRpcServices.mutate(RSRpcServices.java:2751)<a
name="line.124"></a>
+<span class="sourceLineNo">125</span>    //    at org.apache.hadoop.hbase.client.ClientServiceCallable.doMutate(ClientServiceCallable.java:55)<a
name="line.125"></a>
+<span class="sourceLineNo">126</span>    //    at org.apache.hadoop.hbase.client.HTable$3.rpcCall(HTable.java:585)<a
name="line.126"></a>
+<span class="sourceLineNo">127</span>    //    at org.apache.hadoop.hbase.client.HTable$3.rpcCall(HTable.java:579)<a
name="line.127"></a>
+<span class="sourceLineNo">128</span>    //    at org.apache.hadoop.hbase.client.RegionServerCallable.call(RegionServerCallable.java:126)<a
name="line.128"></a>
+<span class="sourceLineNo">129</span>    //    at org.apache.hadoop.hbase.client.RpcRetryingCallerImpl.callWithRetries(RpcRetryingCallerImpl.java:106)<a
name="line.129"></a>
+<span class="sourceLineNo">130</span>    //    at org.apache.hadoop.hbase.client.HTable.put(HTable.java:589)<a
name="line.130"></a>
+<span class="sourceLineNo">131</span>    //    at org.apache.hadoop.hbase.master.TableNamespaceManager.insertIntoNSTable(TableNamespaceManager.java:156)<a
name="line.131"></a>
+<span class="sourceLineNo">132</span>    //    at org.apache.hadoop.hbase.master.procedure.CreateNamespaceProcedure.insertIntoNSTable(CreateNamespaceProcedure.java:222)<a
name="line.132"></a>
+<span class="sourceLineNo">133</span>    //    at org.apache.hadoop.hbase.master.procedure.CreateNamespaceProcedure.executeFromState(CreateNamespaceProcedure.java:76)<a
name="line.133"></a>
+<span class="sourceLineNo">134</span>    //    at org.apache.hadoop.hbase.master.procedure.CreateNamespaceProcedure.executeFromState(CreateNamespaceProcedure.java:40)<a
name="line.134"></a>
+<span class="sourceLineNo">135</span>    //    at org.apache.hadoop.hbase.procedure2.StateMachineProcedure.execute(StateMachineProcedure.java:181)<a
name="line.135"></a>
+<span class="sourceLineNo">136</span>    //    at org.apache.hadoop.hbase.procedure2.Procedure.doExecute(Procedure.java:847)<a
name="line.136"></a>
+<span class="sourceLineNo">137</span>    //    at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.execProcedure(ProcedureExecutor.java:1440)<a
name="line.137"></a>
+<span class="sourceLineNo">138</span>    //    at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.executeProcedure(ProcedureExecutor.java:1209)<a
name="line.138"></a>
+<span class="sourceLineNo">139</span>    //    at org.apache.hadoop.hbase.procedure2.ProcedureExecutor.access$800(ProcedureExecutor.java:79)<a
name="line.139"></a>
+<span class="sourceLineNo">140</span>    //    at org.apache.hadoop.hbase.procedure2.ProcedureExecutor$WorkerThread.run(ProcedureExecutor.java:1719)<a
name="line.140"></a>
+<span class="sourceLineNo">141</span>    //<a name="line.141"></a>
+<span class="sourceLineNo">142</span>    // If I comment out the ConnectionUtils
ConnectionImplementation content, I see this:<a name="line.142"></a>
+<span class="sourceLineNo">143</span>    //<a name="line.143"></a>
+<span class="sourceLineNo">144</span>    //    java.lang.Exception<a name="line.144"></a>
+<span class="sourceLineNo">145</span>    //    at org.apache.hadoop.hbase.regionserver.HRegion.doBatchMutate(HRegion.java:3845)<a
name="line.145"></a>
+<span class="sourceLineNo">146</span>    //    at org.apache.hadoop.hbase.regionserver.HRegion.put(HRegion.java:2972)<a
name="line.146"></a>
+<span class="sourceLineNo">147</span>    //    at org.apache.hadoop.hbase.regionserver.RSRpcServices.mutate(RSRpcServices.java:2751)<a
name="line.147"></a>
+<span class="sourceLineNo">148</span>    //    at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:41546)<a
name="line.148"></a>
+<span class="sourceLineNo">149</span>    //    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:406)<a
name="line.149"></a>
+<span class="sourceLineNo">150</span>    //    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:133)<a
name="line.150"></a>
+<span class="sourceLineNo">151</span>    //    at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:278)<a
name="line.151"></a>
+<span class="sourceLineNo">152</span>    //    at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:258)<a
name="line.152"></a>
 <span class="sourceLineNo">153</span><a name="line.153"></a>
-<span class="sourceLineNo">154</span>  private void checkBalance(int masterCount,
int rsCount) throws Exception {<a name="line.154"></a>
-<span class="sourceLineNo">155</span>    MiniHBaseCluster cluster = TEST_UTIL.startMiniCluster(MASTERS,
SLAVES);<a name="line.155"></a>
-<span class="sourceLineNo">156</span>    TableName tn = TableName.valueOf(this.name.getMethodName());<a
name="line.156"></a>
-<span class="sourceLineNo">157</span>    try {<a name="line.157"></a>
-<span class="sourceLineNo">158</span>      Table t = TEST_UTIL.createMultiRegionTable(tn,
HConstants.CATALOG_FAMILY, REGIONS);<a name="line.158"></a>
-<span class="sourceLineNo">159</span>      LOG.info("Server: " + cluster.getMaster().getServerManager().getOnlineServersList());<a
name="line.159"></a>
-<span class="sourceLineNo">160</span>      List&lt;HRegion&gt; regions
= cluster.getMaster().getRegions();<a name="line.160"></a>
-<span class="sourceLineNo">161</span>      int mActualCount = regions.size();<a
name="line.161"></a>
-<span class="sourceLineNo">162</span>      if (masterCount == 0 || masterCount
== SYSTEM_REGIONS) {<a name="line.162"></a>
-<span class="sourceLineNo">163</span>        // 0 means no regions on master.<a
name="line.163"></a>
-<span class="sourceLineNo">164</span>        assertEquals(masterCount, mActualCount);<a
name="line.164"></a>
-<span class="sourceLineNo">165</span>      } else {<a name="line.165"></a>
-<span class="sourceLineNo">166</span>        // This is master as a regionserver
scenario.<a name="line.166"></a>
-<span class="sourceLineNo">167</span>        checkCount(masterCount, mActualCount);<a
name="line.167"></a>
-<span class="sourceLineNo">168</span>      }<a name="line.168"></a>
-<span class="sourceLineNo">169</span>      // Allow that balance is not exact.
FYI, getRegionServerThreads does not include master<a name="line.169"></a>
-<span class="sourceLineNo">170</span>      // thread though it is a regionserver
so we have to check master and then below the<a name="line.170"></a>
-<span class="sourceLineNo">171</span>      // regionservers.<a name="line.171"></a>
-<span class="sourceLineNo">172</span>      for (JVMClusterUtil.RegionServerThread
rst: cluster.getRegionServerThreads()) {<a name="line.172"></a>
-<span class="sourceLineNo">173</span>        regions = rst.getRegionServer().getRegions();<a
name="line.173"></a>
-<span class="sourceLineNo">174</span>        int rsActualCount = regions.size();<a
name="line.174"></a>
-<span class="sourceLineNo">175</span>        checkCount(rsActualCount, rsCount);<a
name="line.175"></a>
-<span class="sourceLineNo">176</span>      }<a name="line.176"></a>
-<span class="sourceLineNo">177</span>      HMaster oldMaster = cluster.getMaster();<a
name="line.177"></a>
-<span class="sourceLineNo">178</span>      cluster.killMaster(oldMaster.getServerName());<a
name="line.178"></a>
-<span class="sourceLineNo">179</span>      oldMaster.join();<a name="line.179"></a>
-<span class="sourceLineNo">180</span>      while (cluster.getMaster() == null
||<a name="line.180"></a>
-<span class="sourceLineNo">181</span>          cluster.getMaster().getServerName().equals(oldMaster.getServerName()))
{<a name="line.181"></a>
-<span class="sourceLineNo">182</span>        Threads.sleep(10);<a name="line.182"></a>
-<span class="sourceLineNo">183</span>      }<a name="line.183"></a>
-<span class="sourceLineNo">184</span>      while (!cluster.getMaster().isInitialized())
{<a name="line.184"></a>
+<span class="sourceLineNo">154</span>    checkBalance(SYSTEM_REGIONS, REGIONS/SLAVES);<a
name="line.154"></a>
+<span class="sourceLineNo">155</span>  }<a name="line.155"></a>
+<span class="sourceLineNo">156</span><a name="line.156"></a>
+<span class="sourceLineNo">157</span>  private void checkBalance(int masterCount,
int rsCount) throws Exception {<a name="line.157"></a>
+<span class="sourceLineNo">158</span>    MiniHBaseCluster cluster = TEST_UTIL.startMiniCluster(MASTERS,
SLAVES);<a name="line.158"></a>
+<span class="sourceLineNo">159</span>    TableName tn = TableName.valueOf(this.name.getMethodName());<a
name="line.159"></a>
+<span class="sourceLineNo">160</span>    try {<a name="line.160"></a>
+<span class="sourceLineNo">161</span>      Table t = TEST_UTIL.createMultiRegionTable(tn,
HConstants.CATALOG_FAMILY, REGIONS);<a name="line.161"></a>
+<span class="sourceLineNo">162</span>      LOG.info("Server: " + cluster.getMaster().getServerManager().getOnlineServersList());<a
name="line.162"></a>
+<span class="sourceLineNo">163</span>      List&lt;HRegion&gt; regions
= cluster.getMaster().getRegions();<a name="line.163"></a>
+<span class="sourceLineNo">164</span>      int mActualCount = regions.size();<a
name="line.164"></a>
+<span class="sourceLineNo">165</span>      if (masterCount == 0 || masterCount
== SYSTEM_REGIONS) {<a name="line.165"></a>
+<span class="sourceLineNo">166</span>        // 0 means no regions on master.<a
name="line.166"></a>
+<span class="sourceLineNo">167</span>        assertEquals(masterCount, mActualCount);<a
name="line.167"></a>
+<span class="sourceLineNo">168</span>      } else {<a name="line.168"></a>
+<span class="sourceLineNo">169</span>        // This is master as a regionserver
scenario.<a name="line.169"></a>
+<span class="sourceLineNo">170</span>        checkCount(masterCount, mActualCount);<a
name="line.170"></a>
+<span class="sourceLineNo">171</span>      }<a name="line.171"></a>
+<span class="sourceLineNo">172</span>      // Allow that balance is not exact.
FYI, getRegionServerThreads does not include master<a name="line.172"></a>
+<span class="sourceLineNo">173</span>      // thread though it is a regionserver
so we have to check master and then below the<a name="line.173"></a>
+<span class="sourceLineNo">174</span>      // regionservers.<a name="line.174"></a>
+<span class="sourceLineNo">175</span>      for (JVMClusterUtil.RegionServerThread
rst: cluster.getRegionServerThreads()) {<a name="line.175"></a>
+<span class="sourceLineNo">176</span>        regions = rst.getRegionServer().getRegions();<a
name="line.176"></a>
+<span class="sourceLineNo">177</span>        int rsActualCount = regions.size();<a
name="line.177"></a>
+<span class="sourceLineNo">178</span>        checkCount(rsActualCount, rsCount);<a
name="line.178"></a>
+<span class="sourceLineNo">179</span>      }<a name="line.179"></a>
+<span class="sourceLineNo">180</span>      HMaster oldMaster = cluster.getMaster();<a
name="line.180"></a>
+<span class="sourceLineNo">181</span>      cluster.killMaster(oldMaster.getServerName());<a
name="line.181"></a>
+<span class="sourceLineNo">182</span>      oldMaster.join();<a name="line.182"></a>
+<span class="sourceLineNo">183</span>      while (cluster.getMaster() == null
||<a name="line.183"></a>
+<span class="sourceLineNo">184</span>          cluster.getMaster().getServerName().equals(oldMaster.getServerName()))
{<a name="line.184"></a>
 <span class="sourceLineNo">185</span>        Threads.sleep(10);<a name="line.185"></a>
 <span class="sourceLineNo">186</span>      }<a name="line.186"></a>
-<span class="sourceLineNo">187</span>      while (cluster.getMaster().getAssignmentManager().<a
name="line.187"></a>
-<span class="sourceLineNo">188</span>          computeRegionInTransitionStat().getTotalRITs()
&gt; 0) {<a name="line.188"></a>
-<span class="sourceLineNo">189</span>        Threads.sleep(100);<a name="line.189"></a>
-<span class="sourceLineNo">190</span>        LOG.info("Waiting on RIT to go to
zero before calling balancer...");<a name="line.190"></a>
-<span class="sourceLineNo">191</span>      }<a name="line.191"></a>
-<span class="sourceLineNo">192</span>      LOG.info("Cluster is up; running balancer");<a
name="line.192"></a>
-<span class="sourceLineNo">193</span>      cluster.getMaster().balance();<a
name="line.193"></a>
-<span class="sourceLineNo">194</span>      regions = cluster.getMaster().getRegions();<a
name="line.194"></a>
-<span class="sourceLineNo">195</span>      int mNewActualCount = regions.size();<a
name="line.195"></a>
-<span class="sourceLineNo">196</span>      if (masterCount == 0 || masterCount
== SYSTEM_REGIONS) {<a name="line.196"></a>
-<span class="sourceLineNo">197</span>        // 0 means no regions on master.
After crash, should still be no regions on master.<a name="line.197"></a>
-<span class="sourceLineNo">198</span>        // If masterCount == SYSTEM_REGIONS,
means master only carrying system regions and should<a name="line.198"></a>
-<span class="sourceLineNo">199</span>        // still only carry system regions
post crash.<a name="line.199"></a>
-<span class="sourceLineNo">200</span>        assertEquals(masterCount, mNewActualCount);<a
name="line.200"></a>
-<span class="sourceLineNo">201</span>      }<a name="line.201"></a>
-<span class="sourceLineNo">202</span>    } finally {<a name="line.202"></a>
-<span class="sourceLineNo">203</span>      LOG.info("Running shutdown of cluster");<a
name="line.203"></a>
-<span class="sourceLineNo">204</span>      TEST_UTIL.shutdownMiniCluster();<a
name="line.204"></a>
-<span class="sourceLineNo">205</span>    }<a name="line.205"></a>
-<span class="sourceLineNo">206</span>  }<a name="line.206"></a>
-<span class="sourceLineNo">207</span><a name="line.207"></a>
-<span class="sourceLineNo">208</span>  private void checkCount(int actual, int
expected) {<a name="line.208"></a>
-<span class="sourceLineNo">209</span>    assertTrue("Actual=" + actual + ", expected="
+ expected,<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    actual &gt;= (expected - 2) &amp;&amp;
actual &lt;= (expected + 2)); // Lots of slop +/- 2<a name="line.210"></a>
-<span class="sourceLineNo">211</span>  }<a name="line.211"></a>
-<span class="sourceLineNo">212</span>}<a name="line.212"></a>
+<span class="sourceLineNo">187</span>      while (!cluster.getMaster().isInitialized())
{<a name="line.187"></a>
+<span class="sourceLineNo">188</span>        Threads.sleep(10);<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      }<a name="line.189"></a>
+<span class="sourceLineNo">190</span>      while (cluster.getMaster().getAssignmentManager().<a
name="line.190"></a>
+<span class="sourceLineNo">191</span>          computeRegionInTransitionStat().getTotalRITs()
&gt; 0) {<a name="line.191"></a>
+<span class="sourceLineNo">192</span>        Threads.sleep(100);<a name="line.192"></a>
+<span class="sourceLineNo">193</span>        LOG.info("Waiting on RIT to go to
zero before calling balancer...");<a name="line.193"></a>
+<span class="sourceLineNo">194</span>      }<a name="line.194"></a>
+<span class="sourceLineNo">195</span>      LOG.info("Cluster is up; running balancer");<a
name="line.195"></a>
+<span class="sourceLineNo">196</span>      cluster.getMaster().balance();<a
name="line.196"></a>
+<span class="sourceLineNo">197</span>      regions = cluster.getMaster().getRegions();<a
name="line.197"></a>
+<span class="sourceLineNo">198</span>      int mNewActualCount = regions.size();<a
name="line.198"></a>
+<span class="sourceLineNo">199</span>      if (masterCount == 0 || masterCount
== SYSTEM_REGIONS) {<a name="line.199"></a>
+<span class="sourceLineNo">200</span>        // 0 means no regions on master.
After crash, should still be no regions on master.<a name="line.200"></a>
+<span class="sourceLineNo">201</span>        // If masterCount == SYSTEM_REGIONS,
means master only carrying system regions and should<a name="line.201"></a>
+<span class="sourceLineNo">202</span>        // still only carry system regions
post crash.<a name="line.202"></a>
+<span class="sourceLineNo">203</span>        assertEquals(masterCount, mNewActualCount);<a
name="line.203"></a>
+<span class="sourceLineNo">204</span>      }<a name="line.204"></a>
+<span class="sourceLineNo">205</span>    } finally {<a name="line.205"></a>
+<span class="sourceLineNo">206</span>      LOG.info("Running shutdown of cluster");<a
name="line.206"></a>
+<span class="sourceLineNo">207</span>      TEST_UTIL.shutdownMiniCluster();<a
name="line.207"></a>
+<span class="sourceLineNo">208</span>    }<a name="line.208"></a>
+<span class="sourceLineNo">209</span>  }<a name="line.209"></a>
+<span class="sourceLineNo">210</span><a name="line.210"></a>
+<span class="sourceLineNo">211</span>  private void checkCount(int actual, int
expected) {<a name="line.211"></a>
+<span class="sourceLineNo">212</span>    assertTrue("Actual=" + actual + ", expected="
+ expected,<a name="line.212"></a>
+<span class="sourceLineNo">213</span>    actual &gt;= (expected - 2) &amp;&amp;
actual &lt;= (expected + 2)); // Lots of slop +/- 2<a name="line.213"></a>
+<span class="sourceLineNo">214</span>  }<a name="line.214"></a>
+<span class="sourceLineNo">215</span>}<a name="line.215"></a>
 
 
 


Mime
View raw message