http://git-wip-us.apache.org/repos/asf/hbase-site/blob/6674e3ab/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html
----------------------------------------------------------------------
diff --git 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html
 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html
index 7515d7b..3c4825d 100644
--- 
a/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html
+++ 
b/devapidocs/src-html/org/apache/hadoop/hbase/master/HMaster.InitializationMonitor.html
@@ -762,7 +762,7 @@
 <span class="sourceLineNo">754</span>    boolean wasUp = 
this.clusterStatusTracker.isClusterUp();<a name="line.754"></a>
 <span class="sourceLineNo">755</span>    if (!wasUp) 
this.clusterStatusTracker.setClusterUp();<a name="line.755"></a>
 <span class="sourceLineNo">756</span><a name="line.756"></a>
-<span class="sourceLineNo">757</span>    LOG.info("Server active/primary 
master=" + this.serverName +<a name="line.757"></a>
+<span class="sourceLineNo">757</span>    LOG.info("Active/primary master=" + 
this.serverName +<a name="line.757"></a>
 <span class="sourceLineNo">758</span>        ", sessionid=0x" +<a 
name="line.758"></a>
 <span class="sourceLineNo">759</span>        
Long.toHexString(this.zooKeeper.getRecoverableZooKeeper().getSessionId()) +<a 
name="line.759"></a>
 <span class="sourceLineNo">760</span>        ", setting cluster-up flag (Was=" 
+ wasUp + ")");<a name="line.760"></a>
@@ -1161,7 +1161,7 @@
 <span class="sourceLineNo">1153</span>   startProcedureExecutor();<a 
name="line.1153"></a>
 <span class="sourceLineNo">1154</span><a name="line.1154"></a>
 <span class="sourceLineNo">1155</span>   // Start log cleaner thread<a 
name="line.1155"></a>
-<span class="sourceLineNo">1156</span>   int cleanerInterval = 
conf.getInt("hbase.master.cleaner.interval", 60 * 1000);<a name="line.1156"></a>
+<span class="sourceLineNo">1156</span>   int cleanerInterval = 
conf.getInt("hbase.master.cleaner.interval", 600 * 1000);<a 
name="line.1156"></a>
 <span class="sourceLineNo">1157</span>   this.logCleaner =<a 
name="line.1157"></a>
 <span class="sourceLineNo">1158</span>      new LogCleaner(cleanerInterval,<a 
name="line.1158"></a>
 <span class="sourceLineNo">1159</span>         this, conf, 
getMasterWalManager().getFileSystem(),<a name="line.1159"></a>
@@ -1227,2368 +1227,2369 @@
 <span class="sourceLineNo">1219</span>    procedureExecutor = new 
ProcedureExecutor&lt;&gt;(conf, procEnv, procedureStore, procedureScheduler);<a 
name="line.1219"></a>
 <span class="sourceLineNo">1220</span>    
configurationManager.registerObserver(procEnv);<a name="line.1220"></a>
 <span class="sourceLineNo">1221</span><a name="line.1221"></a>
-<span class="sourceLineNo">1222</span>    final int numThreads = 
conf.getInt(MasterProcedureConstants.MASTER_PROCEDURE_THREADS,<a 
name="line.1222"></a>
-<span class="sourceLineNo">1223</span>        
Math.max(Runtime.getRuntime().availableProcessors(),<a name="line.1223"></a>
-<span class="sourceLineNo">1224</span>          
MasterProcedureConstants.DEFAULT_MIN_MASTER_PROCEDURE_THREADS));<a 
name="line.1224"></a>
-<span class="sourceLineNo">1225</span>    final boolean abortOnCorruption = 
conf.getBoolean(<a name="line.1225"></a>
-<span class="sourceLineNo">1226</span>        
MasterProcedureConstants.EXECUTOR_ABORT_ON_CORRUPTION,<a name="line.1226"></a>
-<span class="sourceLineNo">1227</span>        
MasterProcedureConstants.DEFAULT_EXECUTOR_ABORT_ON_CORRUPTION);<a 
name="line.1227"></a>
-<span class="sourceLineNo">1228</span>    procedureStore.start(numThreads);<a 
name="line.1228"></a>
-<span class="sourceLineNo">1229</span>    procedureExecutor.start(numThreads, 
abortOnCorruption);<a name="line.1229"></a>
-<span class="sourceLineNo">1230</span>    
procEnv.getRemoteDispatcher().start();<a name="line.1230"></a>
-<span class="sourceLineNo">1231</span>  }<a name="line.1231"></a>
-<span class="sourceLineNo">1232</span><a name="line.1232"></a>
-<span class="sourceLineNo">1233</span>  private void stopProcedureExecutor() 
{<a name="line.1233"></a>
-<span class="sourceLineNo">1234</span>    if (procedureExecutor != null) {<a 
name="line.1234"></a>
-<span class="sourceLineNo">1235</span>      
configurationManager.deregisterObserver(procedureExecutor.getEnvironment());<a 
name="line.1235"></a>
-<span class="sourceLineNo">1236</span>      
procedureExecutor.getEnvironment().getRemoteDispatcher().stop();<a 
name="line.1236"></a>
-<span class="sourceLineNo">1237</span>      procedureExecutor.stop();<a 
name="line.1237"></a>
-<span class="sourceLineNo">1238</span>      procedureExecutor.join();<a 
name="line.1238"></a>
-<span class="sourceLineNo">1239</span>      procedureExecutor = null;<a 
name="line.1239"></a>
-<span class="sourceLineNo">1240</span>    }<a name="line.1240"></a>
-<span class="sourceLineNo">1241</span><a name="line.1241"></a>
-<span class="sourceLineNo">1242</span>    if (procedureStore != null) {<a 
name="line.1242"></a>
-<span class="sourceLineNo">1243</span>      
procedureStore.stop(isAborted());<a name="line.1243"></a>
-<span class="sourceLineNo">1244</span>      procedureStore = null;<a 
name="line.1244"></a>
-<span class="sourceLineNo">1245</span>    }<a name="line.1245"></a>
-<span class="sourceLineNo">1246</span>  }<a name="line.1246"></a>
-<span class="sourceLineNo">1247</span><a name="line.1247"></a>
-<span class="sourceLineNo">1248</span>  private void stopChores() {<a 
name="line.1248"></a>
-<span class="sourceLineNo">1249</span>    if (this.expiredMobFileCleanerChore 
!= null) {<a name="line.1249"></a>
-<span class="sourceLineNo">1250</span>      
this.expiredMobFileCleanerChore.cancel(true);<a name="line.1250"></a>
-<span class="sourceLineNo">1251</span>    }<a name="line.1251"></a>
-<span class="sourceLineNo">1252</span>    if (this.mobCompactChore != null) 
{<a name="line.1252"></a>
-<span class="sourceLineNo">1253</span>      
this.mobCompactChore.cancel(true);<a name="line.1253"></a>
-<span class="sourceLineNo">1254</span>    }<a name="line.1254"></a>
-<span class="sourceLineNo">1255</span>    if (this.balancerChore != null) {<a 
name="line.1255"></a>
-<span class="sourceLineNo">1256</span>      this.balancerChore.cancel(true);<a 
name="line.1256"></a>
-<span class="sourceLineNo">1257</span>    }<a name="line.1257"></a>
-<span class="sourceLineNo">1258</span>    if (this.normalizerChore != null) 
{<a name="line.1258"></a>
-<span class="sourceLineNo">1259</span>      
this.normalizerChore.cancel(true);<a name="line.1259"></a>
-<span class="sourceLineNo">1260</span>    }<a name="line.1260"></a>
-<span class="sourceLineNo">1261</span>    if (this.clusterStatusChore != null) 
{<a name="line.1261"></a>
-<span class="sourceLineNo">1262</span>      
this.clusterStatusChore.cancel(true);<a name="line.1262"></a>
-<span class="sourceLineNo">1263</span>    }<a name="line.1263"></a>
-<span class="sourceLineNo">1264</span>    if (this.catalogJanitorChore != 
null) {<a name="line.1264"></a>
-<span class="sourceLineNo">1265</span>      
this.catalogJanitorChore.cancel(true);<a name="line.1265"></a>
-<span class="sourceLineNo">1266</span>    }<a name="line.1266"></a>
-<span class="sourceLineNo">1267</span>    if (this.clusterStatusPublisherChore 
!= null){<a name="line.1267"></a>
-<span class="sourceLineNo">1268</span>      
clusterStatusPublisherChore.cancel(true);<a name="line.1268"></a>
-<span class="sourceLineNo">1269</span>    }<a name="line.1269"></a>
-<span class="sourceLineNo">1270</span>    if (this.mobCompactThread != null) 
{<a name="line.1270"></a>
-<span class="sourceLineNo">1271</span>      this.mobCompactThread.close();<a 
name="line.1271"></a>
-<span class="sourceLineNo">1272</span>    }<a name="line.1272"></a>
-<span class="sourceLineNo">1273</span><a name="line.1273"></a>
-<span class="sourceLineNo">1274</span>    if (this.quotaObserverChore != null) 
{<a name="line.1274"></a>
-<span class="sourceLineNo">1275</span>      quotaObserverChore.cancel();<a 
name="line.1275"></a>
-<span class="sourceLineNo">1276</span>    }<a name="line.1276"></a>
-<span class="sourceLineNo">1277</span>    if (this.snapshotQuotaChore != null) 
{<a name="line.1277"></a>
-<span class="sourceLineNo">1278</span>      snapshotQuotaChore.cancel();<a 
name="line.1278"></a>
-<span class="sourceLineNo">1279</span>    }<a name="line.1279"></a>
-<span class="sourceLineNo">1280</span>  }<a name="line.1280"></a>
-<span class="sourceLineNo">1281</span><a name="line.1281"></a>
-<span class="sourceLineNo">1282</span>  /**<a name="line.1282"></a>
-<span class="sourceLineNo">1283</span>   * @return Get remote side's 
InetAddress<a name="line.1283"></a>
-<span class="sourceLineNo">1284</span>   */<a name="line.1284"></a>
-<span class="sourceLineNo">1285</span>  InetAddress getRemoteInetAddress(final 
int port,<a name="line.1285"></a>
-<span class="sourceLineNo">1286</span>      final long serverStartCode) throws 
UnknownHostException {<a name="line.1286"></a>
-<span class="sourceLineNo">1287</span>    // Do it out here in its own little 
method so can fake an address when<a name="line.1287"></a>
-<span class="sourceLineNo">1288</span>    // mocking up in tests.<a 
name="line.1288"></a>
-<span class="sourceLineNo">1289</span>    InetAddress ia = 
RpcServer.getRemoteIp();<a name="line.1289"></a>
-<span class="sourceLineNo">1290</span><a name="line.1290"></a>
-<span class="sourceLineNo">1291</span>    // The call could be from the local 
regionserver,<a name="line.1291"></a>
-<span class="sourceLineNo">1292</span>    // in which case, there is no remote 
address.<a name="line.1292"></a>
-<span class="sourceLineNo">1293</span>    if (ia == null &amp;&amp; 
serverStartCode == startcode) {<a name="line.1293"></a>
-<span class="sourceLineNo">1294</span>      InetSocketAddress isa = 
rpcServices.getSocketAddress();<a name="line.1294"></a>
-<span class="sourceLineNo">1295</span>      if (isa != null &amp;&amp; 
isa.getPort() == port) {<a name="line.1295"></a>
-<span class="sourceLineNo">1296</span>        ia = isa.getAddress();<a 
name="line.1296"></a>
-<span class="sourceLineNo">1297</span>      }<a name="line.1297"></a>
-<span class="sourceLineNo">1298</span>    }<a name="line.1298"></a>
-<span class="sourceLineNo">1299</span>    return ia;<a name="line.1299"></a>
-<span class="sourceLineNo">1300</span>  }<a name="line.1300"></a>
-<span class="sourceLineNo">1301</span><a name="line.1301"></a>
-<span class="sourceLineNo">1302</span>  /**<a name="line.1302"></a>
-<span class="sourceLineNo">1303</span>   * @return Maximum time we should run 
balancer for<a name="line.1303"></a>
-<span class="sourceLineNo">1304</span>   */<a name="line.1304"></a>
-<span class="sourceLineNo">1305</span>  private int getMaxBalancingTime() {<a 
name="line.1305"></a>
-<span class="sourceLineNo">1306</span>    int maxBalancingTime = 
getConfiguration().getInt(HConstants.HBASE_BALANCER_MAX_BALANCING, -1);<a 
name="line.1306"></a>
-<span class="sourceLineNo">1307</span>    if (maxBalancingTime == -1) {<a 
name="line.1307"></a>
-<span class="sourceLineNo">1308</span>      // if max balancing time isn't 
set, defaulting it to period time<a name="line.1308"></a>
-<span class="sourceLineNo">1309</span>      maxBalancingTime = 
getConfiguration().getInt(HConstants.HBASE_BALANCER_PERIOD,<a 
name="line.1309"></a>
-<span class="sourceLineNo">1310</span>        
HConstants.DEFAULT_HBASE_BALANCER_PERIOD);<a name="line.1310"></a>
-<span class="sourceLineNo">1311</span>    }<a name="line.1311"></a>
-<span class="sourceLineNo">1312</span>    return maxBalancingTime;<a 
name="line.1312"></a>
-<span class="sourceLineNo">1313</span>  }<a name="line.1313"></a>
-<span class="sourceLineNo">1314</span><a name="line.1314"></a>
-<span class="sourceLineNo">1315</span>  /**<a name="line.1315"></a>
-<span class="sourceLineNo">1316</span>   * @return Maximum number of regions 
in transition<a name="line.1316"></a>
-<span class="sourceLineNo">1317</span>   */<a name="line.1317"></a>
-<span class="sourceLineNo">1318</span>  private int 
getMaxRegionsInTransition() {<a name="line.1318"></a>
-<span class="sourceLineNo">1319</span>    int numRegions = 
this.assignmentManager.getRegionStates().getRegionAssignments().size();<a 
name="line.1319"></a>
-<span class="sourceLineNo">1320</span>    return Math.max((int) 
Math.floor(numRegions * this.maxRitPercent), 1);<a name="line.1320"></a>
-<span class="sourceLineNo">1321</span>  }<a name="line.1321"></a>
-<span class="sourceLineNo">1322</span><a name="line.1322"></a>
-<span class="sourceLineNo">1323</span>  /**<a name="line.1323"></a>
-<span class="sourceLineNo">1324</span>   * It first sleep to the next balance 
plan start time. Meanwhile, throttling by the max<a name="line.1324"></a>
-<span class="sourceLineNo">1325</span>   * number regions in transition to 
protect availability.<a name="line.1325"></a>
-<span class="sourceLineNo">1326</span>   * @param nextBalanceStartTime The 
next balance plan start time<a name="line.1326"></a>
-<span class="sourceLineNo">1327</span>   * @param maxRegionsInTransition max 
number of regions in transition<a name="line.1327"></a>
-<span class="sourceLineNo">1328</span>   * @param cutoffTime when to exit 
balancer<a name="line.1328"></a>
-<span class="sourceLineNo">1329</span>   */<a name="line.1329"></a>
-<span class="sourceLineNo">1330</span>  private void balanceThrottling(long 
nextBalanceStartTime, int maxRegionsInTransition,<a name="line.1330"></a>
-<span class="sourceLineNo">1331</span>      long cutoffTime) {<a 
name="line.1331"></a>
-<span class="sourceLineNo">1332</span>    boolean interrupted = false;<a 
name="line.1332"></a>
-<span class="sourceLineNo">1333</span><a name="line.1333"></a>
-<span class="sourceLineNo">1334</span>    // Sleep to next balance plan start 
time<a name="line.1334"></a>
-<span class="sourceLineNo">1335</span>    // But if there are zero regions in 
transition, it can skip sleep to speed up.<a name="line.1335"></a>
-<span class="sourceLineNo">1336</span>    while (!interrupted &amp;&amp; 
System.currentTimeMillis() &lt; nextBalanceStartTime<a name="line.1336"></a>
-<span class="sourceLineNo">1337</span>        &amp;&amp; 
this.assignmentManager.getRegionStates().hasRegionsInTransition()) {<a 
name="line.1337"></a>
-<span class="sourceLineNo">1338</span>      try {<a name="line.1338"></a>
-<span class="sourceLineNo">1339</span>        Thread.sleep(100);<a 
name="line.1339"></a>
-<span class="sourceLineNo">1340</span>      } catch (InterruptedException ie) 
{<a name="line.1340"></a>
-<span class="sourceLineNo">1341</span>        interrupted = true;<a 
name="line.1341"></a>
-<span class="sourceLineNo">1342</span>      }<a name="line.1342"></a>
-<span class="sourceLineNo">1343</span>    }<a name="line.1343"></a>
-<span class="sourceLineNo">1344</span><a name="line.1344"></a>
-<span class="sourceLineNo">1345</span>    // Throttling by max number regions 
in transition<a name="line.1345"></a>
-<span class="sourceLineNo">1346</span>    while (!interrupted<a 
name="line.1346"></a>
-<span class="sourceLineNo">1347</span>        &amp;&amp; 
maxRegionsInTransition &gt; 0<a name="line.1347"></a>
-<span class="sourceLineNo">1348</span>        &amp;&amp; 
this.assignmentManager.getRegionStates().getRegionsInTransitionCount()<a 
name="line.1348"></a>
-<span class="sourceLineNo">1349</span>        &gt;= maxRegionsInTransition 
&amp;&amp; System.currentTimeMillis() &lt;= cutoffTime) {<a 
name="line.1349"></a>
-<span class="sourceLineNo">1350</span>      try {<a name="line.1350"></a>
-<span class="sourceLineNo">1351</span>        // sleep if the number of 
regions in transition exceeds the limit<a name="line.1351"></a>
-<span class="sourceLineNo">1352</span>        Thread.sleep(100);<a 
name="line.1352"></a>
-<span class="sourceLineNo">1353</span>      } catch (InterruptedException ie) 
{<a name="line.1353"></a>
-<span class="sourceLineNo">1354</span>        interrupted = true;<a 
name="line.1354"></a>
-<span class="sourceLineNo">1355</span>      }<a name="line.1355"></a>
-<span class="sourceLineNo">1356</span>    }<a name="line.1356"></a>
-<span class="sourceLineNo">1357</span><a name="line.1357"></a>
-<span class="sourceLineNo">1358</span>    if (interrupted) 
Thread.currentThread().interrupt();<a name="line.1358"></a>
-<span class="sourceLineNo">1359</span>  }<a name="line.1359"></a>
-<span class="sourceLineNo">1360</span><a name="line.1360"></a>
-<span class="sourceLineNo">1361</span>  public boolean balance() throws 
IOException {<a name="line.1361"></a>
-<span class="sourceLineNo">1362</span>    return balance(false);<a 
name="line.1362"></a>
-<span class="sourceLineNo">1363</span>  }<a name="line.1363"></a>
-<span class="sourceLineNo">1364</span><a name="line.1364"></a>
-<span class="sourceLineNo">1365</span>  public boolean balance(boolean force) 
throws IOException {<a name="line.1365"></a>
-<span class="sourceLineNo">1366</span>    // if master not initialized, don't 
run balancer.<a name="line.1366"></a>
-<span class="sourceLineNo">1367</span>    if (!isInitialized()) {<a 
name="line.1367"></a>
-<span class="sourceLineNo">1368</span>      LOG.debug("Master has not been 
initialized, don't run balancer.");<a name="line.1368"></a>
-<span class="sourceLineNo">1369</span>      return false;<a 
name="line.1369"></a>
-<span class="sourceLineNo">1370</span>    }<a name="line.1370"></a>
-<span class="sourceLineNo">1371</span><a name="line.1371"></a>
-<span class="sourceLineNo">1372</span>    if (isInMaintenanceMode()) {<a 
name="line.1372"></a>
-<span class="sourceLineNo">1373</span>      LOG.info("Master is in 
maintenanceMode mode, don't run balancer.");<a name="line.1373"></a>
-<span class="sourceLineNo">1374</span>      return false;<a 
name="line.1374"></a>
-<span class="sourceLineNo">1375</span>    }<a name="line.1375"></a>
-<span class="sourceLineNo">1376</span><a name="line.1376"></a>
-<span class="sourceLineNo">1377</span>    int maxRegionsInTransition = 
getMaxRegionsInTransition();<a name="line.1377"></a>
-<span class="sourceLineNo">1378</span>    synchronized (this.balancer) {<a 
name="line.1378"></a>
-<span class="sourceLineNo">1379</span>      // If balance not true, don't run 
balancer.<a name="line.1379"></a>
-<span class="sourceLineNo">1380</span>      if 
(!this.loadBalancerTracker.isBalancerOn()) return false;<a name="line.1380"></a>
-<span class="sourceLineNo">1381</span>        // Only allow one balance run at 
at time.<a name="line.1381"></a>
-<span class="sourceLineNo">1382</span>      if 
(this.assignmentManager.hasRegionsInTransition()) {<a name="line.1382"></a>
-<span class="sourceLineNo">1383</span>        List&lt;RegionStateNode&gt; 
regionsInTransition = assignmentManager.getRegionsInTransition();<a 
name="line.1383"></a>
-<span class="sourceLineNo">1384</span>        // if hbase:meta region is in 
transition, result of assignment cannot be recorded<a name="line.1384"></a>
-<span class="sourceLineNo">1385</span>        // ignore the force flag in that 
case<a name="line.1385"></a>
-<span class="sourceLineNo">1386</span>        boolean metaInTransition = 
assignmentManager.isMetaRegionInTransition();<a name="line.1386"></a>
-<span class="sourceLineNo">1387</span>        String prefix = force &amp;&amp; 
!metaInTransition ? "R" : "Not r";<a name="line.1387"></a>
-<span class="sourceLineNo">1388</span>        List&lt;RegionStateNode&gt; 
toPrint = regionsInTransition;<a name="line.1388"></a>
-<span class="sourceLineNo">1389</span>        int max = 5;<a 
name="line.1389"></a>
-<span class="sourceLineNo">1390</span>        boolean truncated = false;<a 
name="line.1390"></a>
-<span class="sourceLineNo">1391</span>        if (regionsInTransition.size() 
&gt; max) {<a name="line.1391"></a>
-<span class="sourceLineNo">1392</span>          toPrint = 
regionsInTransition.subList(0, max);<a name="line.1392"></a>
-<span class="sourceLineNo">1393</span>          truncated = true;<a 
name="line.1393"></a>
-<span class="sourceLineNo">1394</span>        }<a name="line.1394"></a>
-<span class="sourceLineNo">1395</span>        LOG.info(prefix + "unning 
balancer because " + regionsInTransition.size() +<a name="line.1395"></a>
-<span class="sourceLineNo">1396</span>          " region(s) in transition: " + 
toPrint + (truncated? "(truncated list)": ""));<a name="line.1396"></a>
-<span class="sourceLineNo">1397</span>        if (!force || metaInTransition) 
return false;<a name="line.1397"></a>
-<span class="sourceLineNo">1398</span>      }<a name="line.1398"></a>
-<span class="sourceLineNo">1399</span>      if 
(this.serverManager.areDeadServersInProgress()) {<a name="line.1399"></a>
-<span class="sourceLineNo">1400</span>        LOG.info("Not running balancer 
because processing dead regionserver(s): " +<a name="line.1400"></a>
-<span class="sourceLineNo">1401</span>          
this.serverManager.getDeadServers());<a name="line.1401"></a>
-<span class="sourceLineNo">1402</span>        return false;<a 
name="line.1402"></a>
-<span class="sourceLineNo">1403</span>      }<a name="line.1403"></a>
-<span class="sourceLineNo">1404</span><a name="line.1404"></a>
-<span class="sourceLineNo">1405</span>      if (this.cpHost != null) {<a 
name="line.1405"></a>
-<span class="sourceLineNo">1406</span>        try {<a name="line.1406"></a>
-<span class="sourceLineNo">1407</span>          if (this.cpHost.preBalance()) 
{<a name="line.1407"></a>
-<span class="sourceLineNo">1408</span>            LOG.debug("Coprocessor 
bypassing balancer request");<a name="line.1408"></a>
-<span class="sourceLineNo">1409</span>            return false;<a 
name="line.1409"></a>
-<span class="sourceLineNo">1410</span>          }<a name="line.1410"></a>
-<span class="sourceLineNo">1411</span>        } catch (IOException ioe) {<a 
name="line.1411"></a>
-<span class="sourceLineNo">1412</span>          LOG.error("Error invoking 
master coprocessor preBalance()", ioe);<a name="line.1412"></a>
-<span class="sourceLineNo">1413</span>          return false;<a 
name="line.1413"></a>
-<span class="sourceLineNo">1414</span>        }<a name="line.1414"></a>
-<span class="sourceLineNo">1415</span>      }<a name="line.1415"></a>
-<span class="sourceLineNo">1416</span><a name="line.1416"></a>
-<span class="sourceLineNo">1417</span>      boolean isByTable = 
getConfiguration().getBoolean("hbase.master.loadbalance.bytable", false);<a 
name="line.1417"></a>
-<span class="sourceLineNo">1418</span>      Map&lt;TableName, 
Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; assignmentsByTable =<a 
name="line.1418"></a>
-<span class="sourceLineNo">1419</span>        
this.assignmentManager.getRegionStates().getAssignmentsByTable(!isByTable);<a 
name="line.1419"></a>
-<span class="sourceLineNo">1420</span><a name="line.1420"></a>
-<span class="sourceLineNo">1421</span>      List&lt;RegionPlan&gt; plans = new 
ArrayList&lt;&gt;();<a name="line.1421"></a>
-<span class="sourceLineNo">1422</span><a name="line.1422"></a>
-<span class="sourceLineNo">1423</span>      //Give the balancer the current 
cluster state.<a name="line.1423"></a>
-<span class="sourceLineNo">1424</span>      
this.balancer.setClusterMetrics(getClusterMetricsWithoutCoprocessor());<a 
name="line.1424"></a>
-<span class="sourceLineNo">1425</span>      
this.balancer.setClusterLoad(assignmentsByTable);<a name="line.1425"></a>
-<span class="sourceLineNo">1426</span><a name="line.1426"></a>
-<span class="sourceLineNo">1427</span>      for (Map&lt;ServerName, 
List&lt;RegionInfo&gt;&gt; serverMap : assignmentsByTable.values()) {<a 
name="line.1427"></a>
-<span class="sourceLineNo">1428</span>        
serverMap.keySet().removeAll(this.serverManager.getDrainingServersList());<a 
name="line.1428"></a>
-<span class="sourceLineNo">1429</span>      }<a name="line.1429"></a>
-<span class="sourceLineNo">1430</span>      for (Entry&lt;TableName, 
Map&lt;ServerName, List&lt;RegionInfo&gt;&gt;&gt; e : 
assignmentsByTable.entrySet()) {<a name="line.1430"></a>
-<span class="sourceLineNo">1431</span>        List&lt;RegionPlan&gt; 
partialPlans = this.balancer.balanceCluster(e.getKey(), e.getValue());<a 
name="line.1431"></a>
-<span class="sourceLineNo">1432</span>        if (partialPlans != null) 
plans.addAll(partialPlans);<a name="line.1432"></a>
-<span class="sourceLineNo">1433</span>      }<a name="line.1433"></a>
-<span class="sourceLineNo">1434</span><a name="line.1434"></a>
-<span class="sourceLineNo">1435</span>      long balanceStartTime = 
System.currentTimeMillis();<a name="line.1435"></a>
-<span class="sourceLineNo">1436</span>      long cutoffTime = balanceStartTime 
+ this.maxBlancingTime;<a name="line.1436"></a>
-<span class="sourceLineNo">1437</span>      int rpCount = 0;  // number of 
RegionPlans balanced so far<a name="line.1437"></a>
-<span class="sourceLineNo">1438</span>      if (plans != null &amp;&amp; 
!plans.isEmpty()) {<a name="line.1438"></a>
-<span class="sourceLineNo">1439</span>        int balanceInterval = 
this.maxBlancingTime / plans.size();<a name="line.1439"></a>
-<span class="sourceLineNo">1440</span>        LOG.info("Balancer plans size is 
" + plans.size() + ", the balance interval is "<a name="line.1440"></a>
-<span class="sourceLineNo">1441</span>            + balanceInterval + " ms, 
and the max number regions in transition is "<a name="line.1441"></a>
-<span class="sourceLineNo">1442</span>            + maxRegionsInTransition);<a 
name="line.1442"></a>
-<span class="sourceLineNo">1443</span><a name="line.1443"></a>
-<span class="sourceLineNo">1444</span>        for (RegionPlan plan: plans) {<a 
name="line.1444"></a>
-<span class="sourceLineNo">1445</span>          LOG.info("balance " + plan);<a 
name="line.1445"></a>
-<span class="sourceLineNo">1446</span>          //TODO: bulk assign<a 
name="line.1446"></a>
-<span class="sourceLineNo">1447</span>          
this.assignmentManager.moveAsync(plan);<a name="line.1447"></a>
-<span class="sourceLineNo">1448</span>          rpCount++;<a 
name="line.1448"></a>
-<span class="sourceLineNo">1449</span><a name="line.1449"></a>
-<span class="sourceLineNo">1450</span>          
balanceThrottling(balanceStartTime + rpCount * balanceInterval, 
maxRegionsInTransition,<a name="line.1450"></a>
-<span class="sourceLineNo">1451</span>            cutoffTime);<a 
name="line.1451"></a>
-<span class="sourceLineNo">1452</span><a name="line.1452"></a>
-<span class="sourceLineNo">1453</span>          // if performing next balance 
exceeds cutoff time, exit the loop<a name="line.1453"></a>
-<span class="sourceLineNo">1454</span>          if (rpCount &lt; plans.size() 
&amp;&amp; System.currentTimeMillis() &gt; cutoffTime) {<a name="line.1454"></a>
-<span class="sourceLineNo">1455</span>            // TODO: After balance, 
there should not be a cutoff time (keeping it as<a name="line.1455"></a>
-<span class="sourceLineNo">1456</span>            // a security net for now)<a 
name="line.1456"></a>
-<span class="sourceLineNo">1457</span>            LOG.debug("No more balancing 
till next balance run; maxBalanceTime="<a name="line.1457"></a>
-<span class="sourceLineNo">1458</span>                + 
this.maxBlancingTime);<a name="line.1458"></a>
-<span class="sourceLineNo">1459</span>            break;<a 
name="line.1459"></a>
-<span class="sourceLineNo">1460</span>          }<a name="line.1460"></a>
-<span class="sourceLineNo">1461</span>        }<a name="line.1461"></a>
-<span class="sourceLineNo">1462</span>      }<a name="line.1462"></a>
-<span class="sourceLineNo">1463</span><a name="line.1463"></a>
-<span class="sourceLineNo">1464</span>      if (this.cpHost != null) {<a 
name="line.1464"></a>
-<span class="sourceLineNo">1465</span>        try {<a name="line.1465"></a>
-<span class="sourceLineNo">1466</span>          
this.cpHost.postBalance(rpCount &lt; plans.size() ? plans.subList(0, rpCount) : 
plans);<a name="line.1466"></a>
-<span class="sourceLineNo">1467</span>        } catch (IOException ioe) {<a 
name="line.1467"></a>
-<span class="sourceLineNo">1468</span>          // balancing already succeeded 
so don't change the result<a name="line.1468"></a>
-<span class="sourceLineNo">1469</span>          LOG.error("Error invoking 
master coprocessor postBalance()", ioe);<a name="line.1469"></a>
-<span class="sourceLineNo">1470</span>        }<a name="line.1470"></a>
-<span class="sourceLineNo">1471</span>      }<a name="line.1471"></a>
-<span class="sourceLineNo">1472</span>    }<a name="line.1472"></a>
-<span class="sourceLineNo">1473</span>    // If LoadBalancer did not generate 
any plans, it means the cluster is already balanced.<a name="line.1473"></a>
-<span class="sourceLineNo">1474</span>    // Return true indicating a 
success.<a name="line.1474"></a>
-<span class="sourceLineNo">1475</span>    return true;<a name="line.1475"></a>
-<span class="sourceLineNo">1476</span>  }<a name="line.1476"></a>
-<span class="sourceLineNo">1477</span><a name="line.1477"></a>
-<span class="sourceLineNo">1478</span>  @Override<a name="line.1478"></a>
-<span class="sourceLineNo">1479</span>  @VisibleForTesting<a 
name="line.1479"></a>
-<span class="sourceLineNo">1480</span>  public RegionNormalizer 
getRegionNormalizer() {<a name="line.1480"></a>
-<span class="sourceLineNo">1481</span>    return this.normalizer;<a 
name="line.1481"></a>
-<span class="sourceLineNo">1482</span>  }<a name="line.1482"></a>
-<span class="sourceLineNo">1483</span><a name="line.1483"></a>
-<span class="sourceLineNo">1484</span>  /**<a name="line.1484"></a>
-<span class="sourceLineNo">1485</span>   * Perform normalization of cluster 
(invoked by {@link RegionNormalizerChore}).<a name="line.1485"></a>
-<span class="sourceLineNo">1486</span>   *<a name="line.1486"></a>
-<span class="sourceLineNo">1487</span>   * @return true if normalization step 
was performed successfully, false otherwise<a name="line.1487"></a>
-<span class="sourceLineNo">1488</span>   *    (specifically, if HMaster hasn't 
been initialized properly or normalization<a name="line.1488"></a>
-<span class="sourceLineNo">1489</span>   *    is globally disabled)<a 
name="line.1489"></a>
-<span class="sourceLineNo">1490</span>   */<a name="line.1490"></a>
-<span class="sourceLineNo">1491</span>  public boolean normalizeRegions() 
throws IOException {<a name="line.1491"></a>
-<span class="sourceLineNo">1492</span>    if (!isInitialized()) {<a 
name="line.1492"></a>
-<span class="sourceLineNo">1493</span>      LOG.debug("Master has not been 
initialized, don't run region normalizer.");<a name="line.1493"></a>
-<span class="sourceLineNo">1494</span>      return false;<a 
name="line.1494"></a>
-<span class="sourceLineNo">1495</span>    }<a name="line.1495"></a>
-<span class="sourceLineNo">1496</span><a name="line.1496"></a>
-<span class="sourceLineNo">1497</span>    if (isInMaintenanceMode()) {<a 
name="line.1497"></a>
-<span class="sourceLineNo">1498</span>      LOG.info("Master is in maintenance 
mode, don't run region normalizer.");<a name="line.1498"></a>
-<span class="sourceLineNo">1499</span>      return false;<a 
name="line.1499"></a>
-<span class="sourceLineNo">1500</span>    }<a name="line.1500"></a>
-<span class="sourceLineNo">1501</span><a name="line.1501"></a>
-<span class="sourceLineNo">1502</span>    if 
(!this.regionNormalizerTracker.isNormalizerOn()) {<a name="line.1502"></a>
-<span class="sourceLineNo">1503</span>      LOG.debug("Region normalization is 
disabled, don't run region normalizer.");<a name="line.1503"></a>
-<span class="sourceLineNo">1504</span>      return false;<a 
name="line.1504"></a>
-<span class="sourceLineNo">1505</span>    }<a name="line.1505"></a>
-<span class="sourceLineNo">1506</span><a name="line.1506"></a>
-<span class="sourceLineNo">1507</span>    synchronized (this.normalizer) {<a 
name="line.1507"></a>
-<span class="sourceLineNo">1508</span>      // Don't run the normalizer 
concurrently<a name="line.1508"></a>
-<span class="sourceLineNo">1509</span>      List&lt;TableName&gt; 
allEnabledTables = new ArrayList&lt;&gt;(<a name="line.1509"></a>
-<span class="sourceLineNo">1510</span>        
this.tableStateManager.getTablesInStates(TableState.State.ENABLED));<a 
name="line.1510"></a>
-<span class="sourceLineNo">1511</span><a name="line.1511"></a>
-<span class="sourceLineNo">1512</span>      
Collections.shuffle(allEnabledTables);<a name="line.1512"></a>
-<span class="sourceLineNo">1513</span><a name="line.1513"></a>
-<span class="sourceLineNo">1514</span>      for (TableName table : 
allEnabledTables) {<a name="line.1514"></a>
-<span class="sourceLineNo">1515</span>        if (isInMaintenanceMode()) {<a 
name="line.1515"></a>
-<span class="sourceLineNo">1516</span>          LOG.debug("Master is in 
maintenance mode, stop running region normalizer.");<a name="line.1516"></a>
-<span class="sourceLineNo">1517</span>          return false;<a 
name="line.1517"></a>
-<span class="sourceLineNo">1518</span>        }<a name="line.1518"></a>
-<span class="sourceLineNo">1519</span><a name="line.1519"></a>
-<span class="sourceLineNo">1520</span>        TableDescriptor tblDesc = 
getTableDescriptors().get(table);<a name="line.1520"></a>
-<span class="sourceLineNo">1521</span>        if (table.isSystemTable() || 
(tblDesc != null &amp;&amp;<a name="line.1521"></a>
-<span class="sourceLineNo">1522</span>            
!tblDesc.isNormalizationEnabled())) {<a name="line.1522"></a>
-<span class="sourceLineNo">1523</span>          LOG.debug("Skipping 
normalization for table: " + table + ", as it's either system"<a 
name="line.1523"></a>
-<span class="sourceLineNo">1524</span>              + " table or doesn't have 
auto normalization turned on");<a name="line.1524"></a>
-<span class="sourceLineNo">1525</span>          continue;<a 
name="line.1525"></a>
-<span class="sourceLineNo">1526</span>        }<a name="line.1526"></a>
-<span class="sourceLineNo">1527</span>        List&lt;NormalizationPlan&gt; 
plans = this.normalizer.computePlanForTable(table);<a name="line.1527"></a>
-<span class="sourceLineNo">1528</span>        if (plans != null) {<a 
name="line.1528"></a>
-<span class="sourceLineNo">1529</span>          for (NormalizationPlan plan : 
plans) {<a name="line.1529"></a>
-<span class="sourceLineNo">1530</span>            
plan.execute(clusterConnection.getAdmin());<a name="line.1530"></a>
-<span class="sourceLineNo">1531</span>            if (plan.getType() == 
PlanType.SPLIT) {<a name="line.1531"></a>
-<span class="sourceLineNo">1532</span>              splitPlanCount++;<a 
name="line.1532"></a>
-<span class="sourceLineNo">1533</span>            } else if (plan.getType() == 
PlanType.MERGE) {<a name="line.1533"></a>
-<span class="sourceLineNo">1534</span>              mergePlanCount++;<a 
name="line.1534"></a>
-<span class="sourceLineNo">1535</span>            }<a name="line.1535"></a>
-<span class="sourceLineNo">1536</span>          }<a name="line.1536"></a>
-<span class="sourceLineNo">1537</span>        }<a name="line.1537"></a>
-<span class="sourceLineNo">1538</span>      }<a name="line.1538"></a>
-<span class="sourceLineNo">1539</span>    }<a name="line.1539"></a>
-<span class="sourceLineNo">1540</span>    // If Region did not generate any 
plans, it means the cluster is already balanced.<a name="line.1540"></a>
-<span class="sourceLineNo">1541</span>    // Return true indicating a 
success.<a name="line.1541"></a>
-<span class="sourceLineNo">1542</span>    return true;<a name="line.1542"></a>
-<span class="sourceLineNo">1543</span>  }<a name="line.1543"></a>
-<span class="sourceLineNo">1544</span><a name="line.1544"></a>
-<span class="sourceLineNo">1545</span>  /**<a name="line.1545"></a>
-<span class="sourceLineNo">1546</span>   * @return Client info for use as 
prefix on an audit log string; who did an action<a name="line.1546"></a>
-<span class="sourceLineNo">1547</span>   */<a name="line.1547"></a>
-<span class="sourceLineNo">1548</span>  @Override<a name="line.1548"></a>
-<span class="sourceLineNo">1549</span>  public String getClientIdAuditPrefix() 
{<a name="line.1549"></a>
-<span class="sourceLineNo">1550</span>    return "Client=" + 
RpcServer.getRequestUserName().orElse(null)<a name="line.1550"></a>
-<span class="sourceLineNo">1551</span>        + "/" + 
RpcServer.getRemoteAddress().orElse(null);<a name="line.1551"></a>
-<span class="sourceLineNo">1552</span>  }<a name="line.1552"></a>
-<span class="sourceLineNo">1553</span><a name="line.1553"></a>
-<span class="sourceLineNo">1554</span>  /**<a name="line.1554"></a>
-<span class="sourceLineNo">1555</span>   * Switch for the background 
CatalogJanitor thread.<a name="line.1555"></a>
-<span class="sourceLineNo">1556</span>   * Used for testing.  The thread will 
continue to run.  It will just be a noop<a name="line.1556"></a>
-<span class="sourceLineNo">1557</span>   * if disabled.<a name="line.1557"></a>
-<span class="sourceLineNo">1558</span>   * @param b If false, the catalog 
janitor won't do anything.<a name="line.1558"></a>
-<span class="sourceLineNo">1559</span>   */<a name="line.1559"></a>
-<span class="sourceLineNo">1560</span>  public void 
setCatalogJanitorEnabled(final boolean b) {<a name="line.1560"></a>
-<span class="sourceLineNo">1561</span>    
this.catalogJanitorChore.setEnabled(b);<a name="line.1561"></a>
-<span class="sourceLineNo">1562</span>  }<a name="line.1562"></a>
-<span class="sourceLineNo">1563</span><a name="line.1563"></a>
-<span class="sourceLineNo">1564</span>  @Override<a name="line.1564"></a>
-<span class="sourceLineNo">1565</span>  public long mergeRegions(<a 
name="line.1565"></a>
-<span class="sourceLineNo">1566</span>      final RegionInfo[] 
regionsToMerge,<a name="line.1566"></a>
-<span class="sourceLineNo">1567</span>      final boolean forcible,<a 
name="line.1567"></a>
-<span class="sourceLineNo">1568</span>      final long nonceGroup,<a 
name="line.1568"></a>
-<span class="sourceLineNo">1569</span>      final long nonce) throws 
IOException {<a name="line.1569"></a>
-<span class="sourceLineNo">1570</span>    checkInitialized();<a 
name="line.1570"></a>
-<span class="sourceLineNo">1571</span><a name="line.1571"></a>
-<span class="sourceLineNo">1572</span>    assert(regionsToMerge.length == 
2);<a name="line.1572"></a>
-<span class="sourceLineNo">1573</span><a name="line.1573"></a>
-<span class="sourceLineNo">1574</span>    TableName tableName = 
regionsToMerge[0].getTable();<a name="line.1574"></a>
-<span class="sourceLineNo">1575</span>    if (tableName == null || 
regionsToMerge[1].getTable() == null) {<a name="line.1575"></a>
-<span class="sourceLineNo">1576</span>      throw new UnknownRegionException 
("Can't merge regions without table associated");<a name="line.1576"></a>
-<span class="sourceLineNo">1577</span>    }<a name="line.1577"></a>
-<span class="sourceLineNo">1578</span><a name="line.1578"></a>
-<span class="sourceLineNo">1579</span>    if 
(!tableName.equals(regionsToMerge[1].getTable())) {<a name="line.1579"></a>
-<span class="sourceLineNo">1580</span>      throw new IOException (<a 
name="line.1580"></a>
-<span class="sourceLineNo">1581</span>        "Cannot merge regions from two 
different tables " + regionsToMerge[0].getTable()<a name="line.1581"></a>
-<span class="sourceLineNo">1582</span>        + " and " + 
regionsToMerge[1].getTable());<a name="line.1582"></a>
-<span class="sourceLineNo">1583</span>    }<a name="line.1583"></a>
-<span class="sourceLineNo">1584</span><a name="line.1584"></a>
-<span class="sourceLineNo">1585</span>    if 
(RegionInfo.COMPARATOR.compare(regionsToMerge[0], regionsToMerge[1]) == 0) {<a 
name="line.1585"></a>
-<span class="sourceLineNo">1586</span>      throw new MergeRegionException(<a 
name="line.1586"></a>
-<span class="sourceLineNo">1587</span>        "Cannot merge a region to itself 
" + regionsToMerge[0] + ", " + regionsToMerge[1]);<a name="line.1587"></a>
-<span class="sourceLineNo">1588</span>    }<a name="line.1588"></a>
-<span class="sourceLineNo">1589</span><a name="line.1589"></a>
-<span class="sourceLineNo">1590</span>    return 
MasterProcedureUtil.submitProcedure(<a name="line.1590"></a>
-<span class="sourceLineNo">1591</span>        new 
MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a 
name="line.1591"></a>
-<span class="sourceLineNo">1592</span>      @Override<a name="line.1592"></a>
-<span class="sourceLineNo">1593</span>      protected void run() throws 
IOException {<a name="line.1593"></a>
-<span class="sourceLineNo">1594</span>        
getMaster().getMasterCoprocessorHost().preMergeRegions(regionsToMerge);<a 
name="line.1594"></a>
-<span class="sourceLineNo">1595</span><a name="line.1595"></a>
-<span class="sourceLineNo">1596</span>        
LOG.info(getClientIdAuditPrefix() + " Merge regions " +<a name="line.1596"></a>
-<span class="sourceLineNo">1597</span>          
regionsToMerge[0].getEncodedName() + " and " + 
regionsToMerge[1].getEncodedName());<a name="line.1597"></a>
-<span class="sourceLineNo">1598</span><a name="line.1598"></a>
-<span class="sourceLineNo">1599</span>        submitProcedure(new 
MergeTableRegionsProcedure(procedureExecutor.getEnvironment(),<a 
name="line.1599"></a>
-<span class="sourceLineNo">1600</span>          regionsToMerge, forcible));<a 
name="line.1600"></a>
-<span class="sourceLineNo">1601</span><a name="line.1601"></a>
-<span class="sourceLineNo">1602</span>        
getMaster().getMasterCoprocessorHost().postMergeRegions(regionsToMerge);<a 
name="line.1602"></a>
-<span class="sourceLineNo">1603</span>      }<a name="line.1603"></a>
-<span class="sourceLineNo">1604</span><a name="line.1604"></a>
-<span class="sourceLineNo">1605</span>      @Override<a name="line.1605"></a>
-<span class="sourceLineNo">1606</span>      protected String getDescription() 
{<a name="line.1606"></a>
-<span class="sourceLineNo">1607</span>        return "MergeTableProcedure";<a 
name="line.1607"></a>
-<span class="sourceLineNo">1608</span>      }<a name="line.1608"></a>
-<span class="sourceLineNo">1609</span>    });<a name="line.1609"></a>
-<span class="sourceLineNo">1610</span>  }<a name="line.1610"></a>
-<span class="sourceLineNo">1611</span><a name="line.1611"></a>
-<span class="sourceLineNo">1612</span>  @Override<a name="line.1612"></a>
-<span class="sourceLineNo">1613</span>  public long splitRegion(final 
RegionInfo regionInfo, final byte[] splitRow,<a name="line.1613"></a>
-<span class="sourceLineNo">1614</span>      final long nonceGroup, final long 
nonce)<a name="line.1614"></a>
-<span class="sourceLineNo">1615</span>  throws IOException {<a 
name="line.1615"></a>
-<span class="sourceLineNo">1616</span>    checkInitialized();<a 
name="line.1616"></a>
-<span class="sourceLineNo">1617</span>    return 
MasterProcedureUtil.submitProcedure(<a name="line.1617"></a>
-<span class="sourceLineNo">1618</span>        new 
MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a 
name="line.1618"></a>
-<span class="sourceLineNo">1619</span>      @Override<a name="line.1619"></a>
-<span class="sourceLineNo">1620</span>      protected void run() throws 
IOException {<a name="line.1620"></a>
-<span class="sourceLineNo">1621</span>        
getMaster().getMasterCoprocessorHost().preSplitRegion(regionInfo.getTable(), 
splitRow);<a name="line.1621"></a>
-<span class="sourceLineNo">1622</span>        
LOG.info(getClientIdAuditPrefix() + " split " + 
regionInfo.getRegionNameAsString());<a name="line.1622"></a>
-<span class="sourceLineNo">1623</span><a name="line.1623"></a>
-<span class="sourceLineNo">1624</span>        // Execute the operation 
asynchronously<a name="line.1624"></a>
-<span class="sourceLineNo">1625</span>        
submitProcedure(getAssignmentManager().createSplitProcedure(regionInfo, 
splitRow));<a name="line.1625"></a>
-<span class="sourceLineNo">1626</span>      }<a name="line.1626"></a>
-<span class="sourceLineNo">1627</span><a name="line.1627"></a>
-<span class="sourceLineNo">1628</span>      @Override<a name="line.1628"></a>
-<span class="sourceLineNo">1629</span>      protected String getDescription() 
{<a name="line.1629"></a>
-<span class="sourceLineNo">1630</span>        return "SplitTableProcedure";<a 
name="line.1630"></a>
-<span class="sourceLineNo">1631</span>      }<a name="line.1631"></a>
-<span class="sourceLineNo">1632</span>    });<a name="line.1632"></a>
-<span class="sourceLineNo">1633</span>  }<a name="line.1633"></a>
-<span class="sourceLineNo">1634</span><a name="line.1634"></a>
-<span class="sourceLineNo">1635</span>  // Public so can be accessed by tests. 
Blocks until move is done.<a name="line.1635"></a>
-<span class="sourceLineNo">1636</span>  // Replace with an async 
implementation from which you can get<a name="line.1636"></a>
-<span class="sourceLineNo">1637</span>  // a success/failure result.<a 
name="line.1637"></a>
-<span class="sourceLineNo">1638</span>  @VisibleForTesting<a 
name="line.1638"></a>
-<span class="sourceLineNo">1639</span>  public void move(final byte[] 
encodedRegionName, byte[] destServerName) throws HBaseIOException {<a 
name="line.1639"></a>
-<span class="sourceLineNo">1640</span>    RegionState regionState = 
assignmentManager.getRegionStates().<a name="line.1640"></a>
-<span class="sourceLineNo">1641</span>      
getRegionState(Bytes.toString(encodedRegionName));<a name="line.1641"></a>
-<span class="sourceLineNo">1642</span><a name="line.1642"></a>
-<span class="sourceLineNo">1643</span>    RegionInfo hri;<a 
name="line.1643"></a>
-<span class="sourceLineNo">1644</span>    if (regionState != null) {<a 
name="line.1644"></a>
-<span class="sourceLineNo">1645</span>      hri = regionState.getRegion();<a 
name="line.1645"></a>
-<span class="sourceLineNo">1646</span>    } else {<a name="line.1646"></a>
-<span class="sourceLineNo">1647</span>      throw new 
UnknownRegionException(Bytes.toStringBinary(encodedRegionName));<a 
name="line.1647"></a>
-<span class="sourceLineNo">1648</span>    }<a name="line.1648"></a>
-<span class="sourceLineNo">1649</span><a name="line.1649"></a>
-<span class="sourceLineNo">1650</span>    ServerName dest;<a 
name="line.1650"></a>
-<span class="sourceLineNo">1651</span>    List&lt;ServerName&gt; exclude = 
hri.getTable().isSystemTable() ? 
assignmentManager.getExcludedServersForSystemTable()<a name="line.1651"></a>
-<span class="sourceLineNo">1652</span>        : new ArrayList&lt;&gt;(1);<a 
name="line.1652"></a>
-<span class="sourceLineNo">1653</span>    if (destServerName != null 
&amp;&amp; 
exclude.contains(ServerName.valueOf(Bytes.toString(destServerName)))) {<a 
name="line.1653"></a>
-<span class="sourceLineNo">1654</span>      LOG.info(<a name="line.1654"></a>
-<span class="sourceLineNo">1655</span>          
Bytes.toString(encodedRegionName) + " can not move to " + 
Bytes.toString(destServerName)<a name="line.1655"></a>
-<span class="sourceLineNo">1656</span>              + " because the server is 
in exclude list");<a name="line.1656"></a>
-<span class="sourceLineNo">1657</span>      destServerName = null;<a 
name="line.1657"></a>
-<span class="sourceLineNo">1658</span>    }<a name="line.1658"></a>
-<span class="sourceLineNo">1659</span>    if (destServerName == null || 
destServerName.length == 0) {<a name="line.1659"></a>
-<span class="sourceLineNo">1660</span>      LOG.info("Passed destination 
servername is null/empty so " +<a name="line.1660"></a>
-<span class="sourceLineNo">1661</span>        "choosing a server at 
random");<a name="line.1661"></a>
-<span class="sourceLineNo">1662</span>      
exclude.add(regionState.getServerName());<a name="line.1662"></a>
-<span class="sourceLineNo">1663</span>      final List&lt;ServerName&gt; 
destServers = this.serverManager.createDestinationServersList(exclude);<a 
name="line.1663"></a>
-<span class="sourceLineNo">1664</span>      dest = 
balancer.randomAssignment(hri, destServers);<a name="line.1664"></a>
-<span class="sourceLineNo">1665</span>      if (dest == null) {<a 
name="line.1665"></a>
-<span class="sourceLineNo">1666</span>        LOG.debug("Unable to determine a 
plan to assign " + hri);<a name="line.1666"></a>
-<span class="sourceLineNo">1667</span>        return;<a name="line.1667"></a>
-<span class="sourceLineNo">1668</span>      }<a name="line.1668"></a>
-<span class="sourceLineNo">1669</span>    } else {<a name="line.1669"></a>
-<span class="sourceLineNo">1670</span>      ServerName candidate = 
ServerName.valueOf(Bytes.toString(destServerName));<a name="line.1670"></a>
-<span class="sourceLineNo">1671</span>      dest = 
balancer.randomAssignment(hri, Lists.newArrayList(candidate));<a 
name="line.1671"></a>
-<span class="sourceLineNo">1672</span>      if (dest == null) {<a 
name="line.1672"></a>
-<span class="sourceLineNo">1673</span>        LOG.debug("Unable to determine a 
plan to assign " + hri);<a name="line.1673"></a>
-<span class="sourceLineNo">1674</span>        return;<a name="line.1674"></a>
-<span class="sourceLineNo">1675</span>      }<a name="line.1675"></a>
-<span class="sourceLineNo">1676</span>      // TODO: What is this? I don't get 
it.<a name="line.1676"></a>
-<span class="sourceLineNo">1677</span>      if (dest.equals(serverName) 
&amp;&amp; balancer instanceof BaseLoadBalancer<a name="line.1677"></a>
-<span class="sourceLineNo">1678</span>          &amp;&amp; 
!((BaseLoadBalancer)balancer).shouldBeOnMaster(hri)) {<a name="line.1678"></a>
-<span class="sourceLineNo">1679</span>        // To avoid unnecessary region 
moving later by balancer. Don't put user<a name="line.1679"></a>
-<span class="sourceLineNo">1680</span>        // regions on master.<a 
name="line.1680"></a>
-<span class="sourceLineNo">1681</span>        LOG.debug("Skipping move of 
region " + hri.getRegionNameAsString()<a name="line.1681"></a>
-<span class="sourceLineNo">1682</span>          + " to avoid unnecessary 
region moving later by load balancer,"<a name="line.1682"></a>
-<span class="sourceLineNo">1683</span>          + " because it should not be 
on master");<a name="line.1683"></a>
-<span class="sourceLineNo">1684</span>        return;<a name="line.1684"></a>
-<span class="sourceLineNo">1685</span>      }<a name="line.1685"></a>
-<span class="sourceLineNo">1686</span>    }<a name="line.1686"></a>
-<span class="sourceLineNo">1687</span><a name="line.1687"></a>
-<span class="sourceLineNo">1688</span>    if 
(dest.equals(regionState.getServerName())) {<a name="line.1688"></a>
-<span class="sourceLineNo">1689</span>      LOG.debug("Skipping move of region 
" + hri.getRegionNameAsString()<a name="line.1689"></a>
-<span class="sourceLineNo">1690</span>        + " because region already 
assigned to the same server " + dest + ".");<a name="line.1690"></a>
-<span class="sourceLineNo">1691</span>      return;<a name="line.1691"></a>
-<span class="sourceLineNo">1692</span>    }<a name="line.1692"></a>
-<span class="sourceLineNo">1693</span><a name="line.1693"></a>
-<span class="sourceLineNo">1694</span>    // Now we can do the move<a 
name="line.1694"></a>
-<span class="sourceLineNo">1695</span>    RegionPlan rp = new RegionPlan(hri, 
regionState.getServerName(), dest);<a name="line.1695"></a>
-<span class="sourceLineNo">1696</span>    assert rp.getDestination() != null: 
rp.toString() + " " + dest;<a name="line.1696"></a>
-<span class="sourceLineNo">1697</span>    assert rp.getSource() != null: 
rp.toString();<a name="line.1697"></a>
-<span class="sourceLineNo">1698</span><a name="line.1698"></a>
-<span class="sourceLineNo">1699</span>    try {<a name="line.1699"></a>
-<span class="sourceLineNo">1700</span>      checkInitialized();<a 
name="line.1700"></a>
-<span class="sourceLineNo">1701</span>      if (this.cpHost != null) {<a 
name="line.1701"></a>
-<span class="sourceLineNo">1702</span>        this.cpHost.preMove(hri, 
rp.getSource(), rp.getDestination());<a name="line.1702"></a>
-<span class="sourceLineNo">1703</span>      }<a name="line.1703"></a>
-<span class="sourceLineNo">1704</span>      // Warmup the region on the 
destination before initiating the move. this call<a name="line.1704"></a>
-<span class="sourceLineNo">1705</span>      // is synchronous and takes some 
time. doing it before the source region gets<a name="line.1705"></a>
-<span class="sourceLineNo">1706</span>      // closed<a name="line.1706"></a>
-<span class="sourceLineNo">1707</span>      
serverManager.sendRegionWarmup(rp.getDestination(), hri);<a 
name="line.1707"></a>
-<span class="sourceLineNo">1708</span><a name="line.1708"></a>
-<span class="sourceLineNo">1709</span>      LOG.info(getClientIdAuditPrefix() 
+ " move " + rp + ", running balancer");<a name="line.1709"></a>
-<span class="sourceLineNo">1710</span>      Future&lt;byte []&gt; future = 
this.assignmentManager.moveAsync(rp);<a name="line.1710"></a>
-<span class="sourceLineNo">1711</span>      try {<a name="line.1711"></a>
-<span class="sourceLineNo">1712</span>        // Is this going to work? Will 
we throw exception on error?<a name="line.1712"></a>
-<span class="sourceLineNo">1713</span>        // TODO: CompletableFuture 
rather than this stunted Future.<a name="line.1713"></a>
-<span class="sourceLineNo">1714</span>        future.get();<a 
name="line.1714"></a>
-<span class="sourceLineNo">1715</span>      } catch (InterruptedException | 
ExecutionException e) {<a name="line.1715"></a>
-<span class="sourceLineNo">1716</span>        throw new HBaseIOException(e);<a 
name="line.1716"></a>
-<span class="sourceLineNo">1717</span>      }<a name="line.1717"></a>
-<span class="sourceLineNo">1718</span>      if (this.cpHost != null) {<a 
name="line.1718"></a>
-<span class="sourceLineNo">1719</span>        this.cpHost.postMove(hri, 
rp.getSource(), rp.getDestination());<a name="line.1719"></a>
-<span class="sourceLineNo">1720</span>      }<a name="line.1720"></a>
-<span class="sourceLineNo">1721</span>    } catch (IOException ioe) {<a 
name="line.1721"></a>
-<span class="sourceLineNo">1722</span>      if (ioe instanceof 
HBaseIOException) {<a name="line.1722"></a>
-<span class="sourceLineNo">1723</span>        throw (HBaseIOException)ioe;<a 
name="line.1723"></a>
-<span class="sourceLineNo">1724</span>      }<a name="line.1724"></a>
-<span class="sourceLineNo">1725</span>      throw new HBaseIOException(ioe);<a 
name="line.1725"></a>
-<span class="sourceLineNo">1726</span>    }<a name="line.1726"></a>
-<span class="sourceLineNo">1727</span>  }<a name="line.1727"></a>
-<span class="sourceLineNo">1728</span><a name="line.1728"></a>
-<span class="sourceLineNo">1729</span>  @Override<a name="line.1729"></a>
-<span class="sourceLineNo">1730</span>  public long createTable(<a 
name="line.1730"></a>
-<span class="sourceLineNo">1731</span>      final TableDescriptor 
tableDescriptor,<a name="line.1731"></a>
-<span class="sourceLineNo">1732</span>      final byte [][] splitKeys,<a 
name="line.1732"></a>
-<span class="sourceLineNo">1733</span>      final long nonceGroup,<a 
name="line.1733"></a>
-<span class="sourceLineNo">1734</span>      final long nonce) throws 
IOException {<a name="line.1734"></a>
-<span class="sourceLineNo">1735</span>    checkInitialized();<a 
name="line.1735"></a>
-<span class="sourceLineNo">1736</span><a name="line.1736"></a>
-<span class="sourceLineNo">1737</span>    String namespace = 
tableDescriptor.getTableName().getNamespaceAsString();<a name="line.1737"></a>
-<span class="sourceLineNo">1738</span>    
this.clusterSchemaService.getNamespace(namespace);<a name="line.1738"></a>
-<span class="sourceLineNo">1739</span><a name="line.1739"></a>
-<span class="sourceLineNo">1740</span>    RegionInfo[] newRegions = 
ModifyRegionUtils.createRegionInfos(tableDescriptor, splitKeys);<a 
name="line.1740"></a>
-<span class="sourceLineNo">1741</span>    
sanityCheckTableDescriptor(tableDescriptor);<a name="line.1741"></a>
-<span class="sourceLineNo">1742</span><a name="line.1742"></a>
-<span class="sourceLineNo">1743</span>    return 
MasterProcedureUtil.submitProcedure(<a name="line.1743"></a>
-<span class="sourceLineNo">1744</span>        new 
MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup, nonce) {<a 
name="line.1744"></a>
-<span class="sourceLineNo">1745</span>      @Override<a name="line.1745"></a>
-<span class="sourceLineNo">1746</span>      protected void run() throws 
IOException {<a name="line.1746"></a>
-<span class="sourceLineNo">1747</span>        
getMaster().getMasterCoprocessorHost().preCreateTable(tableDescriptor, 
newRegions);<a name="line.1747"></a>
-<span class="sourceLineNo">1748</span><a name="line.1748"></a>
-<span class="sourceLineNo">1749</span>        
LOG.info(getClientIdAuditPrefix() + " create " + tableDescriptor);<a 
name="line.1749"></a>
-<span class="sourceLineNo">1750</span><a name="line.1750"></a>
-<span class="sourceLineNo">1751</span>        // TODO: We can handle/merge 
duplicate requests, and differentiate the case of<a name="line.1751"></a>
-<span class="sourceLineNo">1752</span>        //       TableExistsException by 
saying if the schema is the same or not.<a name="line.1752"></a>
-<span class="sourceLineNo">1753</span>        ProcedurePrepareLatch latch = 
ProcedurePrepareLatch.createLatch();<a name="line.1753"></a>
-<span class="sourceLineNo">1754</span>        submitProcedure(new 
CreateTableProcedure(<a name="line.1754"></a>
-<span class="sourceLineNo">1755</span>            
procedureExecutor.getEnvironment(), tableDescriptor, newRegions, latch));<a 
name="line.1755"></a>
-<span class="sourceLineNo">1756</span>        latch.await();<a 
name="line.1756"></a>
-<span class="sourceLineNo">1757</span><a name="line.1757"></a>
-<span class="sourceLineNo">1758</span>        
getMaster().getMasterCoprocessorHost().postCreateTable(tableDescriptor, 
newRegions);<a name="line.1758"></a>
-<span class="sourceLineNo">1759</span>      }<a name="line.1759"></a>
-<span class="sourceLineNo">1760</span><a name="line.1760"></a>
-<span class="sourceLineNo">1761</span>      @Override<a name="line.1761"></a>
-<span class="sourceLineNo">1762</span>      protected String getDescription() 
{<a name="line.1762"></a>
-<span class="sourceLineNo">1763</span>        return "CreateTableProcedure";<a 
name="line.1763"></a>
-<span class="sourceLineNo">1764</span>      }<a name="line.1764"></a>
-<span class="sourceLineNo">1765</span>    });<a name="line.1765"></a>
-<span class="sourceLineNo">1766</span>  }<a name="line.1766"></a>
-<span class="sourceLineNo">1767</span><a name="line.1767"></a>
-<span class="sourceLineNo">1768</span>  @Override<a name="line.1768"></a>
-<span class="sourceLineNo">1769</span>  public long createSystemTable(final 
TableDescriptor tableDescriptor) throws IOException {<a name="line.1769"></a>
-<span class="sourceLineNo">1770</span>    if (isStopped()) {<a 
name="line.1770"></a>
-<span class="sourceLineNo">1771</span>      throw new 
MasterNotRunningException();<a name="line.1771"></a>
-<span class="sourceLineNo">1772</span>    }<a name="line.1772"></a>
-<span class="sourceLineNo">1773</span><a name="line.1773"></a>
-<span class="sourceLineNo">1774</span>    TableName tableName = 
tableDescriptor.getTableName();<a name="line.1774"></a>
-<span class="sourceLineNo">1775</span>    if (!(tableName.isSystemTable())) 
{<a name="line.1775"></a>
-<span class="sourceLineNo">1776</span>      throw new 
IllegalArgumentException(<a name="line.1776"></a>
-<span class="sourceLineNo">1777</span>        "Only system table creation can 
use this createSystemTable API");<a name="line.1777"></a>
-<span class="sourceLineNo">1778</span>    }<a name="line.1778"></a>
-<span class="sourceLineNo">1779</span><a name="line.1779"></a>
-<span class="sourceLineNo">1780</span>    RegionInfo[] newRegions = 
ModifyRegionUtils.createRegionInfos(tableDescriptor, null);<a 
name="line.1780"></a>
-<span class="sourceLineNo">1781</span><a name="line.1781"></a>
-<span class="sourceLineNo">1782</span>    LOG.info(getClientIdAuditPrefix() + 
" create " + tableDescriptor);<a name="line.1782"></a>
-<span class="sourceLineNo">1783</span><a name="line.1783"></a>
-<span class="sourceLineNo">1784</span>    // This special create table is 
called locally to master.  Therefore, no RPC means no need<a 
name="line.1784"></a>
-<span class="sourceLineNo">1785</span>    // to use nonce to detect duplicated 
RPC call.<a name="line.1785"></a>
-<span class="sourceLineNo">1786</span>    long procId = 
this.procedureExecutor.submitProcedure(<a name="line.1786"></a>
-<span class="sourceLineNo">1787</span>      new 
CreateTableProcedure(procedureExecutor.getEnvironment(), tableDescriptor, 
newRegions));<a name="line.1787"></a>
-<span class="sourceLineNo">1788</span><a name="line.1788"></a>
-<span class="sourceLineNo">1789</span>    return procId;<a 
name="line.1789"></a>
-<span class="sourceLineNo">1790</span>  }<a name="line.1790"></a>
-<span class="sourceLineNo">1791</span><a name="line.1791"></a>
-<span class="sourceLineNo">1792</span>  /**<a name="line.1792"></a>
-<span class="sourceLineNo">1793</span>   * Checks whether the table conforms 
to some sane limits, and configured<a name="line.1793"></a>
-<span class="sourceLineNo">1794</span>   * values (compression, etc) work. 
Throws an exception if something is wrong.<a name="line.1794"></a>
-<span class="sourceLineNo">1795</span>   * @throws IOException<a 
name="line.1795"></a>
-<span class="sourceLineNo">1796</span>   */<a name="line.1796"></a>
-<span class="sourceLineNo">1797</span>  private void 
sanityCheckTableDescriptor(final TableDescriptor htd) throws IOException {<a 
name="line.1797"></a>
-<span class="sourceLineNo">1798</span>    final String CONF_KEY = 
"hbase.table.sanity.checks";<a name="line.1798"></a>
-<span class="sourceLineNo">1799</span>    boolean logWarn = false;<a 
name="line.1799"></a>
-<span class="sourceLineNo">1800</span>    if (!conf.getBoolean(CONF_KEY, 
true)) {<a name="line.1800"></a>
-<span class="sourceLineNo">1801</span>      logWarn = true;<a 
name="line.1801"></a>
-<span class="sourceLineNo">1802</span>    }<a name="line.1802"></a>
-<span class="sourceLineNo">1803</span>    String tableVal = 
htd.getValue(CONF_KEY);<a name="line.1803"></a>
-<span class="sourceLineNo">1804</span>    if (tableVal != null &amp;&amp; 
!Boolean.valueOf(tableVal)) {<a name="line.1804"></a>
-<span class="sourceLineNo">1805</span>      logWarn = true;<a 
name="line.1805"></a>
-<span class="sourceLineNo">1806</span>    }<a name="line.1806"></a>
-<span class="sourceLineNo">1807</span><a name="line.1807"></a>
-<span class="sourceLineNo">1808</span>    // check max file size<a 
name="line.1808"></a>
-<span class="sourceLineNo">1809</span>    long maxFileSizeLowerLimit = 2 * 
1024 * 1024L; // 2M is the default lower limit<a name="line.1809"></a>
-<span class="sourceLineNo">1810</span>    long maxFileSize = 
htd.getMaxFileSize();<a name="line.1810"></a>
-<span class="sourceLineNo">1811</span>    if (maxFileSize &lt; 0) {<a 
name="line.1811"></a>
-<span class="sourceLineNo">1812</span>      maxFileSize = 
conf.getLong(HConstants.HREGION_MAX_FILESIZE, maxFileSizeLowerLimit);<a 
name="line.1812"></a>
-<span class="sourceLineNo">1813</span>    }<a name="line.1813"></a>
-<span class="sourceLineNo">1814</span>    if (maxFileSize &lt; 
conf.getLong("hbase.hregion.max.filesize.limit", maxFileSizeLowerLimit)) {<a 
name="line.1814"></a>
-<span class="sourceLineNo">1815</span>      String message = "MAX_FILESIZE for 
table descriptor or "<a name="line.1815"></a>
-<span class="sourceLineNo">1816</span>          + 
"\"hbase.hregion.max.filesize\" (" + maxFileSize<a name="line.1816"></a>
-<span class="sourceLineNo">1817</span>          + ") is too small, which might 
cause over splitting into unmanageable "<a name="line.1817"></a>
-<span class="sourceLineNo">1818</span>          + "number of regions.";<a 
name="line.1818"></a>
-<span class="sourceLineNo">1819</span>      
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);<a 
name="line.1819"></a>
-<span class="sourceLineNo">1820</span>    }<a name="line.1820"></a>
-<span class="sourceLineNo">1821</span><a name="line.1821"></a>
-<span class="sourceLineNo">1822</span>    // check flush size<a 
name="line.1822"></a>
-<span class="sourceLineNo">1823</span>    long flushSizeLowerLimit = 1024 * 
1024L; // 1M is the default lower limit<a name="line.1823"></a>
-<span class="sourceLineNo">1824</span>    long flushSize = 
htd.getMemStoreFlushSize();<a name="line.1824"></a>
-<span class="sourceLineNo">1825</span>    if (flushSize &lt; 0) {<a 
name="line.1825"></a>
-<span class="sourceLineNo">1826</span>      flushSize = 
conf.getLong(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, flushSizeLowerLimit);<a 
name="line.1826"></a>
-<span class="sourceLineNo">1827</span>    }<a name="line.1827"></a>
-<span class="sourceLineNo">1828</span>    if (flushSize &lt; 
conf.getLong("hbase.hregion.memstore.flush.size.limit", flushSizeLowerLimit)) 
{<a name="line.1828"></a>
-<span class="sourceLineNo">1829</span>      String message = 
"MEMSTORE_FLUSHSIZE for table descriptor or "<a name="line.1829"></a>
-<span class="sourceLineNo">1830</span>          + 
"\"hbase.hregion.memstore.flush.size\" ("+flushSize+") is too small, which 
might cause"<a name="line.1830"></a>
-<span class="sourceLineNo">1831</span>          + " very frequent 
flushing.";<a name="line.1831"></a>
-<span class="sourceLineNo">1832</span>      
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);<a 
name="line.1832"></a>
-<span class="sourceLineNo">1833</span>    }<a name="line.1833"></a>
-<span class="sourceLineNo">1834</span><a name="line.1834"></a>
-<span class="sourceLineNo">1835</span>    // check that coprocessors and other 
specified plugin classes can be loaded<a name="line.1835"></a>
-<span class="sourceLineNo">1836</span>    try {<a name="line.1836"></a>
-<span class="sourceLineNo">1837</span>      checkClassLoading(conf, htd);<a 
name="line.1837"></a>
-<span class="sourceLineNo">1838</span>    } catch (Exception ex) {<a 
name="line.1838"></a>
-<span class="sourceLineNo">1839</span>      
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, ex.getMessage(), null);<a 
name="line.1839"></a>
-<span class="sourceLineNo">1840</span>    }<a name="line.1840"></a>
-<span class="sourceLineNo">1841</span><a name="line.1841"></a>
-<span class="sourceLineNo">1842</span>    // check compression can be loaded<a 
name="line.1842"></a>
-<span class="sourceLineNo">1843</span>    try {<a name="line.1843"></a>
-<span class="sourceLineNo">1844</span>      checkCompression(htd);<a 
name="line.1844"></a>
-<span class="sourceLineNo">1845</span>    } catch (IOException e) {<a 
name="line.1845"></a>
-<span class="sourceLineNo">1846</span>      
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, e.getMessage(), e);<a 
name="line.1846"></a>
-<span class="sourceLineNo">1847</span>    }<a name="line.1847"></a>
-<span class="sourceLineNo">1848</span><a name="line.1848"></a>
-<span class="sourceLineNo">1849</span>    // check encryption can be loaded<a 
name="line.1849"></a>
-<span class="sourceLineNo">1850</span>    try {<a name="line.1850"></a>
-<span class="sourceLineNo">1851</span>      checkEncryption(conf, htd);<a 
name="line.1851"></a>
-<span class="sourceLineNo">1852</span>    } catch (IOException e) {<a 
name="line.1852"></a>
-<span class="sourceLineNo">1853</span>      
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, e.getMessage(), e);<a 
name="line.1853"></a>
-<span class="sourceLineNo">1854</span>    }<a name="line.1854"></a>
-<span class="sourceLineNo">1855</span>    // Verify compaction policy<a 
name="line.1855"></a>
-<span class="sourceLineNo">1856</span>    try{<a name="line.1856"></a>
-<span class="sourceLineNo">1857</span>      checkCompactionPolicy(conf, 
htd);<a name="line.1857"></a>
-<span class="sourceLineNo">1858</span>    } catch(IOException e){<a 
name="line.1858"></a>
-<span class="sourceLineNo">1859</span>      
warnOrThrowExceptionForFailure(false, CONF_KEY, e.getMessage(), e);<a 
name="line.1859"></a>
-<span class="sourceLineNo">1860</span>    }<a name="line.1860"></a>
-<span class="sourceLineNo">1861</span>    // check that we have at least 1 
CF<a name="line.1861"></a>
-<span class="sourceLineNo">1862</span>    if (htd.getColumnFamilyCount() == 0) 
{<a name="line.1862"></a>
-<span class="sourceLineNo">1863</span>      String message = "Table should 
have at least one column family.";<a name="line.1863"></a>
-<span class="sourceLineNo">1864</span>      
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);<a 
name="line.1864"></a>
-<span class="sourceLineNo">1865</span>    }<a name="line.1865"></a>
-<span class="sourceLineNo">1866</span><a name="line.1866"></a>
-<span class="sourceLineNo">1867</span>    for (ColumnFamilyDescriptor hcd : 
htd.getColumnFamilies()) {<a name="line.1867"></a>
-<span class="sourceLineNo">1868</span>      if (hcd.getTimeToLive() &lt;= 0) 
{<a name="line.1868"></a>
-<span class="sourceLineNo">1869</span>        String message = "TTL for column 
family " + hcd.getNameAsString() + " must be positive.";<a name="line.1869"></a>
-<span class="sourceLineNo">1870</span>        
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);<a 
name="line.1870"></a>
-<span class="sourceLineNo">1871</span>      }<a name="line.1871"></a>
-<span class="sourceLineNo">1872</span><a name="line.1872"></a>
-<span class="sourceLineNo">1873</span>      // check blockSize<a 
name="line.1873"></a>
-<span class="sourceLineNo">1874</span>      if (hcd.getBlocksize() &lt; 1024 
|| hcd.getBlocksize() &gt; 16 * 1024 * 1024) {<a name="line.1874"></a>
-<span class="sourceLineNo">1875</span>        String message = "Block size for 
column family " + hcd.getNameAsString()<a name="line.1875"></a>
-<span class="sourceLineNo">1876</span>            + "  must be between 1K and 
16MB.";<a name="line.1876"></a>
-<span class="sourceLineNo">1877</span>        
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);<a 
name="line.1877"></a>
-<span class="sourceLineNo">1878</span>      }<a name="line.1878"></a>
-<span class="sourceLineNo">1879</span><a name="line.1879"></a>
-<span class="sourceLineNo">1880</span>      // check versions<a 
name="line.1880"></a>
-<span class="sourceLineNo">1881</span>      if (hcd.getMinVersions() &lt; 0) 
{<a name="line.1881"></a>
-<span class="sourceLineNo">1882</span>        String message = "Min versions 
for column family " + hcd.getNameAsString()<a name="line.1882"></a>
-<span class="sourceLineNo">1883</span>          + "  must be positive.";<a 
name="line.1883"></a>
-<span class="sourceLineNo">1884</span>        
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);<a 
name="line.1884"></a>
-<span class="sourceLineNo">1885</span>      }<a name="line.1885"></a>
-<span class="sourceLineNo">1886</span>      // max versions already being 
checked<a name="line.1886"></a>
-<span class="sourceLineNo">1887</span><a name="line.1887"></a>
-<span class="sourceLineNo">1888</span>      // HBASE-13776 Setting illegal 
versions for ColumnFamilyDescriptor<a name="line.1888"></a>
-<span class="sourceLineNo">1889</span>      //  does not throw 
IllegalArgumentException<a name="line.1889"></a>
-<span class="sourceLineNo">1890</span>      // check minVersions &lt;= 
maxVerions<a name="line.1890"></a>
-<span class="sourceLineNo">1891</span>      if (hcd.getMinVersions() &gt; 
hcd.getMaxVersions()) {<a name="line.1891"></a>
-<span class="sourceLineNo">1892</span>        String message = "Min versions 
for column family " + hcd.getNameAsString()<a name="line.1892"></a>
-<span class="sourceLineNo">1893</span>            + " must be less than the 
Max versions.";<a name="line.1893"></a>
-<span class="sourceLineNo">1894</span>        
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);<a 
name="line.1894"></a>
-<span class="sourceLineNo">1895</span>      }<a name="line.1895"></a>
-<span class="sourceLineNo">1896</span><a name="line.1896"></a>
-<span class="sourceLineNo">1897</span>      // check replication scope<a 
name="line.1897"></a>
-<span class="sourceLineNo">1898</span>      checkReplicationScope(hcd);<a 
name="line.1898"></a>
-<span class="sourceLineNo">1899</span><a name="line.1899"></a>
-<span class="sourceLineNo">1900</span>      // check data replication factor, 
it can be 0(default value) when user has not explicitly<a name="line.1900"></a>
-<span class="sourceLineNo">1901</span>      // set the value, in this case we 
use default replication factor set in the file system.<a name="line.1901"></a>
-<span class="sourceLineNo">1902</span>      if (hcd.getDFSReplication() &lt; 
0) {<a name="line.1902"></a>
-<span class="sourceLineNo">1903</span>        String message = "HFile 
Replication for column family " + hcd.getNameAsString()<a name="line.1903"></a>
-<span class="sourceLineNo">1904</span>            + "  must be greater than 
zero.";<a name="line.1904"></a>
-<span class="sourceLineNo">1905</span>        
warnOrThrowExceptionForFailure(logWarn, CONF_KEY, message, null);<a 
name="line.1905"></a>
-<span class="sourceLineNo">1906</span>      }<a name="line.1906"></a>
-<span class="sourceLineNo">1907</span><a name="line.1907"></a>
-<span class="sourceLineNo">1908</span>      // TODO: should we check 
coprocessors and encryption ?<a name="line.1908"></a>
-<span class="sourceLineNo">1909</span>    }<a name="line.1909"></a>
-<span class="sourceLineNo">1910</span>  }<a name="line.1910"></a>
-<span class="sourceLineNo">1911</span><a name="line.1911"></a>
-<span class="sourceLineNo">1912</span>  private void 
checkReplicationScope(ColumnFamilyDescriptor hcd) throws IOException{<a 
name="line.1912"></a>
-<span class="sourceLineNo">1913</span>    // check replication scope<a 
name="line.1913"></a>
-<span class="sourceLineNo">1914</span>    WALProtos.ScopeType scop = 
WALProtos.ScopeType.valueOf(hcd.getScope());<a name="line.1914"></a>
-<span class="sourceLineNo">1915</span>    if (scop == null) {<a 
name="line.1915"></a>
-<span class="sourceLineNo">1916</span>      String message = "Replication 
scope for column family "<a name="line.1916"></a>
-<span class="sourceLineNo">1917</span>          + hcd.getNameAsString() + " is 
" + hcd.getScope() + " which is invalid.";<a name="line.1917"></a>
-<span class="sourceLineNo">1918</span><a name="line.1918"></a>
-<span class="sourceLineNo">1919</span>      LOG.error(message);<a 
name="line.1919"></a>
-<span class="sourceLineNo">1920</span>      throw new 
DoNotRetryIOException(message);<a name="line.1920"></a>
-<span class="sourceLineNo">1921</span>    }<a name="line.1921"></a>
-<span class="sourceLineNo">1922</span>  }<a name="line.1922"></a>
-<span class="sourceLineNo">1923</span><a name="line.1923"></a>
-<span class="sourceLineNo">1924</span>  private void 
checkCompactionPolicy(Configuration conf, TableDescriptor htd)<a 
name="line.1924"></a>
-<span class="sourceLineNo">1925</span>      throws IOException {<a 
name="line.1925"></a>
-<span class="sourceLineNo">1926</span>    // FIFO compaction has some 
requirements<a name="line.1926"></a>
-<span class="sourceLineNo">1927</span>    // Actually FCP ignores periodic 
major compactions<a name="line.1927"></a>
-<span class="sourceLineNo">1928</span>    String className = 
htd.getValue(DefaultStoreEngine.DEFAULT_COMPACTION_POLICY_CLASS_KEY);<a 
name="line.1928"></a>
-<span class="sourceLineNo">1929</span>    if (className == null) {<a 
name="line.1929"></a>
-<span class="sourceLineNo">1930</span>      className =<a name="line.1930"></a>
-<span class="sourceLineNo">1931</span>          
conf.get(DefaultStoreEngine.DEFAULT_COMPACTION_POLICY_CLASS_KEY,<a 
name="line.1931"></a>
-<span class="sourceLineNo">1932</span>            
ExploringCompactionPolicy.class.getName());<a name="line.1932"></a>
-<span class="sourceLineNo">1933</span>    }<a name="line.1933"></a>
-<span class="sourceLineNo">1934</span><a name="line.1934"></a>
-<span class="sourceLineNo">1935</span>    int blockingFileCount = 
HStore.DEFAULT_BLOCKING_STOREFILE_COUNT;<a name="line.1935"></a>
-<span class="sourceLineNo">1936</span>    String sv = 
htd.getValue(HStore.BLOCKING_STOREFILES_KEY);<a name="line.1936"></a>
-<span class="sourceLineNo">1937</span>    if (sv != null) {<a 
name="line.1937"></a>
-<span class="sourceLineNo">1938</span>      blockingFileCount = 
Integer.parseInt(sv);<a name="line.1938"></a>
-<span class="sourceLineNo">1939</span>    } else {<a name="line.1939"></a>
-<span class="sourceLineNo">1940</span>      blockingFileCount = 
conf.getInt(HStore.BLOCKING_STOREFILES_KEY, blockingFileCount);<a 
name="line.1940"></a>
-<span class="sourceLineNo">1941</span>    }<a name="line.1941"></a>
-<span class="sourceLineNo">1942</span><a name="line.1942"></a>
-<span class="sourceLineNo">1943</span>    for (ColumnFamilyDescriptor hcd : 
htd.getColumnFamilies()) {<a name="line.1943"></a>
-<span class="sourceLineNo">1944</span>      String compactionPolicy =<a 
name="line.1944"></a>
-<span class="sourceLineNo">1945</span>          
hcd.getConfigurationValue(DefaultStoreEngine.DEFAULT_COMPACTION_POLICY_CLASS_KEY);<a
 name="line.1945"></a>
-<span class="sourceLineNo">1946</span>      if (compactionPolicy == null) {<a 
name="line.1946"></a>
-<span class="sourceLineNo">1947</span>        compactionPolicy = className;<a 
name="line.1947"></a>
-<span class="sourceLineNo">1948</span>      }<a name="line.1948"></a>
-<span class="sourceLineNo">1949</span>      if 
(!compactionPolicy.equals(FIFOCompactionPolicy.class.getName())) {<a 
name="line.1949"></a>
-<span class="sourceLineNo">1950</span>        continue;<a name="line.1950"></a>
-<span class="sourceLineNo">1951</span>      }<a name="line.1951"></a>
-<span class="sourceLineNo">1952</span>      // FIFOCompaction<a 
name="line.1952"></a>
-<span class="sourceLineNo">1953</span>      String message = null;<a 
name="line.1953"></a>
-<span class="sourceLineNo">1954</span><a name="line.1954"></a>
-<span class="sourceLineNo">1955</span>      // 1. Check TTL<a 
name="line.1955"></a>
-<span class="sourceLineNo">1956</span>      if (hcd.getTimeToLive() == 
ColumnFamilyDescriptorBuilder.DEFAULT_TTL) {<a name="line.1956"></a>
-<span class="sourceLineNo">1957</span>        message = "Default TTL is not 
supported for FIFO compaction";<a name="line.1957"></a>
-<span class="sourceLineNo">1958</span>        throw new 
IOException(message);<a name="line.1958"></a>
-<span class="sourceLineNo">1959</span>      }<a name="line.1959"></a>
-<span class="sourceLineNo">1960</span><a name="line.1960"></a>
-<span class="sourceLineNo">1961</span>      // 2. Check min versions<a 
name="line.1961"></a>
-<span class="sourceLineNo">1962</span>      if (hcd.getMinVersions() &gt; 0) 
{<a name="line.1962"></a>
-<span class="sourceLineNo">1963</span>        message = "MIN_VERSION &gt; 0 is 
not supported for FIFO compaction";<a name="line.1963"></a>
-<span class="sourceLineNo">1964</span>        throw new 
IOException(message);<a name="line.1964"></a>
-<span class="sourceLineNo">1965</span>      }<a name="line.1965"></a>
-<span class="sourceLineNo">1966</span><a name="line.1966"></a>
-<span class="sourceLineNo">1967</span>      // 3. blocking file count<a 
name="line.1967"></a>
-<span class="sourceLineNo">1968</span>      sv = 
hcd.getConfigurationValue(HStore.BLOCKING_STOREFILES_KEY);<a 
name="line.1968"></a>
-<span class="sourceLineNo">1969</span>      if (sv != null) {<a 
name="line.1969"></a>
-<span class="sourceLineNo">1970</span>        blockingFileCount = 
Integer.parseInt(sv);<a name="line.1970"></a>
-<span class="sourceLineNo">1971</span>      }<a name="line.1971"></a>
-<span class="sourceLineNo">1972</span>      if (blockingFileCount &lt; 1000) 
{<a name="line.1972"></a>
-<span class="sourceLineNo">1973</span>        message =<a name="line.1973"></a>
-<span class="sourceLineNo">1974</span>            "Blocking file count '" + 
HStore.BLOCKING_STOREFILES_KEY + "' " + blockingFileCount<a 
name="line.1974"></a>
-<span class="sourceLineNo">1975</span>                + " is below recommended 
minimum of 1000 for column family "+ hcd.getNameAsString();<a 
name="line.1975"></a>
-<span class="sourceLineNo">1976</span>        throw new 
IOException(message);<a name="line.1976"></a>
-<span class="sourceLineNo">1977</span>      }<a name="line.1977"></a>
-<span class="sourceLineNo">1978</span>    }<a name="line.1978"></a>
-<span class="sourceLineNo">1979</span>  }<a name="line.1979"></a>
-<span class="sourceLineNo">1980</span><a name="line.1980"></a>
-<span class="sourceLineNo">1981</span>  // HBASE-13350 - Helper method to log 
warning on sanity check failures if checks disabled.<a name="line.1981"></a>
-<span class="sourceLineNo">1982</span>  private static void 
warnOrThrowExceptionForFailure(boolean logWarn, String confKey,<a 
name="line.1982"></a>
-<span class="sourceLineNo">1983</span>      String message, Exception cause) 
throws IOException {<a name="line.1983"></a>
-<span class="sourceLineNo">1984</span>    if (!logWarn) {<a 
name="line.1984"></a>
-<span class="sourceLineNo">1985</span>      throw new 
DoNotRetryIOException(message + " Set " + confKey +<a name="line.1985"></a>
-<span class="sourceLineNo">1986</span>          " to false at conf or table 
descriptor if you want to bypass sanity checks", cause);<a name="line.1986"></a>
-<span class="sourceLineNo">1987</span>    }<a name="line.1987"></a>
-<span class="sourceLineNo">1988</span>    LOG.warn(message);<a 
name="line.1988"></a>
-<span class="sourceLineNo">1989</span>  }<a name="line.1989"></a>
-<span class="sourceLineNo">1990</span><a name="line.1990"></a>
-<span class="sourceLineNo">1991</span>  private void 
startActiveMasterManager(int infoPort) throws KeeperException {<a 
name="line.1991"></a>
-<span class="sourceLineNo">1992</span>    String backupZNode = 
ZNodePaths.joinZNode(<a name="line.1992"></a>
-<span class="sourceLineNo">1993</span>      
zooKeeper.znodePaths.backupMasterAddressesZNode, serverName.toString());<a 
name="line.1993"></a>
-<span class="sourceLineNo">1994</span>    /*<a name="line.1994"></a>
-<span class="sourceLineNo">1995</span>    * Add a ZNode for ourselves in the 
backup master directory since we<a name="line.1995"></a>
-<span class="sourceLineNo">1996</span>    * may not become the active master. 
If so, we want the actual active<a name="line.1996"></a>
-<span class="sourceLineNo">1997</span>    * master to know we are backup 
masters, so that it won't assign<a name="line.1997"></a>
-<span class="sourceLineNo">1998</span>    * regions to us if so configured.<a 
name="line.1998"></a>
-<span class="sourceLineNo">1999</span>    *<a name="line.1999"></a>
-<span class="sourceLineNo">2000</span>    * If we become the active master 
later, ActiveMasterManager will delete<a name="line.2000"></a>
-<span class="sourceLineNo">2001</span>    * this node explicitly.  If we crash 
before then, ZooKeeper will delete<a name="line.2001"></a>
-<span class="sourceLineNo">2002</span>    * this node for us since it is 
ephemeral.<a name="line.2002"></a>
-<span class="sourceLineNo">2003</span>    */<a name="line.2003"></a>
-<span class="sourceLineNo">2004</span>    LOG.info("Adding backup master ZNode 
" + backupZNode);<a name="line.2004"></a>
-<span class="sourceLineNo">2005</span>    if 
(!MasterAddressTracker.setMasterAddress(zooKeeper, backupZNode, serverName, 
infoPort)) {<a name="line.2005"></a>
-<span class="sourceLineNo">2006</span>      LOG.warn("Failed create of " + 
backupZNode + " by " + serverName);<a name="line.2006"></a>
-<span class="sourceLineNo">2007</span>    }<a name="line.2007"></a>
-<span class="sourceLineNo">2008</span>    
this.activeMasterManager.setInfoPort(infoPort);<a name="line.2008"></a>
-<span class="sourceLineNo">2009</span>    int timeout = 
conf.getInt(HConstants.ZK_SESSION_TIMEOUT, 
HConstants.DEFAULT_ZK_SESSION_TIMEOUT);<a name="line.2009"></a>
-<span class="sourceLineNo">2010</span>    // If we're a backup master, stall 
until a primary to write this address<a name="line.2010"></a>
-<span class="sourceLineNo">2011</span>    if 
(conf.getBoolean(HConstants.MASTER_TYPE_BACKUP, 
HConstants.DEFAULT_MASTER_TYPE_BACKUP)) {<a name="line.2011"></a>
-<span class="sourceLineNo">2012</span>      LOG.debug("HMaster started in 
backup mode. Stalling until master znode is written.");<a name="line.2012"></a>
-<span class="sourceLineNo">2013</span>      // This will only be a minute or 
so while the cluster starts up,<a name="line.2013"></a>
-<span class="sourceLineNo">2014</span>      // so don't worry about setting 
watches on the parent znode<a name="line.2014"></a>
-<span class="sourceLineNo">2015</span>      while 
(!activeMasterManager.hasActiveMaster()) {<a name="line.2015"></a>
-<span class="sourceLineNo">2016</span>        LOG.debug("Waiting for master 
address and cluster state znode to be written.");<a name="line.2016"></a>
-<span class="sourceLineNo">2017</span>        Threads.sleep(timeout);<a 
name="line.2017"></a>
-<span class="sourceLineNo">2018</span>      }<a name="line.2018"></a>
-<span class="sourceLineNo">2019</span>    }<a name="line.2019"></a>
-<span class="sourceLineNo">2020</span>    MonitoredTask status = 
TaskMonitor.get().createStatus("Master startup");<a name="line.2020"></a>
-<span class="sourceLineNo">2021</span>    status.setDescription("Master 
startup");<a name="line.2021"></a>
-<span class="sourceLineNo">2022</span>    try {<a name="line.2022"></a>
-<span class="sourceLineNo">2023</span>      if 
(activeMasterManager.blockUntilBecomingActiveMaster(timeout, status)) {<a 
name="line.2023"></a>
-<span class="sourceLineNo">2024</span>        
finishActiveMasterInitialization(status);<a name="line.2024"></a>
-<span class="sourceLineNo">2025</span>      }<a name="line.2025"></a>
-<span class="sourceLineNo">2026</span>    } catch (Throwable t) {<a 
name="line.2026"></a>
-<span class="sourceLineNo">2027</span>      status.setStatus("Failed to become 
active: " + t.getMessage());<a name="line.2027"></a>
-<span class="sourceLineNo">2028</span>      LOG.error(HBaseMarkers.FATAL, 
"Failed to become active master", t);<a name="line.2028"></a>
-<span class="sourceLineNo">2029</span>      // HBASE-5680: Likely hadoop23 vs 
hadoop 20.x/1.x incompatibility<a name="line.2029"></a>
-<span class="sourceLineNo">2030</span>      if (t instanceof 
NoClassDefFoundError &amp;&amp; t.getMessage().<a name="line.2030"></a>
-<span class="sourceLineNo">2031</span>          
contains("org/apache/hadoop/hdfs/protocol/HdfsConstants$SafeModeAction")) {<a 
name="line.2031"></a>
-<span class="sourceLineNo">2032</span>        // improved error message for 
this special case<a name="line.2032"></a>
-<span class="sourceLineNo">2033</span>        abort("HBase is having a problem 
with its Hadoop jars.  You may need to recompile " +<a name="line.2033"></a>
-<span class="sourceLineNo">2034</span>          "HBase against Hadoop version 
" + org.apache.hadoop.util.VersionInfo.getVersion() +<a name="line.2034"></a>
-<span class="sourceLineNo">2035</span>          " or change your hadoop jars 
to start properly", t);<a name="line.2035"></a>
-<span class="sourceLineNo">2036</span>      } else {<a name="line.2036"></a>
-<span class="sourceLineNo">2037</span>        abort("Unhandled exception. 
Starting shutdown.", t);<a name="line.2037"></a>
-<span class="sourceLineNo">2038</span>      }<a name="line.2038"></a>
-<span class="sourceLineNo">2039</span>    } finally {<a name="line.2039"></a>
-<span class="sourceLineNo">2040</span>      status.cleanup();<a 
name="line.2040"></a>
-<span class="sourceLineNo">2041</span>    }<a name="line.2041"></a>
-<span class="sourceLineNo">2042</span>  }<a name="line.2042"></a>
-<span class="sourceLineNo">2043</span><a name="line.2043"></a>
-<span class="sourceLineNo">2044</span>  private void checkCompression(final 
TableDescriptor htd)<a name="line.2044"></a>
-<span class="sourceLineNo">2045</span>  throws IOException {<a 
name="line.2045"></a>
-<span class="sourceLineNo">2046</span>    if (!this.masterCheckCompression) 
return;<a name="line.2046"></a>
-<span class="sourceLineNo">2047</span>    for (ColumnFamilyDescriptor hcd : 
htd.getColumnFamilies()) {<a name="line.2047"></a>
-<span class="sourceLineNo">2048</span>      checkCompression(hcd);<a 
name="line.2048"></a>
-<span class="sourceLineNo">2049</span>    }<a name="line.2049"></a>
-<span class="sourceLineNo">2050</span>  }<a name="line.2050"></a>
-<span class="sourceLineNo">2051</span><a name="line.2051"></a>
-<span class="sourceLineNo">2052</span>  private void checkCompression(final 
ColumnFamilyDescriptor hcd)<a name="line.2052"></a>
-<span class="sourceLineNo">2053</span>  throws IOException {<a 
name="line.2053"></a>
-<span class="sourceLineNo">2054</span>    if (!this.masterCheckCompression) 
return;<a name="line.2054"></a>
-<span class="sourceLineNo">2055</span>    
CompressionTest.testCompression(hcd.getCompressionType());<a 
name="line.2055"></a>
-<span class="sourceLineNo">2056</span>    
CompressionTest.testCompression(hcd.getCompactionCompressionType());<a 
name="line.2056"></a>
-<span class="sourceLineNo">2057</span>  }<a name="line.2057"></a>
-<span class="sourceLineNo">2058</span><a name="line.2058"></a>
-<span class="sourceLineNo">2059</span>  private void checkEncryption(final 
Configuration conf, final TableDescriptor htd)<a name="line.2059"></a>
-<span class="sourceLineNo">2060</span>  throws IOException {<a 
name="line.2060"></a>
-<span class="sourceLineNo">2061</span>    if (!this.masterCheckEncryption) 
return;<a name="line.2061"></a>
-<span class="sourceLineNo">2062</span>    for (ColumnFamilyDescriptor hcd : 
htd.getColumnFamilies()) {<a name="line.2062"></a>
-<span class="sourceLineNo">2063</span>      checkEncryption(conf, hcd);<a 
name="line.2063"></a>
-<span class="sourceLineNo">2064</span>    }<a name="line.2064"></a>
-<span class="sourceLineNo">2065</span>  }<a name="line.2065"></a>
-<span class="sourceLineNo">2066</span><a name="line.2066"></a>
-<span class="sourceLineNo">2067</span>  private void checkEncryption(fin

<TRUNCATED>

Reply via email to