hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [06/49] hbase-site git commit: Published site at .
Date Sun, 24 Sep 2017 15:13:32 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/e6bd0774/testdevapidocs/src-html/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.CPMasterObserver.html
----------------------------------------------------------------------
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.CPMasterObserver.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.CPMasterObserver.html
index bc0c3a0..fe00c09 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.CPMasterObserver.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/coprocessor/TestMasterObserver.CPMasterObserver.html
@@ -68,12 +68,12 @@
 <span class="sourceLineNo">060</span>import org.apache.hadoop.hbase.procedure2.Procedure;<a name="line.60"></a>
 <span class="sourceLineNo">061</span>import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;<a name="line.61"></a>
 <span class="sourceLineNo">062</span>import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility;<a name="line.62"></a>
-<span class="sourceLineNo">063</span>import org.apache.hadoop.hbase.regionserver.HRegionServer;<a name="line.63"></a>
-<span class="sourceLineNo">064</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.64"></a>
-<span class="sourceLineNo">065</span>import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;<a name="line.65"></a>
-<span class="sourceLineNo">066</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableDescriptorsRequest;<a name="line.66"></a>
-<span class="sourceLineNo">067</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableNamesRequest;<a name="line.67"></a>
-<span class="sourceLineNo">068</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos.Quotas;<a name="line.68"></a>
+<span class="sourceLineNo">063</span>import org.apache.hadoop.hbase.quotas.GlobalQuotaSettings;<a name="line.63"></a>
+<span class="sourceLineNo">064</span>import org.apache.hadoop.hbase.regionserver.HRegionServer;<a name="line.64"></a>
+<span class="sourceLineNo">065</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>import org.apache.hadoop.hbase.shaded.protobuf.RequestConverter;<a name="line.66"></a>
+<span class="sourceLineNo">067</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableDescriptorsRequest;<a name="line.67"></a>
+<span class="sourceLineNo">068</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.MasterProtos.GetTableNamesRequest;<a name="line.68"></a>
 <span class="sourceLineNo">069</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.SnapshotProtos.SnapshotDescription;<a name="line.69"></a>
 <span class="sourceLineNo">070</span>import org.apache.hadoop.hbase.testclassification.CoprocessorTests;<a name="line.70"></a>
 <span class="sourceLineNo">071</span>import org.apache.hadoop.hbase.testclassification.MediumTests;<a name="line.71"></a>
@@ -1267,801 +1267,805 @@
 <span class="sourceLineNo">1259</span><a name="line.1259"></a>
 <span class="sourceLineNo">1260</span>    @Override<a name="line.1260"></a>
 <span class="sourceLineNo">1261</span>    public void preSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1261"></a>
-<span class="sourceLineNo">1262</span>        final String userName, final Quotas quotas) throws IOException {<a name="line.1262"></a>
+<span class="sourceLineNo">1262</span>        final String userName, final GlobalQuotaSettings quotas) throws IOException {<a name="line.1262"></a>
 <span class="sourceLineNo">1263</span>    }<a name="line.1263"></a>
 <span class="sourceLineNo">1264</span><a name="line.1264"></a>
 <span class="sourceLineNo">1265</span>    @Override<a name="line.1265"></a>
 <span class="sourceLineNo">1266</span>    public void postSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1266"></a>
-<span class="sourceLineNo">1267</span>        final String userName, final Quotas quotas) throws IOException {<a name="line.1267"></a>
+<span class="sourceLineNo">1267</span>        final String userName, final GlobalQuotaSettings quotas) throws IOException {<a name="line.1267"></a>
 <span class="sourceLineNo">1268</span>    }<a name="line.1268"></a>
 <span class="sourceLineNo">1269</span><a name="line.1269"></a>
 <span class="sourceLineNo">1270</span>    @Override<a name="line.1270"></a>
 <span class="sourceLineNo">1271</span>    public void preSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1271"></a>
-<span class="sourceLineNo">1272</span>        final String userName, final TableName tableName, final Quotas quotas) throws IOException {<a name="line.1272"></a>
-<span class="sourceLineNo">1273</span>    }<a name="line.1273"></a>
-<span class="sourceLineNo">1274</span><a name="line.1274"></a>
-<span class="sourceLineNo">1275</span>    @Override<a name="line.1275"></a>
-<span class="sourceLineNo">1276</span>    public void postSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1276"></a>
-<span class="sourceLineNo">1277</span>        final String userName, final TableName tableName, final Quotas quotas) throws IOException {<a name="line.1277"></a>
-<span class="sourceLineNo">1278</span>    }<a name="line.1278"></a>
-<span class="sourceLineNo">1279</span><a name="line.1279"></a>
-<span class="sourceLineNo">1280</span>    @Override<a name="line.1280"></a>
-<span class="sourceLineNo">1281</span>    public void preSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1281"></a>
-<span class="sourceLineNo">1282</span>        final String userName, final String namespace, final Quotas quotas) throws IOException {<a name="line.1282"></a>
-<span class="sourceLineNo">1283</span>    }<a name="line.1283"></a>
-<span class="sourceLineNo">1284</span><a name="line.1284"></a>
-<span class="sourceLineNo">1285</span>    @Override<a name="line.1285"></a>
-<span class="sourceLineNo">1286</span>    public void postSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1286"></a>
-<span class="sourceLineNo">1287</span>        final String userName, final String namespace, final Quotas quotas) throws IOException {<a name="line.1287"></a>
-<span class="sourceLineNo">1288</span>    }<a name="line.1288"></a>
-<span class="sourceLineNo">1289</span><a name="line.1289"></a>
-<span class="sourceLineNo">1290</span>    @Override<a name="line.1290"></a>
-<span class="sourceLineNo">1291</span>    public void preSetTableQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1291"></a>
-<span class="sourceLineNo">1292</span>        final TableName tableName, final Quotas quotas) throws IOException {<a name="line.1292"></a>
-<span class="sourceLineNo">1293</span>    }<a name="line.1293"></a>
-<span class="sourceLineNo">1294</span><a name="line.1294"></a>
-<span class="sourceLineNo">1295</span>    @Override<a name="line.1295"></a>
-<span class="sourceLineNo">1296</span>    public void postSetTableQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1296"></a>
-<span class="sourceLineNo">1297</span>        final TableName tableName, final Quotas quotas) throws IOException {<a name="line.1297"></a>
-<span class="sourceLineNo">1298</span>    }<a name="line.1298"></a>
-<span class="sourceLineNo">1299</span><a name="line.1299"></a>
-<span class="sourceLineNo">1300</span>    @Override<a name="line.1300"></a>
-<span class="sourceLineNo">1301</span>    public void preSetNamespaceQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1301"></a>
-<span class="sourceLineNo">1302</span>        final String namespace, final Quotas quotas) throws IOException {<a name="line.1302"></a>
-<span class="sourceLineNo">1303</span>    }<a name="line.1303"></a>
-<span class="sourceLineNo">1304</span><a name="line.1304"></a>
-<span class="sourceLineNo">1305</span>    @Override<a name="line.1305"></a>
-<span class="sourceLineNo">1306</span>    public void postSetNamespaceQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1306"></a>
-<span class="sourceLineNo">1307</span>        final String namespace, final Quotas quotas) throws IOException {<a name="line.1307"></a>
-<span class="sourceLineNo">1308</span>    }<a name="line.1308"></a>
-<span class="sourceLineNo">1309</span><a name="line.1309"></a>
-<span class="sourceLineNo">1310</span>    @Override<a name="line.1310"></a>
-<span class="sourceLineNo">1311</span>    public void preMoveServersAndTables(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1311"></a>
-<span class="sourceLineNo">1312</span>        Set&lt;Address&gt; servers, Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<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>    @Override<a name="line.1315"></a>
-<span class="sourceLineNo">1316</span>    public void postMoveServersAndTables(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1316"></a>
-<span class="sourceLineNo">1317</span>        Set&lt;Address&gt; servers, Set&lt;TableName&gt; tables,String targetGroup) throws IOException {<a name="line.1317"></a>
-<span class="sourceLineNo">1318</span>    }<a name="line.1318"></a>
-<span class="sourceLineNo">1319</span><a name="line.1319"></a>
-<span class="sourceLineNo">1320</span>    @Override<a name="line.1320"></a>
-<span class="sourceLineNo">1321</span>    public void preMoveServers(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1321"></a>
-<span class="sourceLineNo">1322</span>                               Set&lt;Address&gt; servers, String targetGroup) throws IOException {<a name="line.1322"></a>
-<span class="sourceLineNo">1323</span>    }<a name="line.1323"></a>
-<span class="sourceLineNo">1324</span><a name="line.1324"></a>
-<span class="sourceLineNo">1325</span>    @Override<a name="line.1325"></a>
-<span class="sourceLineNo">1326</span>    public void postMoveServers(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1326"></a>
-<span class="sourceLineNo">1327</span>                                Set&lt;Address&gt; servers, String targetGroup) throws IOException {<a name="line.1327"></a>
-<span class="sourceLineNo">1328</span>    }<a name="line.1328"></a>
-<span class="sourceLineNo">1329</span><a name="line.1329"></a>
-<span class="sourceLineNo">1330</span>    @Override<a name="line.1330"></a>
-<span class="sourceLineNo">1331</span>    public void preMoveTables(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1331"></a>
-<span class="sourceLineNo">1332</span>                              Set&lt;TableName&gt; tables, String targetGroupGroup) throws IOException {<a name="line.1332"></a>
-<span class="sourceLineNo">1333</span>    }<a name="line.1333"></a>
-<span class="sourceLineNo">1334</span><a name="line.1334"></a>
-<span class="sourceLineNo">1335</span>    @Override<a name="line.1335"></a>
-<span class="sourceLineNo">1336</span>    public void postMoveTables(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1336"></a>
-<span class="sourceLineNo">1337</span>                               Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.1337"></a>
-<span class="sourceLineNo">1338</span>    }<a name="line.1338"></a>
-<span class="sourceLineNo">1339</span><a name="line.1339"></a>
-<span class="sourceLineNo">1340</span>    @Override<a name="line.1340"></a>
-<span class="sourceLineNo">1341</span>    public void preAddRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1341"></a>
-<span class="sourceLineNo">1342</span>                              String name) throws IOException {<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>    @Override<a name="line.1345"></a>
-<span class="sourceLineNo">1346</span>    public void postAddRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1346"></a>
-<span class="sourceLineNo">1347</span>                               String name) throws IOException {<a name="line.1347"></a>
-<span class="sourceLineNo">1348</span>    }<a name="line.1348"></a>
-<span class="sourceLineNo">1349</span><a name="line.1349"></a>
-<span class="sourceLineNo">1350</span>    @Override<a name="line.1350"></a>
-<span class="sourceLineNo">1351</span>    public void preRemoveRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1351"></a>
-<span class="sourceLineNo">1352</span>                                 String name) throws IOException {<a name="line.1352"></a>
-<span class="sourceLineNo">1353</span>    }<a name="line.1353"></a>
-<span class="sourceLineNo">1354</span><a name="line.1354"></a>
-<span class="sourceLineNo">1355</span>    @Override<a name="line.1355"></a>
-<span class="sourceLineNo">1356</span>    public void postRemoveRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1356"></a>
-<span class="sourceLineNo">1357</span>                                  String name) throws IOException {<a name="line.1357"></a>
-<span class="sourceLineNo">1358</span>    }<a name="line.1358"></a>
-<span class="sourceLineNo">1359</span><a name="line.1359"></a>
-<span class="sourceLineNo">1360</span>    @Override<a name="line.1360"></a>
-<span class="sourceLineNo">1361</span>    public void preBalanceRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1361"></a>
-<span class="sourceLineNo">1362</span>                                  String groupName) throws IOException {<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>    @Override<a name="line.1365"></a>
-<span class="sourceLineNo">1366</span>    public void postBalanceRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1366"></a>
-<span class="sourceLineNo">1367</span>        String groupName, boolean balancerRan) throws IOException {<a name="line.1367"></a>
-<span class="sourceLineNo">1368</span>    }<a name="line.1368"></a>
-<span class="sourceLineNo">1369</span><a name="line.1369"></a>
-<span class="sourceLineNo">1370</span>    @Override<a name="line.1370"></a>
-<span class="sourceLineNo">1371</span>    public void preRequestLock(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx, String namespace,<a name="line.1371"></a>
-<span class="sourceLineNo">1372</span>        TableName tableName, RegionInfo[] regionInfos, LockType type,<a name="line.1372"></a>
-<span class="sourceLineNo">1373</span>        String description) throws IOException {<a name="line.1373"></a>
-<span class="sourceLineNo">1374</span>      preRequestLockCalled = true;<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>    @Override<a name="line.1377"></a>
-<span class="sourceLineNo">1378</span>    public void postRequestLock(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx, String namespace,<a name="line.1378"></a>
-<span class="sourceLineNo">1379</span>        TableName tableName, RegionInfo[] regionInfos, LockType type,<a name="line.1379"></a>
-<span class="sourceLineNo">1380</span>        String description) throws IOException {<a name="line.1380"></a>
-<span class="sourceLineNo">1381</span>      postRequestLockCalled = true;<a name="line.1381"></a>
-<span class="sourceLineNo">1382</span>    }<a name="line.1382"></a>
-<span class="sourceLineNo">1383</span><a name="line.1383"></a>
-<span class="sourceLineNo">1384</span>    @Override<a name="line.1384"></a>
-<span class="sourceLineNo">1385</span>    public void preLockHeartbeat(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1385"></a>
-<span class="sourceLineNo">1386</span>        LockProcedure proc, boolean keepAlive) throws IOException {<a name="line.1386"></a>
-<span class="sourceLineNo">1387</span>      preLockHeartbeatCalled = true;<a name="line.1387"></a>
-<span class="sourceLineNo">1388</span>    }<a name="line.1388"></a>
-<span class="sourceLineNo">1389</span><a name="line.1389"></a>
-<span class="sourceLineNo">1390</span>    @Override<a name="line.1390"></a>
-<span class="sourceLineNo">1391</span>    public void postLockHeartbeat(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1391"></a>
-<span class="sourceLineNo">1392</span>        LockProcedure proc, boolean keepAlive) throws IOException {<a name="line.1392"></a>
-<span class="sourceLineNo">1393</span>      postLockHeartbeatCalled = true;<a name="line.1393"></a>
-<span class="sourceLineNo">1394</span>    }<a name="line.1394"></a>
-<span class="sourceLineNo">1395</span><a name="line.1395"></a>
-<span class="sourceLineNo">1396</span>    public boolean preAndPostForQueueLockAndHeartbeatLockCalled() {<a name="line.1396"></a>
-<span class="sourceLineNo">1397</span>      return preRequestLockCalled &amp;&amp; postRequestLockCalled &amp;&amp; preLockHeartbeatCalled &amp;&amp;<a name="line.1397"></a>
-<span class="sourceLineNo">1398</span>          postLockHeartbeatCalled;<a name="line.1398"></a>
-<span class="sourceLineNo">1399</span>    }<a name="line.1399"></a>
-<span class="sourceLineNo">1400</span><a name="line.1400"></a>
-<span class="sourceLineNo">1401</span>    @Override<a name="line.1401"></a>
-<span class="sourceLineNo">1402</span>    public void preSplitRegion(<a name="line.1402"></a>
-<span class="sourceLineNo">1403</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; c,<a name="line.1403"></a>
-<span class="sourceLineNo">1404</span>        final TableName tableName,<a name="line.1404"></a>
-<span class="sourceLineNo">1405</span>        final byte[] splitRow) throws IOException {<a name="line.1405"></a>
-<span class="sourceLineNo">1406</span>    }<a name="line.1406"></a>
-<span class="sourceLineNo">1407</span><a name="line.1407"></a>
-<span class="sourceLineNo">1408</span>    @Override<a name="line.1408"></a>
-<span class="sourceLineNo">1409</span>    public void preSplitRegionAction(<a name="line.1409"></a>
-<span class="sourceLineNo">1410</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; c,<a name="line.1410"></a>
-<span class="sourceLineNo">1411</span>        final TableName tableName,<a name="line.1411"></a>
-<span class="sourceLineNo">1412</span>        final byte[] splitRow) throws IOException {<a name="line.1412"></a>
-<span class="sourceLineNo">1413</span>    }<a name="line.1413"></a>
-<span class="sourceLineNo">1414</span><a name="line.1414"></a>
-<span class="sourceLineNo">1415</span>    @Override<a name="line.1415"></a>
-<span class="sourceLineNo">1416</span>    public void postCompletedSplitRegionAction(<a name="line.1416"></a>
-<span class="sourceLineNo">1417</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; c,<a name="line.1417"></a>
-<span class="sourceLineNo">1418</span>        final RegionInfo regionInfoA,<a name="line.1418"></a>
-<span class="sourceLineNo">1419</span>        final RegionInfo regionInfoB) throws IOException {<a name="line.1419"></a>
-<span class="sourceLineNo">1420</span>    }<a name="line.1420"></a>
-<span class="sourceLineNo">1421</span><a name="line.1421"></a>
-<span class="sourceLineNo">1422</span>    @Override<a name="line.1422"></a>
-<span class="sourceLineNo">1423</span>    public void preSplitRegionBeforePONRAction(<a name="line.1423"></a>
-<span class="sourceLineNo">1424</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1424"></a>
-<span class="sourceLineNo">1425</span>        final byte[] splitKey,<a name="line.1425"></a>
-<span class="sourceLineNo">1426</span>        final List&lt;Mutation&gt; metaEntries) throws IOException {<a name="line.1426"></a>
-<span class="sourceLineNo">1427</span>    }<a name="line.1427"></a>
-<span class="sourceLineNo">1428</span><a name="line.1428"></a>
-<span class="sourceLineNo">1429</span>    @Override<a name="line.1429"></a>
-<span class="sourceLineNo">1430</span>    public void preSplitRegionAfterPONRAction(<a name="line.1430"></a>
-<span class="sourceLineNo">1431</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx) throws IOException {<a name="line.1431"></a>
-<span class="sourceLineNo">1432</span>    }<a name="line.1432"></a>
-<span class="sourceLineNo">1433</span><a name="line.1433"></a>
-<span class="sourceLineNo">1434</span>    @Override<a name="line.1434"></a>
-<span class="sourceLineNo">1435</span>    public void postRollBackSplitRegionAction(<a name="line.1435"></a>
-<span class="sourceLineNo">1436</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx) throws IOException {<a name="line.1436"></a>
-<span class="sourceLineNo">1437</span>    }<a name="line.1437"></a>
-<span class="sourceLineNo">1438</span><a name="line.1438"></a>
-<span class="sourceLineNo">1439</span>    @Override<a name="line.1439"></a>
-<span class="sourceLineNo">1440</span>    public void preMergeRegionsAction(<a name="line.1440"></a>
-<span class="sourceLineNo">1441</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1441"></a>
-<span class="sourceLineNo">1442</span>        final RegionInfo[] regionsToMerge) throws IOException {<a name="line.1442"></a>
-<span class="sourceLineNo">1443</span>    }<a name="line.1443"></a>
-<span class="sourceLineNo">1444</span><a name="line.1444"></a>
-<span class="sourceLineNo">1445</span>    @Override<a name="line.1445"></a>
-<span class="sourceLineNo">1446</span>    public void postCompletedMergeRegionsAction(<a name="line.1446"></a>
-<span class="sourceLineNo">1447</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; c,<a name="line.1447"></a>
-<span class="sourceLineNo">1448</span>        final RegionInfo[] regionsToMerge,<a name="line.1448"></a>
-<span class="sourceLineNo">1449</span>        final RegionInfo mergedRegion) throws IOException {<a name="line.1449"></a>
-<span class="sourceLineNo">1450</span>    }<a name="line.1450"></a>
-<span class="sourceLineNo">1451</span><a name="line.1451"></a>
-<span class="sourceLineNo">1452</span>    @Override<a name="line.1452"></a>
-<span class="sourceLineNo">1453</span>    public void preMergeRegionsCommitAction(<a name="line.1453"></a>
-<span class="sourceLineNo">1454</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1454"></a>
-<span class="sourceLineNo">1455</span>        final RegionInfo[] regionsToMerge,<a name="line.1455"></a>
-<span class="sourceLineNo">1456</span>        final List&lt;Mutation&gt; metaEntries) throws IOException {<a name="line.1456"></a>
-<span class="sourceLineNo">1457</span>    }<a name="line.1457"></a>
-<span class="sourceLineNo">1458</span><a name="line.1458"></a>
-<span class="sourceLineNo">1459</span>    @Override<a name="line.1459"></a>
-<span class="sourceLineNo">1460</span>    public void postMergeRegionsCommitAction(<a name="line.1460"></a>
-<span class="sourceLineNo">1461</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1461"></a>
-<span class="sourceLineNo">1462</span>        final RegionInfo[] regionsToMerge,<a name="line.1462"></a>
-<span class="sourceLineNo">1463</span>        final RegionInfo mergedRegion) throws IOException {<a name="line.1463"></a>
-<span class="sourceLineNo">1464</span>    }<a name="line.1464"></a>
-<span class="sourceLineNo">1465</span><a name="line.1465"></a>
-<span class="sourceLineNo">1466</span>    @Override<a name="line.1466"></a>
-<span class="sourceLineNo">1467</span>    public void postRollBackMergeRegionsAction(<a name="line.1467"></a>
-<span class="sourceLineNo">1468</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1468"></a>
-<span class="sourceLineNo">1469</span>        final RegionInfo[] regionsToMerge) throws IOException {<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>  private static HBaseTestingUtility UTIL = new HBaseTestingUtility();<a name="line.1473"></a>
-<span class="sourceLineNo">1474</span>  private static byte[] TEST_SNAPSHOT = Bytes.toBytes("observed_snapshot");<a name="line.1474"></a>
-<span class="sourceLineNo">1475</span>  private static TableName TEST_CLONE = TableName.valueOf("observed_clone");<a name="line.1475"></a>
-<span class="sourceLineNo">1476</span>  private static byte[] TEST_FAMILY = Bytes.toBytes("fam1");<a name="line.1476"></a>
-<span class="sourceLineNo">1477</span>  private static byte[] TEST_FAMILY2 = Bytes.toBytes("fam2");<a name="line.1477"></a>
-<span class="sourceLineNo">1478</span>  @Rule public TestName name = new TestName();<a name="line.1478"></a>
-<span class="sourceLineNo">1479</span><a name="line.1479"></a>
-<span class="sourceLineNo">1480</span>  @BeforeClass<a name="line.1480"></a>
-<span class="sourceLineNo">1481</span>  public static void setupBeforeClass() throws Exception {<a name="line.1481"></a>
-<span class="sourceLineNo">1482</span>    Configuration conf = UTIL.getConfiguration();<a name="line.1482"></a>
-<span class="sourceLineNo">1483</span>    conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY,<a name="line.1483"></a>
-<span class="sourceLineNo">1484</span>        CPMasterObserver.class.getName());<a name="line.1484"></a>
-<span class="sourceLineNo">1485</span>    // We need more than one data server on this test<a name="line.1485"></a>
-<span class="sourceLineNo">1486</span>    UTIL.startMiniCluster(2);<a name="line.1486"></a>
-<span class="sourceLineNo">1487</span>  }<a name="line.1487"></a>
-<span class="sourceLineNo">1488</span><a name="line.1488"></a>
-<span class="sourceLineNo">1489</span>  @AfterClass<a name="line.1489"></a>
-<span class="sourceLineNo">1490</span>  public static void tearDownAfterClass() throws Exception {<a name="line.1490"></a>
-<span class="sourceLineNo">1491</span>    UTIL.shutdownMiniCluster();<a name="line.1491"></a>
-<span class="sourceLineNo">1492</span>  }<a name="line.1492"></a>
-<span class="sourceLineNo">1493</span><a name="line.1493"></a>
-<span class="sourceLineNo">1494</span>  @Test (timeout=180000)<a name="line.1494"></a>
-<span class="sourceLineNo">1495</span>  public void testStarted() throws Exception {<a name="line.1495"></a>
-<span class="sourceLineNo">1496</span>    MiniHBaseCluster cluster = UTIL.getHBaseCluster();<a name="line.1496"></a>
+<span class="sourceLineNo">1272</span>        final String userName, final TableName tableName, final GlobalQuotaSettings quotas)<a name="line.1272"></a>
+<span class="sourceLineNo">1273</span>            throws IOException {<a name="line.1273"></a>
+<span class="sourceLineNo">1274</span>    }<a name="line.1274"></a>
+<span class="sourceLineNo">1275</span><a name="line.1275"></a>
+<span class="sourceLineNo">1276</span>    @Override<a name="line.1276"></a>
+<span class="sourceLineNo">1277</span>    public void postSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1277"></a>
+<span class="sourceLineNo">1278</span>        final String userName, final TableName tableName, final GlobalQuotaSettings quotas)<a name="line.1278"></a>
+<span class="sourceLineNo">1279</span>            throws IOException {<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>    @Override<a name="line.1282"></a>
+<span class="sourceLineNo">1283</span>    public void preSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1283"></a>
+<span class="sourceLineNo">1284</span>        final String userName, final String namespace, final GlobalQuotaSettings quotas)<a name="line.1284"></a>
+<span class="sourceLineNo">1285</span>            throws IOException {<a name="line.1285"></a>
+<span class="sourceLineNo">1286</span>    }<a name="line.1286"></a>
+<span class="sourceLineNo">1287</span><a name="line.1287"></a>
+<span class="sourceLineNo">1288</span>    @Override<a name="line.1288"></a>
+<span class="sourceLineNo">1289</span>    public void postSetUserQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1289"></a>
+<span class="sourceLineNo">1290</span>        final String userName, final String namespace, final GlobalQuotaSettings quotas)<a name="line.1290"></a>
+<span class="sourceLineNo">1291</span>            throws IOException {<a name="line.1291"></a>
+<span class="sourceLineNo">1292</span>    }<a name="line.1292"></a>
+<span class="sourceLineNo">1293</span><a name="line.1293"></a>
+<span class="sourceLineNo">1294</span>    @Override<a name="line.1294"></a>
+<span class="sourceLineNo">1295</span>    public void preSetTableQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1295"></a>
+<span class="sourceLineNo">1296</span>        final TableName tableName, final GlobalQuotaSettings quotas) throws IOException {<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>    @Override<a name="line.1299"></a>
+<span class="sourceLineNo">1300</span>    public void postSetTableQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1300"></a>
+<span class="sourceLineNo">1301</span>        final TableName tableName, final GlobalQuotaSettings quotas) throws IOException {<a name="line.1301"></a>
+<span class="sourceLineNo">1302</span>    }<a name="line.1302"></a>
+<span class="sourceLineNo">1303</span><a name="line.1303"></a>
+<span class="sourceLineNo">1304</span>    @Override<a name="line.1304"></a>
+<span class="sourceLineNo">1305</span>    public void preSetNamespaceQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1305"></a>
+<span class="sourceLineNo">1306</span>        final String namespace, final GlobalQuotaSettings quotas) throws IOException {<a name="line.1306"></a>
+<span class="sourceLineNo">1307</span>    }<a name="line.1307"></a>
+<span class="sourceLineNo">1308</span><a name="line.1308"></a>
+<span class="sourceLineNo">1309</span>    @Override<a name="line.1309"></a>
+<span class="sourceLineNo">1310</span>    public void postSetNamespaceQuota(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1310"></a>
+<span class="sourceLineNo">1311</span>        final String namespace, final GlobalQuotaSettings quotas) throws IOException {<a name="line.1311"></a>
+<span class="sourceLineNo">1312</span>    }<a name="line.1312"></a>
+<span class="sourceLineNo">1313</span><a name="line.1313"></a>
+<span class="sourceLineNo">1314</span>    @Override<a name="line.1314"></a>
+<span class="sourceLineNo">1315</span>    public void preMoveServersAndTables(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1315"></a>
+<span class="sourceLineNo">1316</span>        Set&lt;Address&gt; servers, Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.1316"></a>
+<span class="sourceLineNo">1317</span>    }<a name="line.1317"></a>
+<span class="sourceLineNo">1318</span><a name="line.1318"></a>
+<span class="sourceLineNo">1319</span>    @Override<a name="line.1319"></a>
+<span class="sourceLineNo">1320</span>    public void postMoveServersAndTables(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1320"></a>
+<span class="sourceLineNo">1321</span>        Set&lt;Address&gt; servers, Set&lt;TableName&gt; tables,String targetGroup) throws IOException {<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>    @Override<a name="line.1324"></a>
+<span class="sourceLineNo">1325</span>    public void preMoveServers(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1325"></a>
+<span class="sourceLineNo">1326</span>                               Set&lt;Address&gt; servers, String targetGroup) throws IOException {<a name="line.1326"></a>
+<span class="sourceLineNo">1327</span>    }<a name="line.1327"></a>
+<span class="sourceLineNo">1328</span><a name="line.1328"></a>
+<span class="sourceLineNo">1329</span>    @Override<a name="line.1329"></a>
+<span class="sourceLineNo">1330</span>    public void postMoveServers(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1330"></a>
+<span class="sourceLineNo">1331</span>                                Set&lt;Address&gt; servers, String targetGroup) throws IOException {<a name="line.1331"></a>
+<span class="sourceLineNo">1332</span>    }<a name="line.1332"></a>
+<span class="sourceLineNo">1333</span><a name="line.1333"></a>
+<span class="sourceLineNo">1334</span>    @Override<a name="line.1334"></a>
+<span class="sourceLineNo">1335</span>    public void preMoveTables(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1335"></a>
+<span class="sourceLineNo">1336</span>                              Set&lt;TableName&gt; tables, String targetGroupGroup) throws IOException {<a name="line.1336"></a>
+<span class="sourceLineNo">1337</span>    }<a name="line.1337"></a>
+<span class="sourceLineNo">1338</span><a name="line.1338"></a>
+<span class="sourceLineNo">1339</span>    @Override<a name="line.1339"></a>
+<span class="sourceLineNo">1340</span>    public void postMoveTables(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1340"></a>
+<span class="sourceLineNo">1341</span>                               Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<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>    @Override<a name="line.1344"></a>
+<span class="sourceLineNo">1345</span>    public void preAddRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1345"></a>
+<span class="sourceLineNo">1346</span>                              String name) throws IOException {<a name="line.1346"></a>
+<span class="sourceLineNo">1347</span>    }<a name="line.1347"></a>
+<span class="sourceLineNo">1348</span><a name="line.1348"></a>
+<span class="sourceLineNo">1349</span>    @Override<a name="line.1349"></a>
+<span class="sourceLineNo">1350</span>    public void postAddRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1350"></a>
+<span class="sourceLineNo">1351</span>                               String name) throws IOException {<a name="line.1351"></a>
+<span class="sourceLineNo">1352</span>    }<a name="line.1352"></a>
+<span class="sourceLineNo">1353</span><a name="line.1353"></a>
+<span class="sourceLineNo">1354</span>    @Override<a name="line.1354"></a>
+<span class="sourceLineNo">1355</span>    public void preRemoveRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1355"></a>
+<span class="sourceLineNo">1356</span>                                 String name) throws IOException {<a name="line.1356"></a>
+<span class="sourceLineNo">1357</span>    }<a name="line.1357"></a>
+<span class="sourceLineNo">1358</span><a name="line.1358"></a>
+<span class="sourceLineNo">1359</span>    @Override<a name="line.1359"></a>
+<span class="sourceLineNo">1360</span>    public void postRemoveRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1360"></a>
+<span class="sourceLineNo">1361</span>                                  String name) throws IOException {<a name="line.1361"></a>
+<span class="sourceLineNo">1362</span>    }<a name="line.1362"></a>
+<span class="sourceLineNo">1363</span><a name="line.1363"></a>
+<span class="sourceLineNo">1364</span>    @Override<a name="line.1364"></a>
+<span class="sourceLineNo">1365</span>    public void preBalanceRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1365"></a>
+<span class="sourceLineNo">1366</span>                                  String groupName) throws IOException {<a name="line.1366"></a>
+<span class="sourceLineNo">1367</span>    }<a name="line.1367"></a>
+<span class="sourceLineNo">1368</span><a name="line.1368"></a>
+<span class="sourceLineNo">1369</span>    @Override<a name="line.1369"></a>
+<span class="sourceLineNo">1370</span>    public void postBalanceRSGroup(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1370"></a>
+<span class="sourceLineNo">1371</span>        String groupName, boolean balancerRan) throws IOException {<a name="line.1371"></a>
+<span class="sourceLineNo">1372</span>    }<a name="line.1372"></a>
+<span class="sourceLineNo">1373</span><a name="line.1373"></a>
+<span class="sourceLineNo">1374</span>    @Override<a name="line.1374"></a>
+<span class="sourceLineNo">1375</span>    public void preRequestLock(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx, String namespace,<a name="line.1375"></a>
+<span class="sourceLineNo">1376</span>        TableName tableName, RegionInfo[] regionInfos, LockType type,<a name="line.1376"></a>
+<span class="sourceLineNo">1377</span>        String description) throws IOException {<a name="line.1377"></a>
+<span class="sourceLineNo">1378</span>      preRequestLockCalled = true;<a name="line.1378"></a>
+<span class="sourceLineNo">1379</span>    }<a name="line.1379"></a>
+<span class="sourceLineNo">1380</span><a name="line.1380"></a>
+<span class="sourceLineNo">1381</span>    @Override<a name="line.1381"></a>
+<span class="sourceLineNo">1382</span>    public void postRequestLock(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx, String namespace,<a name="line.1382"></a>
+<span class="sourceLineNo">1383</span>        TableName tableName, RegionInfo[] regionInfos, LockType type,<a name="line.1383"></a>
+<span class="sourceLineNo">1384</span>        String description) throws IOException {<a name="line.1384"></a>
+<span class="sourceLineNo">1385</span>      postRequestLockCalled = true;<a name="line.1385"></a>
+<span class="sourceLineNo">1386</span>    }<a name="line.1386"></a>
+<span class="sourceLineNo">1387</span><a name="line.1387"></a>
+<span class="sourceLineNo">1388</span>    @Override<a name="line.1388"></a>
+<span class="sourceLineNo">1389</span>    public void preLockHeartbeat(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1389"></a>
+<span class="sourceLineNo">1390</span>        LockProcedure proc, boolean keepAlive) throws IOException {<a name="line.1390"></a>
+<span class="sourceLineNo">1391</span>      preLockHeartbeatCalled = true;<a name="line.1391"></a>
+<span class="sourceLineNo">1392</span>    }<a name="line.1392"></a>
+<span class="sourceLineNo">1393</span><a name="line.1393"></a>
+<span class="sourceLineNo">1394</span>    @Override<a name="line.1394"></a>
+<span class="sourceLineNo">1395</span>    public void postLockHeartbeat(ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1395"></a>
+<span class="sourceLineNo">1396</span>        LockProcedure proc, boolean keepAlive) throws IOException {<a name="line.1396"></a>
+<span class="sourceLineNo">1397</span>      postLockHeartbeatCalled = true;<a name="line.1397"></a>
+<span class="sourceLineNo">1398</span>    }<a name="line.1398"></a>
+<span class="sourceLineNo">1399</span><a name="line.1399"></a>
+<span class="sourceLineNo">1400</span>    public boolean preAndPostForQueueLockAndHeartbeatLockCalled() {<a name="line.1400"></a>
+<span class="sourceLineNo">1401</span>      return preRequestLockCalled &amp;&amp; postRequestLockCalled &amp;&amp; preLockHeartbeatCalled &amp;&amp;<a name="line.1401"></a>
+<span class="sourceLineNo">1402</span>          postLockHeartbeatCalled;<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>    @Override<a name="line.1405"></a>
+<span class="sourceLineNo">1406</span>    public void preSplitRegion(<a name="line.1406"></a>
+<span class="sourceLineNo">1407</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; c,<a name="line.1407"></a>
+<span class="sourceLineNo">1408</span>        final TableName tableName,<a name="line.1408"></a>
+<span class="sourceLineNo">1409</span>        final byte[] splitRow) throws IOException {<a name="line.1409"></a>
+<span class="sourceLineNo">1410</span>    }<a name="line.1410"></a>
+<span class="sourceLineNo">1411</span><a name="line.1411"></a>
+<span class="sourceLineNo">1412</span>    @Override<a name="line.1412"></a>
+<span class="sourceLineNo">1413</span>    public void preSplitRegionAction(<a name="line.1413"></a>
+<span class="sourceLineNo">1414</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; c,<a name="line.1414"></a>
+<span class="sourceLineNo">1415</span>        final TableName tableName,<a name="line.1415"></a>
+<span class="sourceLineNo">1416</span>        final byte[] splitRow) throws IOException {<a name="line.1416"></a>
+<span class="sourceLineNo">1417</span>    }<a name="line.1417"></a>
+<span class="sourceLineNo">1418</span><a name="line.1418"></a>
+<span class="sourceLineNo">1419</span>    @Override<a name="line.1419"></a>
+<span class="sourceLineNo">1420</span>    public void postCompletedSplitRegionAction(<a name="line.1420"></a>
+<span class="sourceLineNo">1421</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; c,<a name="line.1421"></a>
+<span class="sourceLineNo">1422</span>        final RegionInfo regionInfoA,<a name="line.1422"></a>
+<span class="sourceLineNo">1423</span>        final RegionInfo regionInfoB) throws IOException {<a name="line.1423"></a>
+<span class="sourceLineNo">1424</span>    }<a name="line.1424"></a>
+<span class="sourceLineNo">1425</span><a name="line.1425"></a>
+<span class="sourceLineNo">1426</span>    @Override<a name="line.1426"></a>
+<span class="sourceLineNo">1427</span>    public void preSplitRegionBeforePONRAction(<a name="line.1427"></a>
+<span class="sourceLineNo">1428</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1428"></a>
+<span class="sourceLineNo">1429</span>        final byte[] splitKey,<a name="line.1429"></a>
+<span class="sourceLineNo">1430</span>        final List&lt;Mutation&gt; metaEntries) throws IOException {<a name="line.1430"></a>
+<span class="sourceLineNo">1431</span>    }<a name="line.1431"></a>
+<span class="sourceLineNo">1432</span><a name="line.1432"></a>
+<span class="sourceLineNo">1433</span>    @Override<a name="line.1433"></a>
+<span class="sourceLineNo">1434</span>    public void preSplitRegionAfterPONRAction(<a name="line.1434"></a>
+<span class="sourceLineNo">1435</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx) throws IOException {<a name="line.1435"></a>
+<span class="sourceLineNo">1436</span>    }<a name="line.1436"></a>
+<span class="sourceLineNo">1437</span><a name="line.1437"></a>
+<span class="sourceLineNo">1438</span>    @Override<a name="line.1438"></a>
+<span class="sourceLineNo">1439</span>    public void postRollBackSplitRegionAction(<a name="line.1439"></a>
+<span class="sourceLineNo">1440</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx) throws IOException {<a name="line.1440"></a>
+<span class="sourceLineNo">1441</span>    }<a name="line.1441"></a>
+<span class="sourceLineNo">1442</span><a name="line.1442"></a>
+<span class="sourceLineNo">1443</span>    @Override<a name="line.1443"></a>
+<span class="sourceLineNo">1444</span>    public void preMergeRegionsAction(<a name="line.1444"></a>
+<span class="sourceLineNo">1445</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1445"></a>
+<span class="sourceLineNo">1446</span>        final RegionInfo[] regionsToMerge) throws IOException {<a name="line.1446"></a>
+<span class="sourceLineNo">1447</span>    }<a name="line.1447"></a>
+<span class="sourceLineNo">1448</span><a name="line.1448"></a>
+<span class="sourceLineNo">1449</span>    @Override<a name="line.1449"></a>
+<span class="sourceLineNo">1450</span>    public void postCompletedMergeRegionsAction(<a name="line.1450"></a>
+<span class="sourceLineNo">1451</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; c,<a name="line.1451"></a>
+<span class="sourceLineNo">1452</span>        final RegionInfo[] regionsToMerge,<a name="line.1452"></a>
+<span class="sourceLineNo">1453</span>        final RegionInfo mergedRegion) throws IOException {<a name="line.1453"></a>
+<span class="sourceLineNo">1454</span>    }<a name="line.1454"></a>
+<span class="sourceLineNo">1455</span><a name="line.1455"></a>
+<span class="sourceLineNo">1456</span>    @Override<a name="line.1456"></a>
+<span class="sourceLineNo">1457</span>    public void preMergeRegionsCommitAction(<a name="line.1457"></a>
+<span class="sourceLineNo">1458</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1458"></a>
+<span class="sourceLineNo">1459</span>        final RegionInfo[] regionsToMerge,<a name="line.1459"></a>
+<span class="sourceLineNo">1460</span>        final List&lt;Mutation&gt; metaEntries) throws IOException {<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>    @Override<a name="line.1463"></a>
+<span class="sourceLineNo">1464</span>    public void postMergeRegionsCommitAction(<a name="line.1464"></a>
+<span class="sourceLineNo">1465</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1465"></a>
+<span class="sourceLineNo">1466</span>        final RegionInfo[] regionsToMerge,<a name="line.1466"></a>
+<span class="sourceLineNo">1467</span>        final RegionInfo mergedRegion) throws IOException {<a name="line.1467"></a>
+<span class="sourceLineNo">1468</span>    }<a name="line.1468"></a>
+<span class="sourceLineNo">1469</span><a name="line.1469"></a>
+<span class="sourceLineNo">1470</span>    @Override<a name="line.1470"></a>
+<span class="sourceLineNo">1471</span>    public void postRollBackMergeRegionsAction(<a name="line.1471"></a>
+<span class="sourceLineNo">1472</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.1472"></a>
+<span class="sourceLineNo">1473</span>        final RegionInfo[] regionsToMerge) throws IOException {<a name="line.1473"></a>
+<span class="sourceLineNo">1474</span>    }<a name="line.1474"></a>
+<span class="sourceLineNo">1475</span>  }<a name="line.1475"></a>
+<span class="sourceLineNo">1476</span><a name="line.1476"></a>
+<span class="sourceLineNo">1477</span>  private static HBaseTestingUtility UTIL = new HBaseTestingUtility();<a name="line.1477"></a>
+<span class="sourceLineNo">1478</span>  private static byte[] TEST_SNAPSHOT = Bytes.toBytes("observed_snapshot");<a name="line.1478"></a>
+<span class="sourceLineNo">1479</span>  private static TableName TEST_CLONE = TableName.valueOf("observed_clone");<a name="line.1479"></a>
+<span class="sourceLineNo">1480</span>  private static byte[] TEST_FAMILY = Bytes.toBytes("fam1");<a name="line.1480"></a>
+<span class="sourceLineNo">1481</span>  private static byte[] TEST_FAMILY2 = Bytes.toBytes("fam2");<a name="line.1481"></a>
+<span class="sourceLineNo">1482</span>  @Rule public TestName name = new TestName();<a name="line.1482"></a>
+<span class="sourceLineNo">1483</span><a name="line.1483"></a>
+<span class="sourceLineNo">1484</span>  @BeforeClass<a name="line.1484"></a>
+<span class="sourceLineNo">1485</span>  public static void setupBeforeClass() throws Exception {<a name="line.1485"></a>
+<span class="sourceLineNo">1486</span>    Configuration conf = UTIL.getConfiguration();<a name="line.1486"></a>
+<span class="sourceLineNo">1487</span>    conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY,<a name="line.1487"></a>
+<span class="sourceLineNo">1488</span>        CPMasterObserver.class.getName());<a name="line.1488"></a>
+<span class="sourceLineNo">1489</span>    // We need more than one data server on this test<a name="line.1489"></a>
+<span class="sourceLineNo">1490</span>    UTIL.startMiniCluster(2);<a name="line.1490"></a>
+<span class="sourceLineNo">1491</span>  }<a name="line.1491"></a>
+<span class="sourceLineNo">1492</span><a name="line.1492"></a>
+<span class="sourceLineNo">1493</span>  @AfterClass<a name="line.1493"></a>
+<span class="sourceLineNo">1494</span>  public static void tearDownAfterClass() throws Exception {<a name="line.1494"></a>
+<span class="sourceLineNo">1495</span>    UTIL.shutdownMiniCluster();<a name="line.1495"></a>
+<span class="sourceLineNo">1496</span>  }<a name="line.1496"></a>
 <span class="sourceLineNo">1497</span><a name="line.1497"></a>
-<span class="sourceLineNo">1498</span>    HMaster master = cluster.getMaster();<a name="line.1498"></a>
-<span class="sourceLineNo">1499</span>    assertTrue("Master should be active", master.isActiveMaster());<a name="line.1499"></a>
-<span class="sourceLineNo">1500</span>    MasterCoprocessorHost host = master.getMasterCoprocessorHost();<a name="line.1500"></a>
-<span class="sourceLineNo">1501</span>    assertNotNull("CoprocessorHost should not be null", host);<a name="line.1501"></a>
-<span class="sourceLineNo">1502</span>    CPMasterObserver cp = (CPMasterObserver)host.findCoprocessor(<a name="line.1502"></a>
-<span class="sourceLineNo">1503</span>        CPMasterObserver.class.getName());<a name="line.1503"></a>
-<span class="sourceLineNo">1504</span>    assertNotNull("CPMasterObserver coprocessor not found or not installed!", cp);<a name="line.1504"></a>
-<span class="sourceLineNo">1505</span><a name="line.1505"></a>
-<span class="sourceLineNo">1506</span>    // check basic lifecycle<a name="line.1506"></a>
-<span class="sourceLineNo">1507</span>    assertTrue("MasterObserver should have been started", cp.wasStarted());<a name="line.1507"></a>
-<span class="sourceLineNo">1508</span>    assertTrue("preMasterInitialization() hook should have been called",<a name="line.1508"></a>
-<span class="sourceLineNo">1509</span>        cp.wasMasterInitializationCalled());<a name="line.1509"></a>
-<span class="sourceLineNo">1510</span>    assertTrue("postStartMaster() hook should have been called",<a name="line.1510"></a>
-<span class="sourceLineNo">1511</span>        cp.wasStartMasterCalled());<a name="line.1511"></a>
-<span class="sourceLineNo">1512</span>  }<a name="line.1512"></a>
-<span class="sourceLineNo">1513</span><a name="line.1513"></a>
-<span class="sourceLineNo">1514</span>  @Test (timeout=180000)<a name="line.1514"></a>
-<span class="sourceLineNo">1515</span>  public void testTableOperations() throws Exception {<a name="line.1515"></a>
-<span class="sourceLineNo">1516</span>    MiniHBaseCluster cluster = UTIL.getHBaseCluster();<a name="line.1516"></a>
-<span class="sourceLineNo">1517</span>    final TableName tableName = TableName.valueOf(name.getMethodName());<a name="line.1517"></a>
-<span class="sourceLineNo">1518</span>    HMaster master = cluster.getMaster();<a name="line.1518"></a>
-<span class="sourceLineNo">1519</span>    MasterCoprocessorHost host = master.getMasterCoprocessorHost();<a name="line.1519"></a>
-<span class="sourceLineNo">1520</span>    CPMasterObserver cp = (CPMasterObserver)host.findCoprocessor(<a name="line.1520"></a>
-<span class="sourceLineNo">1521</span>        CPMasterObserver.class.getName());<a name="line.1521"></a>
-<span class="sourceLineNo">1522</span>    cp.enableBypass(true);<a name="line.1522"></a>
-<span class="sourceLineNo">1523</span>    cp.resetStates();<a name="line.1523"></a>
-<span class="sourceLineNo">1524</span>    assertFalse("No table created yet", cp.wasCreateTableCalled());<a name="line.1524"></a>
-<span class="sourceLineNo">1525</span><a name="line.1525"></a>
-<span class="sourceLineNo">1526</span>    // create a table<a name="line.1526"></a>
-<span class="sourceLineNo">1527</span>    HTableDescriptor htd = new HTableDescriptor(tableName);<a name="line.1527"></a>
-<span class="sourceLineNo">1528</span>    htd.addFamily(new HColumnDescriptor(TEST_FAMILY));<a name="line.1528"></a>
-<span class="sourceLineNo">1529</span>    try(Connection connection = ConnectionFactory.createConnection(UTIL.getConfiguration());<a name="line.1529"></a>
-<span class="sourceLineNo">1530</span>        Admin admin = connection.getAdmin()) {<a name="line.1530"></a>
-<span class="sourceLineNo">1531</span>      tableCreationLatch = new CountDownLatch(1);<a name="line.1531"></a>
-<span class="sourceLineNo">1532</span>      admin.createTable(htd, Arrays.copyOfRange(HBaseTestingUtility.KEYS,<a name="line.1532"></a>
-<span class="sourceLineNo">1533</span>        1, HBaseTestingUtility.KEYS.length));<a name="line.1533"></a>
-<span class="sourceLineNo">1534</span><a name="line.1534"></a>
-<span class="sourceLineNo">1535</span>      // preCreateTable can't bypass default action.<a name="line.1535"></a>
-<span class="sourceLineNo">1536</span>      assertTrue("Test table should be created", cp.wasCreateTableCalled());<a name="line.1536"></a>
-<span class="sourceLineNo">1537</span>      tableCreationLatch.await();<a name="line.1537"></a>
-<span class="sourceLineNo">1538</span>      assertTrue("Table pre create handler called.", cp<a name="line.1538"></a>
-<span class="sourceLineNo">1539</span>        .wasPreCreateTableActionCalled());<a name="line.1539"></a>
-<span class="sourceLineNo">1540</span>      assertTrue("Table create handler should be called.",<a name="line.1540"></a>
-<span class="sourceLineNo">1541</span>        cp.wasCreateTableActionCalled());<a name="line.1541"></a>
-<span class="sourceLineNo">1542</span><a name="line.1542"></a>
-<span class="sourceLineNo">1543</span>      RegionLocator regionLocator = connection.getRegionLocator(htd.getTableName());<a name="line.1543"></a>
-<span class="sourceLineNo">1544</span>      List&lt;HRegionLocation&gt; regions = regionLocator.getAllRegionLocations();<a name="line.1544"></a>
-<span class="sourceLineNo">1545</span><a name="line.1545"></a>
-<span class="sourceLineNo">1546</span>      admin.mergeRegionsAsync(regions.get(0).getRegionInfo().getEncodedNameAsBytes(),<a name="line.1546"></a>
-<span class="sourceLineNo">1547</span>        regions.get(1).getRegionInfo().getEncodedNameAsBytes(), true);<a name="line.1547"></a>
-<span class="sourceLineNo">1548</span>      assertTrue("Coprocessor should have been called on region merge",<a name="line.1548"></a>
-<span class="sourceLineNo">1549</span>        cp.wasMergeRegionsCalled());<a name="line.1549"></a>
-<span class="sourceLineNo">1550</span><a name="line.1550"></a>
-<span class="sourceLineNo">1551</span>      tableCreationLatch = new CountDownLatch(1);<a name="line.1551"></a>
-<span class="sourceLineNo">1552</span>      admin.disableTable(tableName);<a name="line.1552"></a>
-<span class="sourceLineNo">1553</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1553"></a>
-<span class="sourceLineNo">1554</span>      // preDisableTable can't bypass default action.<a name="line.1554"></a>
-<span class="sourceLineNo">1555</span>      assertTrue("Coprocessor should have been called on table disable",<a name="line.1555"></a>
-<span class="sourceLineNo">1556</span>        cp.wasDisableTableCalled());<a name="line.1556"></a>
-<span class="sourceLineNo">1557</span>      assertTrue("Disable table handler should be called.",<a name="line.1557"></a>
-<span class="sourceLineNo">1558</span>        cp.wasDisableTableActionCalled());<a name="line.1558"></a>
-<span class="sourceLineNo">1559</span><a name="line.1559"></a>
-<span class="sourceLineNo">1560</span>      // enable<a name="line.1560"></a>
-<span class="sourceLineNo">1561</span>      assertFalse(cp.wasEnableTableCalled());<a name="line.1561"></a>
-<span class="sourceLineNo">1562</span>      admin.enableTable(tableName);<a name="line.1562"></a>
-<span class="sourceLineNo">1563</span>      assertTrue(admin.isTableEnabled(tableName));<a name="line.1563"></a>
-<span class="sourceLineNo">1564</span>      // preEnableTable can't bypass default action.<a name="line.1564"></a>
-<span class="sourceLineNo">1565</span>      assertTrue("Coprocessor should have been called on table enable",<a name="line.1565"></a>
-<span class="sourceLineNo">1566</span>        cp.wasEnableTableCalled());<a name="line.1566"></a>
-<span class="sourceLineNo">1567</span>      assertTrue("Enable table handler should be called.",<a name="line.1567"></a>
-<span class="sourceLineNo">1568</span>        cp.wasEnableTableActionCalled());<a name="line.1568"></a>
-<span class="sourceLineNo">1569</span><a name="line.1569"></a>
-<span class="sourceLineNo">1570</span>      admin.disableTable(tableName);<a name="line.1570"></a>
-<span class="sourceLineNo">1571</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1571"></a>
-<span class="sourceLineNo">1572</span><a name="line.1572"></a>
-<span class="sourceLineNo">1573</span>      // modify table<a name="line.1573"></a>
-<span class="sourceLineNo">1574</span>      htd.setMaxFileSize(512 * 1024 * 1024);<a name="line.1574"></a>
-<span class="sourceLineNo">1575</span>      modifyTableSync(admin, tableName, htd);<a name="line.1575"></a>
-<span class="sourceLineNo">1576</span>      // preModifyTable can't bypass default action.<a name="line.1576"></a>
-<span class="sourceLineNo">1577</span>      assertTrue("Test table should have been modified",<a name="line.1577"></a>
-<span class="sourceLineNo">1578</span>        cp.wasModifyTableCalled());<a name="line.1578"></a>
-<span class="sourceLineNo">1579</span><a name="line.1579"></a>
-<span class="sourceLineNo">1580</span>      // add a column family<a name="line.1580"></a>
-<span class="sourceLineNo">1581</span>      admin.addColumnFamily(tableName, new HColumnDescriptor(TEST_FAMILY2));<a name="line.1581"></a>
-<span class="sourceLineNo">1582</span>      assertTrue("New column family shouldn't have been added to test table",<a name="line.1582"></a>
-<span class="sourceLineNo">1583</span>        cp.preAddColumnCalledOnly());<a name="line.1583"></a>
-<span class="sourceLineNo">1584</span><a name="line.1584"></a>
-<span class="sourceLineNo">1585</span>      // modify a column family<a name="line.1585"></a>
-<span class="sourceLineNo">1586</span>      HColumnDescriptor hcd1 = new HColumnDescriptor(TEST_FAMILY2);<a name="line.1586"></a>
-<span class="sourceLineNo">1587</span>      hcd1.setMaxVersions(25);<a name="line.1587"></a>
-<span class="sourceLineNo">1588</span>      admin.modifyColumnFamily(tableName, hcd1);<a name="line.1588"></a>
-<span class="sourceLineNo">1589</span>      assertTrue("Second column family should be modified",<a name="line.1589"></a>
-<span class="sourceLineNo">1590</span>        cp.preModifyColumnCalledOnly());<a name="line.1590"></a>
-<span class="sourceLineNo">1591</span><a name="line.1591"></a>
-<span class="sourceLineNo">1592</span>      // truncate table<a name="line.1592"></a>
-<span class="sourceLineNo">1593</span>      admin.truncateTable(tableName, false);<a name="line.1593"></a>
-<span class="sourceLineNo">1594</span><a name="line.1594"></a>
-<span class="sourceLineNo">1595</span>      // delete table<a name="line.1595"></a>
-<span class="sourceLineNo">1596</span>      admin.disableTable(tableName);<a name="line.1596"></a>
-<span class="sourceLineNo">1597</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1597"></a>
-<span class="sourceLineNo">1598</span>      deleteTable(admin, tableName);<a name="line.1598"></a>
-<span class="sourceLineNo">1599</span>      assertFalse("Test table should have been deleted",<a name="line.1599"></a>
-<span class="sourceLineNo">1600</span>        admin.tableExists(tableName));<a name="line.1600"></a>
-<span class="sourceLineNo">1601</span>      // preDeleteTable can't bypass default action.<a name="line.1601"></a>
-<span class="sourceLineNo">1602</span>      assertTrue("Coprocessor should have been called on table delete",<a name="line.1602"></a>
-<span class="sourceLineNo">1603</span>        cp.wasDeleteTableCalled());<a name="line.1603"></a>
-<span class="sourceLineNo">1604</span>      assertTrue("Delete table handler should be called.",<a name="line.1604"></a>
-<span class="sourceLineNo">1605</span>        cp.wasDeleteTableActionCalled());<a name="line.1605"></a>
-<span class="sourceLineNo">1606</span><a name="line.1606"></a>
-<span class="sourceLineNo">1607</span>      // turn off bypass, run the tests again<a name="line.1607"></a>
-<span class="sourceLineNo">1608</span>      cp.enableBypass(false);<a name="line.1608"></a>
-<span class="sourceLineNo">1609</span>      cp.resetStates();<a name="line.1609"></a>
+<span class="sourceLineNo">1498</span>  @Test (timeout=180000)<a name="line.1498"></a>
+<span class="sourceLineNo">1499</span>  public void testStarted() throws Exception {<a name="line.1499"></a>
+<span class="sourceLineNo">1500</span>    MiniHBaseCluster cluster = UTIL.getHBaseCluster();<a name="line.1500"></a>
+<span class="sourceLineNo">1501</span><a name="line.1501"></a>
+<span class="sourceLineNo">1502</span>    HMaster master = cluster.getMaster();<a name="line.1502"></a>
+<span class="sourceLineNo">1503</span>    assertTrue("Master should be active", master.isActiveMaster());<a name="line.1503"></a>
+<span class="sourceLineNo">1504</span>    MasterCoprocessorHost host = master.getMasterCoprocessorHost();<a name="line.1504"></a>
+<span class="sourceLineNo">1505</span>    assertNotNull("CoprocessorHost should not be null", host);<a name="line.1505"></a>
+<span class="sourceLineNo">1506</span>    CPMasterObserver cp = (CPMasterObserver)host.findCoprocessor(<a name="line.1506"></a>
+<span class="sourceLineNo">1507</span>        CPMasterObserver.class.getName());<a name="line.1507"></a>
+<span class="sourceLineNo">1508</span>    assertNotNull("CPMasterObserver coprocessor not found or not installed!", cp);<a name="line.1508"></a>
+<span class="sourceLineNo">1509</span><a name="line.1509"></a>
+<span class="sourceLineNo">1510</span>    // check basic lifecycle<a name="line.1510"></a>
+<span class="sourceLineNo">1511</span>    assertTrue("MasterObserver should have been started", cp.wasStarted());<a name="line.1511"></a>
+<span class="sourceLineNo">1512</span>    assertTrue("preMasterInitialization() hook should have been called",<a name="line.1512"></a>
+<span class="sourceLineNo">1513</span>        cp.wasMasterInitializationCalled());<a name="line.1513"></a>
+<span class="sourceLineNo">1514</span>    assertTrue("postStartMaster() hook should have been called",<a name="line.1514"></a>
+<span class="sourceLineNo">1515</span>        cp.wasStartMasterCalled());<a name="line.1515"></a>
+<span class="sourceLineNo">1516</span>  }<a name="line.1516"></a>
+<span class="sourceLineNo">1517</span><a name="line.1517"></a>
+<span class="sourceLineNo">1518</span>  @Test (timeout=180000)<a name="line.1518"></a>
+<span class="sourceLineNo">1519</span>  public void testTableOperations() throws Exception {<a name="line.1519"></a>
+<span class="sourceLineNo">1520</span>    MiniHBaseCluster cluster = UTIL.getHBaseCluster();<a name="line.1520"></a>
+<span class="sourceLineNo">1521</span>    final TableName tableName = TableName.valueOf(name.getMethodName());<a name="line.1521"></a>
+<span class="sourceLineNo">1522</span>    HMaster master = cluster.getMaster();<a name="line.1522"></a>
+<span class="sourceLineNo">1523</span>    MasterCoprocessorHost host = master.getMasterCoprocessorHost();<a name="line.1523"></a>
+<span class="sourceLineNo">1524</span>    CPMasterObserver cp = (CPMasterObserver)host.findCoprocessor(<a name="line.1524"></a>
+<span class="sourceLineNo">1525</span>        CPMasterObserver.class.getName());<a name="line.1525"></a>
+<span class="sourceLineNo">1526</span>    cp.enableBypass(true);<a name="line.1526"></a>
+<span class="sourceLineNo">1527</span>    cp.resetStates();<a name="line.1527"></a>
+<span class="sourceLineNo">1528</span>    assertFalse("No table created yet", cp.wasCreateTableCalled());<a name="line.1528"></a>
+<span class="sourceLineNo">1529</span><a name="line.1529"></a>
+<span class="sourceLineNo">1530</span>    // create a table<a name="line.1530"></a>
+<span class="sourceLineNo">1531</span>    HTableDescriptor htd = new HTableDescriptor(tableName);<a name="line.1531"></a>
+<span class="sourceLineNo">1532</span>    htd.addFamily(new HColumnDescriptor(TEST_FAMILY));<a name="line.1532"></a>
+<span class="sourceLineNo">1533</span>    try(Connection connection = ConnectionFactory.createConnection(UTIL.getConfiguration());<a name="line.1533"></a>
+<span class="sourceLineNo">1534</span>        Admin admin = connection.getAdmin()) {<a name="line.1534"></a>
+<span class="sourceLineNo">1535</span>      tableCreationLatch = new CountDownLatch(1);<a name="line.1535"></a>
+<span class="sourceLineNo">1536</span>      admin.createTable(htd, Arrays.copyOfRange(HBaseTestingUtility.KEYS,<a name="line.1536"></a>
+<span class="sourceLineNo">1537</span>        1, HBaseTestingUtility.KEYS.length));<a name="line.1537"></a>
+<span class="sourceLineNo">1538</span><a name="line.1538"></a>
+<span class="sourceLineNo">1539</span>      // preCreateTable can't bypass default action.<a name="line.1539"></a>
+<span class="sourceLineNo">1540</span>      assertTrue("Test table should be created", cp.wasCreateTableCalled());<a name="line.1540"></a>
+<span class="sourceLineNo">1541</span>      tableCreationLatch.await();<a name="line.1541"></a>
+<span class="sourceLineNo">1542</span>      assertTrue("Table pre create handler called.", cp<a name="line.1542"></a>
+<span class="sourceLineNo">1543</span>        .wasPreCreateTableActionCalled());<a name="line.1543"></a>
+<span class="sourceLineNo">1544</span>      assertTrue("Table create handler should be called.",<a name="line.1544"></a>
+<span class="sourceLineNo">1545</span>        cp.wasCreateTableActionCalled());<a name="line.1545"></a>
+<span class="sourceLineNo">1546</span><a name="line.1546"></a>
+<span class="sourceLineNo">1547</span>      RegionLocator regionLocator = connection.getRegionLocator(htd.getTableName());<a name="line.1547"></a>
+<span class="sourceLineNo">1548</span>      List&lt;HRegionLocation&gt; regions = regionLocator.getAllRegionLocations();<a name="line.1548"></a>
+<span class="sourceLineNo">1549</span><a name="line.1549"></a>
+<span class="sourceLineNo">1550</span>      admin.mergeRegionsAsync(regions.get(0).getRegionInfo().getEncodedNameAsBytes(),<a name="line.1550"></a>
+<span class="sourceLineNo">1551</span>        regions.get(1).getRegionInfo().getEncodedNameAsBytes(), true);<a name="line.1551"></a>
+<span class="sourceLineNo">1552</span>      assertTrue("Coprocessor should have been called on region merge",<a name="line.1552"></a>
+<span class="sourceLineNo">1553</span>        cp.wasMergeRegionsCalled());<a name="line.1553"></a>
+<span class="sourceLineNo">1554</span><a name="line.1554"></a>
+<span class="sourceLineNo">1555</span>      tableCreationLatch = new CountDownLatch(1);<a name="line.1555"></a>
+<span class="sourceLineNo">1556</span>      admin.disableTable(tableName);<a name="line.1556"></a>
+<span class="sourceLineNo">1557</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1557"></a>
+<span class="sourceLineNo">1558</span>      // preDisableTable can't bypass default action.<a name="line.1558"></a>
+<span class="sourceLineNo">1559</span>      assertTrue("Coprocessor should have been called on table disable",<a name="line.1559"></a>
+<span class="sourceLineNo">1560</span>        cp.wasDisableTableCalled());<a name="line.1560"></a>
+<span class="sourceLineNo">1561</span>      assertTrue("Disable table handler should be called.",<a name="line.1561"></a>
+<span class="sourceLineNo">1562</span>        cp.wasDisableTableActionCalled());<a name="line.1562"></a>
+<span class="sourceLineNo">1563</span><a name="line.1563"></a>
+<span class="sourceLineNo">1564</span>      // enable<a name="line.1564"></a>
+<span class="sourceLineNo">1565</span>      assertFalse(cp.wasEnableTableCalled());<a name="line.1565"></a>
+<span class="sourceLineNo">1566</span>      admin.enableTable(tableName);<a name="line.1566"></a>
+<span class="sourceLineNo">1567</span>      assertTrue(admin.isTableEnabled(tableName));<a name="line.1567"></a>
+<span class="sourceLineNo">1568</span>      // preEnableTable can't bypass default action.<a name="line.1568"></a>
+<span class="sourceLineNo">1569</span>      assertTrue("Coprocessor should have been called on table enable",<a name="line.1569"></a>
+<span class="sourceLineNo">1570</span>        cp.wasEnableTableCalled());<a name="line.1570"></a>
+<span class="sourceLineNo">1571</span>      assertTrue("Enable table handler should be called.",<a name="line.1571"></a>
+<span class="sourceLineNo">1572</span>        cp.wasEnableTableActionCalled());<a name="line.1572"></a>
+<span class="sourceLineNo">1573</span><a name="line.1573"></a>
+<span class="sourceLineNo">1574</span>      admin.disableTable(tableName);<a name="line.1574"></a>
+<span class="sourceLineNo">1575</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1575"></a>
+<span class="sourceLineNo">1576</span><a name="line.1576"></a>
+<span class="sourceLineNo">1577</span>      // modify table<a name="line.1577"></a>
+<span class="sourceLineNo">1578</span>      htd.setMaxFileSize(512 * 1024 * 1024);<a name="line.1578"></a>
+<span class="sourceLineNo">1579</span>      modifyTableSync(admin, tableName, htd);<a name="line.1579"></a>
+<span class="sourceLineNo">1580</span>      // preModifyTable can't bypass default action.<a name="line.1580"></a>
+<span class="sourceLineNo">1581</span>      assertTrue("Test table should have been modified",<a name="line.1581"></a>
+<span class="sourceLineNo">1582</span>        cp.wasModifyTableCalled());<a name="line.1582"></a>
+<span class="sourceLineNo">1583</span><a name="line.1583"></a>
+<span class="sourceLineNo">1584</span>      // add a column family<a name="line.1584"></a>
+<span class="sourceLineNo">1585</span>      admin.addColumnFamily(tableName, new HColumnDescriptor(TEST_FAMILY2));<a name="line.1585"></a>
+<span class="sourceLineNo">1586</span>      assertTrue("New column family shouldn't have been added to test table",<a name="line.1586"></a>
+<span class="sourceLineNo">1587</span>        cp.preAddColumnCalledOnly());<a name="line.1587"></a>
+<span class="sourceLineNo">1588</span><a name="line.1588"></a>
+<span class="sourceLineNo">1589</span>      // modify a column family<a name="line.1589"></a>
+<span class="sourceLineNo">1590</span>      HColumnDescriptor hcd1 = new HColumnDescriptor(TEST_FAMILY2);<a name="line.1590"></a>
+<span class="sourceLineNo">1591</span>      hcd1.setMaxVersions(25);<a name="line.1591"></a>
+<span class="sourceLineNo">1592</span>      admin.modifyColumnFamily(tableName, hcd1);<a name="line.1592"></a>
+<span class="sourceLineNo">1593</span>      assertTrue("Second column family should be modified",<a name="line.1593"></a>
+<span class="sourceLineNo">1594</span>        cp.preModifyColumnCalledOnly());<a name="line.1594"></a>
+<span class="sourceLineNo">1595</span><a name="line.1595"></a>
+<span class="sourceLineNo">1596</span>      // truncate table<a name="line.1596"></a>
+<span class="sourceLineNo">1597</span>      admin.truncateTable(tableName, false);<a name="line.1597"></a>
+<span class="sourceLineNo">1598</span><a name="line.1598"></a>
+<span class="sourceLineNo">1599</span>      // delete table<a name="line.1599"></a>
+<span class="sourceLineNo">1600</span>      admin.disableTable(tableName);<a name="line.1600"></a>
+<span class="sourceLineNo">1601</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1601"></a>
+<span class="sourceLineNo">1602</span>      deleteTable(admin, tableName);<a name="line.1602"></a>
+<span class="sourceLineNo">1603</span>      assertFalse("Test table should have been deleted",<a name="line.1603"></a>
+<span class="sourceLineNo">1604</span>        admin.tableExists(tableName));<a name="line.1604"></a>
+<span class="sourceLineNo">1605</span>      // preDeleteTable can't bypass default action.<a name="line.1605"></a>
+<span class="sourceLineNo">1606</span>      assertTrue("Coprocessor should have been called on table delete",<a name="line.1606"></a>
+<span class="sourceLineNo">1607</span>        cp.wasDeleteTableCalled());<a name="line.1607"></a>
+<span class="sourceLineNo">1608</span>      assertTrue("Delete table handler should be called.",<a name="line.1608"></a>
+<span class="sourceLineNo">1609</span>        cp.wasDeleteTableActionCalled());<a name="line.1609"></a>
 <span class="sourceLineNo">1610</span><a name="line.1610"></a>
-<span class="sourceLineNo">1611</span>      admin.createTable(htd);<a name="line.1611"></a>
-<span class="sourceLineNo">1612</span>      assertTrue("Test table should be created", cp.wasCreateTableCalled());<a name="line.1612"></a>
-<span class="sourceLineNo">1613</span>      tableCreationLatch.await();<a name="line.1613"></a>
-<span class="sourceLineNo">1614</span>      assertTrue("Table pre create handler called.", cp<a name="line.1614"></a>
-<span class="sourceLineNo">1615</span>        .wasPreCreateTableActionCalled());<a name="line.1615"></a>
-<span class="sourceLineNo">1616</span>      assertTrue("Table create handler should be called.",<a name="line.1616"></a>
-<span class="sourceLineNo">1617</span>        cp.wasCreateTableActionCalled());<a name="line.1617"></a>
-<span class="sourceLineNo">1618</span><a name="line.1618"></a>
-<span class="sourceLineNo">1619</span>      // disable<a name="line.1619"></a>
-<span class="sourceLineNo">1620</span>      assertFalse(cp.wasDisableTableCalled());<a name="line.1620"></a>
-<span class="sourceLineNo">1621</span>      assertFalse(cp.wasDisableTableActionCalled());<a name="line.1621"></a>
-<span class="sourceLineNo">1622</span>      admin.disableTable(tableName);<a name="line.1622"></a>
-<span class="sourceLineNo">1623</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1623"></a>
-<span class="sourceLineNo">1624</span>      assertTrue("Coprocessor should have been called on table disable",<a name="line.1624"></a>
-<span class="sourceLineNo">1625</span>        cp.wasDisableTableCalled());<a name="line.1625"></a>
-<span class="sourceLineNo">1626</span>      assertTrue("Disable table handler should be called.",<a name="line.1626"></a>
-<span class="sourceLineNo">1627</span>        cp.wasDisableTableActionCalled());<a name="line.1627"></a>
-<span class="sourceLineNo">1628</span><a name="line.1628"></a>
-<span class="sourceLineNo">1629</span>      // modify table<a name="line.1629"></a>
-<span class="sourceLineNo">1630</span>      htd.setMaxFileSize(512 * 1024 * 1024);<a name="line.1630"></a>
-<span class="sourceLineNo">1631</span>      modifyTableSync(admin, tableName, htd);<a name="line.1631"></a>
-<span class="sourceLineNo">1632</span>      assertTrue("Test table should have been modified",<a name="line.1632"></a>
-<span class="sourceLineNo">1633</span>        cp.wasModifyTableCalled());<a name="line.1633"></a>
-<span class="sourceLineNo">1634</span>      // add a column family<a name="line.1634"></a>
-<span class="sourceLineNo">1635</span>      admin.addColumnFamily(tableName, new HColumnDescriptor(TEST_FAMILY2));<a name="line.1635"></a>
-<span class="sourceLineNo">1636</span>      assertTrue("New column family should have been added to test table",<a name="line.1636"></a>
-<span class="sourceLineNo">1637</span>        cp.wasAddColumnCalled());<a name="line.1637"></a>
-<span class="sourceLineNo">1638</span>      assertTrue("Add column handler should be called.",<a name="line.1638"></a>
-<span class="sourceLineNo">1639</span>        cp.wasAddColumnFamilyActionCalled());<a name="line.1639"></a>
-<span class="sourceLineNo">1640</span><a name="line.1640"></a>
-<span class="sourceLineNo">1641</span>      // modify a column family<a name="line.1641"></a>
-<span class="sourceLineNo">1642</span>      HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAMILY2);<a name="line.1642"></a>
-<span class="sourceLineNo">1643</span>      hcd.setMaxVersions(25);<a name="line.1643"></a>
-<span class="sourceLineNo">1644</span>      admin.modifyColumnFamily(tableName, hcd);<a name="line.1644"></a>
-<span class="sourceLineNo">1645</span>      assertTrue("Second column family should be modified",<a name="line.1645"></a>
-<span class="sourceLineNo">1646</span>        cp.wasModifyColumnCalled());<a name="line.1646"></a>
-<span class="sourceLineNo">1647</span>      assertTrue("Modify table handler should be called.",<a name="line.1647"></a>
-<span class="sourceLineNo">1648</span>        cp.wasModifyColumnFamilyActionCalled());<a name="line.1648"></a>
-<span class="sourceLineNo">1649</span><a name="line.1649"></a>
-<span class="sourceLineNo">1650</span>      // enable<a name="line.1650"></a>
-<span class="sourceLineNo">1651</span>      assertFalse(cp.wasEnableTableCalled());<a name="line.1651"></a>
-<span class="sourceLineNo">1652</span>      assertFalse(cp.wasEnableTableActionCalled());<a name="line.1652"></a>
-<span class="sourceLineNo">1653</span>      admin.enableTable(tableName);<a name="line.1653"></a>
-<span class="sourceLineNo">1654</span>      assertTrue(admin.isTableEnabled(tableName));<a name="line.1654"></a>
-<span class="sourceLineNo">1655</span>      assertTrue("Coprocessor should have been called on table enable",<a name="line.1655"></a>
-<span class="sourceLineNo">1656</span>        cp.wasEnableTableCalled());<a name="line.1656"></a>
-<span class="sourceLineNo">1657</span>      assertTrue("Enable table handler should be called.",<a name="line.1657"></a>
-<span class="sourceLineNo">1658</span>        cp.wasEnableTableActionCalled());<a name="line.1658"></a>
-<span class="sourceLineNo">1659</span><a name="line.1659"></a>
-<span class="sourceLineNo">1660</span>      // disable again<a name="line.1660"></a>
-<span class="sourceLineNo">1661</span>      admin.disableTable(tableName);<a name="line.1661"></a>
-<span class="sourceLineNo">1662</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1662"></a>
+<span class="sourceLineNo">1611</span>      // turn off bypass, run the tests again<a name="line.1611"></a>
+<span class="sourceLineNo">1612</span>      cp.enableBypass(false);<a name="line.1612"></a>
+<span class="sourceLineNo">1613</span>      cp.resetStates();<a name="line.1613"></a>
+<span class="sourceLineNo">1614</span><a name="line.1614"></a>
+<span class="sourceLineNo">1615</span>      admin.createTable(htd);<a name="line.1615"></a>
+<span class="sourceLineNo">1616</span>      assertTrue("Test table should be created", cp.wasCreateTableCalled());<a name="line.1616"></a>
+<span class="sourceLineNo">1617</span>      tableCreationLatch.await();<a name="line.1617"></a>
+<span class="sourceLineNo">1618</span>      assertTrue("Table pre create handler called.", cp<a name="line.1618"></a>
+<span class="sourceLineNo">1619</span>        .wasPreCreateTableActionCalled());<a name="line.1619"></a>
+<span class="sourceLineNo">1620</span>      assertTrue("Table create handler should be called.",<a name="line.1620"></a>
+<span class="sourceLineNo">1621</span>        cp.wasCreateTableActionCalled());<a name="line.1621"></a>
+<span class="sourceLineNo">1622</span><a name="line.1622"></a>
+<span class="sourceLineNo">1623</span>      // disable<a name="line.1623"></a>
+<span class="sourceLineNo">1624</span>      assertFalse(cp.wasDisableTableCalled());<a name="line.1624"></a>
+<span class="sourceLineNo">1625</span>      assertFalse(cp.wasDisableTableActionCalled());<a name="line.1625"></a>
+<span class="sourceLineNo">1626</span>      admin.disableTable(tableName);<a name="line.1626"></a>
+<span class="sourceLineNo">1627</span>      assertTrue(admin.isTableDisabled(tableName));<a name="line.1627"></a>
+<span class="sourceLineNo">1628</span>      assertTrue("Coprocessor should have been called on table disable",<a name="line.1628"></a>
+<span class="sourceLineNo">1629</span>        cp.wasDisableTableCalled());<a name="line.1629"></a>
+<span class="sourceLineNo">1630</span>      assertTrue("Disable table handler should be called.",<a name="line.1630"></a>
+<span class="sourceLineNo">1631</span>        cp.wasDisableTableActionCalled());<a name="line.1631"></a>
+<span class="sourceLineNo">1632</span><a name="line.1632"></a>
+<span class="sourceLineNo">1633</span>      // modify table<a name="line.1633"></a>
+<span class="sourceLineNo">1634</span>      htd.setMaxFileSize(512 * 1024 * 1024);<a name="line.1634"></a>
+<span class="sourceLineNo">1635</span>      modifyTableSync(admin, tableName, htd);<a name="line.1635"></a>
+<span class="sourceLineNo">1636</span>      assertTrue("Test table should have been modified",<a name="line.1636"></a>
+<span class="sourceLineNo">1637</span>        cp.wasModifyTableCalled());<a name="line.1637"></a>
+<span class="sourceLineNo">1638</span>      // add a column family<a name="line.1638"></a>
+<span class="sourceLineNo">1639</span>      admin.addColumnFamily(tableName, new HColumnDescriptor(TEST_FAMILY2));<a name="line.1639"></a>
+<span class="sourceLineNo">1640</span>      assertTrue("New column family should have been added to test table",<a name="line.1640"></a>
+<span class="sourceLineNo">1641</span>        cp.wasAddColumnCalled());<a name="line.1641"></a>
+<span class="sourceLineNo">1642</span>      assertTrue("Add column handler should be called.",<a name="line.1642"></a>
+<span class="sourceLineNo">1643</span>        cp.wasAddColumnFamilyActionCalled());<a name="line.1643"></a>
+<span class="sourceLineNo">1644</span><a name="line.1644"></a>
+<span class="sourceLineNo">1645</span>      // modify a column family<a name="line.1645"></a>
+<span class="sourceLineNo">1646</span>      HColumnDescriptor hcd = new HColumnDescriptor(TEST_FAMILY2);<a name="line.1646"></a>
+<span class="sourceLineNo">1647</span>      hcd.setMaxVersions(25);<a name="line.1647"></a>
+<span class="sourceLineNo">1648</span>      admin.modifyColumnFamily(tableName, hcd);<a name="line.1648"></a>
+<span class="sourceLineNo">1649</span>      assertTrue("Second column family should be modified",<a name="line.1649"></a>
+<span class="sourceLineNo">1650</span>        cp.wasModifyColumnCalled());<a name="line.1650"></a>
+<span class="sourceLineNo">1651</span>      assertTrue("Modify table handler should be called.",<a name="line.1651"></a>
+<span class="sourceLineNo">1652</span>        cp.wasModifyColumnFamilyActionCalled());<a name="line.1652"></a>
+<span class="sourceLineNo">1653</span><a name="line.1653"></a>
+<span class="sourceLineNo">1654</span>      // enable<a name="line.1654"></a>
+<span class="sourceLineNo">1655</span>      assertFalse(cp.wasEnableTableCalled());<a name="line.1655"></a>
+<span class="sourceLineNo">1656</span>      assertFalse(cp.wasEnableTableActionCalled());<a name="line.1656"></a>
+<span class="sourceLineNo">1657</span>      admin.enableTable(tableName);<a name="line.1657"></a>
+<span class="sourceLineNo">1658</span>      assertTrue(admin.isTableEnabled(tableName));<a name="line.1658"></a>
+<span class="sourceLineNo">1659</span>      assertTrue("Coprocessor should have been called on table enable",<a name="line.1659"></a>
+<span class="sourceLineNo">1660</span>        cp.wasEnableTableCalled());<a name="line.1660"></a>
+<span class="sourceLineNo">1661</span>      assertTrue("Enable table handler should be called.",<a name="line.1661"></a>
+<span class="sourceLineNo">1662</span>        cp.wasEnableTableActionCalled());<a name="line.1662"></a>
 <span class="sourceLineNo">1663</span><a name="line.1663"></a>
-<span class="sourceLineNo">1664</span>      // delete column<a name="line.1664"></a>
-<span class="sourceLineNo">1665</span>      assertFalse("No column family deleted yet", cp.wasDeleteColumnCalled());<a name="line.1665"></a>
-<span class="sourceLineNo">1666</span>      assertFalse("Delete table column handler should not be called.",<a name="line.1666"></a>
-<span class="sourceLineNo">1667</span>        cp.wasDeleteColumnFamilyActionCalled());<a name="line.1667"></a>
-<span class="sourceLineNo">1668</span>      admin.deleteColumnFamily(tableName, TEST_FAMILY2);<a name="line.1668"></a>
-<span class="sourceLineNo">1669</span>      HTableDescriptor tableDesc = admin.getTableDescriptor(tableName);<a name="line.1669"></a>
-<span class="sourceLineNo">1670</span>      assertNull("'"+Bytes.toString(TEST_FAMILY2)+"' should have been removed",<a name="line.1670"></a>
-<span class="sourceLineNo">1671</span>        tableDesc.getFamily(TEST_FAMILY2));<a name="line.1671"></a>
-<span class="sourceLineNo">1672</span>      assertTrue("Coprocessor should have been called on column delete",<a name="line.1672"></a>
-<span class="sourceLineNo">1673</span>        cp.wasDeleteColumnCalled());<a name="line.1673"></a>
-<span class="sourceLineNo">1674</span>      assertTrue("Delete table column handler should be called.",<a name="line.1674"></a>
-<span class="sourceLineNo">1675</span>        cp.wasDeleteColumnFamilyActionCalled());<a name="line.1675"></a>
-<span class="sourceLineNo">1676</span><a name="line.1676"></a>
-<span class="sourceLineNo">1677</span>      // delete table<a name="line.1677"></a>
-<span class="sourceLineNo">1678</span>      assertFalse("No table deleted yet", cp.wasDeleteTableCalled());<a name="line.1678"></a>
-<span class="sourceLineNo">1679</span>      assertFalse("Delete table handler should not be called.",<a name="line.1679"></a>
-<span class="sourceLineNo">1680</span>        cp.wasDeleteTableActionCalled());<a name="line.1680"></a>
-<span class="sourceLineNo">1681</span>      deleteTable(admin, tableName);<a name="line.1681"></a>
-<span class="sourceLineNo">1682</span>      assertFalse("Test table should have been deleted",<a name="line.1682"></a>
-<span class="sourceLineNo">1683</span>        admin.tableExists(tableName));<a name="line.1683"></a>
-<span class="sourceLineNo">1684</span>      assertTrue("Coprocessor should have been called on table delete",<a name="line.1684"></a>
-<span class="sourceLineNo">1685</span>        cp.wasDeleteTableCalled());<a name="line.1685"></a>
-<span class="sourceLineNo">1686</span>      assertTrue("Delete table handler should be called.",<a name="line.1686"></a>
-<span class="sourceLineNo">1687</span>        cp.wasDeleteTableActionCalled());<a name="line.1687"></a>
-<span class="sourceLineNo">1688</span>    }<a name="line.1688"></a>
-<span class="sourceLineNo">1689</span>  }<a name="line.1689"></a>
-<span class="sourceLineNo">1690</span><a name="line.1690"></a>
-<span class="sourceLineNo">1691</span>  @Test (timeout=180000)<a name="line.1691"></a>
-<span class="sourceLineNo">1692</span>  public void testSnapshotOperations() throws Exception {<a name="line.1692"></a>
-<span class="sourceLineNo">1693</span>    final TableName tableName = TableName.valueOf(name.getMethodName());<a name="line.1693"></a>
-<span class="sourceLineNo">1694</span>    MiniHBaseCluster cluster = UTIL.getHBaseCluster();<a name="line.1694"></a>
-<span class="sourceLineNo">1695</span>    HMaster master = cluster.getMaster();<a name="line.1695"></a>
-<span class="sourceLineNo">1696</span>    MasterCoprocessorHost host = master.getMasterCoprocessorHost();<a name="line.1696"></a>
-<span class="sourceLineNo">1697</span>    CPMasterObserver cp = (CPMasterObserver)host.findCoprocessor(<a name="line.1697"></a>
-<span class="sourceLineNo">1698</span>        CPMasterObserver.class.getName());<a name="line.1698"></a>
-<span class="sourceLineNo">1699</span>    cp.resetStates();<a name="line.1699"></a>
-<span class="sourceLineNo">1700</span><a name="line.1700"></a>
-<span class="sourceLineNo">1701</span>    // create a table<a name="line.1701"></a>
-<span class="sourceLineNo">1702</span>    HTableDescriptor htd = new HTableDescriptor(tableName);<a name="line.1702"></a>
-<span class="sourceLineNo">1703</span>    htd.addFamily(new HColumnDescriptor(TEST_FAMILY));<a name="line.1703"></a>
-<span class="sourceLineNo">1704</span>    Admin admin = UTIL.getAdmin();<a name="line.1704"></a>
-<span class="sourceLineNo">1705<

<TRUNCATED>

Mime
View raw message