hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [02/26] hbase-site git commit: Published site at 42aa3dd463c0d30a9b940d296b87316b5c67e1f5.
Date Tue, 02 Oct 2018 14:53:53 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/37b8a04a/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroups.CPMasterObserver.html
----------------------------------------------------------------------
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroups.CPMasterObserver.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroups.CPMasterObserver.html
index 16827da..beaa49d 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroups.CPMasterObserver.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/rsgroup/TestRSGroups.CPMasterObserver.html
@@ -141,7 +141,7 @@
 <span class="sourceLineNo">133</span>      INIT = true;<a name="line.133"></a>
 <span class="sourceLineNo">134</span>      afterMethod();<a name="line.134"></a>
 <span class="sourceLineNo">135</span>    }<a name="line.135"></a>
-<span class="sourceLineNo">136</span><a name="line.136"></a>
+<span class="sourceLineNo">136</span>    observer.resetFlags();<a name="line.136"></a>
 <span class="sourceLineNo">137</span>  }<a name="line.137"></a>
 <span class="sourceLineNo">138</span><a name="line.138"></a>
 <span class="sourceLineNo">139</span>  @After<a name="line.139"></a>
@@ -313,315 +313,340 @@
 <span class="sourceLineNo">305</span>    boolean preGetRSGroupInfoOfServerCalled = false;<a name="line.305"></a>
 <span class="sourceLineNo">306</span>    boolean postGetRSGroupInfoOfServerCalled = false;<a name="line.306"></a>
 <span class="sourceLineNo">307</span><a name="line.307"></a>
-<span class="sourceLineNo">308</span>    @Override<a name="line.308"></a>
-<span class="sourceLineNo">309</span>    public Optional&lt;MasterObserver&gt; getMasterObserver() {<a name="line.309"></a>
-<span class="sourceLineNo">310</span>      return Optional.of(this);<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    }<a name="line.311"></a>
-<span class="sourceLineNo">312</span>    @Override<a name="line.312"></a>
-<span class="sourceLineNo">313</span>    public void preMoveServersAndTables(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.313"></a>
-<span class="sourceLineNo">314</span>        Set&lt;Address&gt; servers, Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.314"></a>
-<span class="sourceLineNo">315</span>      preMoveServersAndTables = true;<a name="line.315"></a>
-<span class="sourceLineNo">316</span>    }<a name="line.316"></a>
-<span class="sourceLineNo">317</span>    @Override<a name="line.317"></a>
-<span class="sourceLineNo">318</span>    public void postMoveServersAndTables(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.318"></a>
-<span class="sourceLineNo">319</span>        Set&lt;Address&gt; servers, Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.319"></a>
-<span class="sourceLineNo">320</span>      postMoveServersAndTables = true;<a name="line.320"></a>
-<span class="sourceLineNo">321</span>    }<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    @Override<a name="line.322"></a>
-<span class="sourceLineNo">323</span>    public void preRemoveServers(<a name="line.323"></a>
-<span class="sourceLineNo">324</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.324"></a>
-<span class="sourceLineNo">325</span>        Set&lt;Address&gt; servers) throws IOException {<a name="line.325"></a>
-<span class="sourceLineNo">326</span>      preRemoveServersCalled = true;<a name="line.326"></a>
-<span class="sourceLineNo">327</span>    }<a name="line.327"></a>
-<span class="sourceLineNo">328</span>    @Override<a name="line.328"></a>
-<span class="sourceLineNo">329</span>    public void postRemoveServers(<a name="line.329"></a>
-<span class="sourceLineNo">330</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.330"></a>
-<span class="sourceLineNo">331</span>        Set&lt;Address&gt; servers) throws IOException {<a name="line.331"></a>
-<span class="sourceLineNo">332</span>      postRemoveServersCalled = true;<a name="line.332"></a>
-<span class="sourceLineNo">333</span>    }<a name="line.333"></a>
-<span class="sourceLineNo">334</span>    @Override<a name="line.334"></a>
-<span class="sourceLineNo">335</span>    public void preRemoveRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.335"></a>
-<span class="sourceLineNo">336</span>        String name) throws IOException {<a name="line.336"></a>
-<span class="sourceLineNo">337</span>      preRemoveRSGroupCalled = true;<a name="line.337"></a>
-<span class="sourceLineNo">338</span>    }<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    @Override<a name="line.339"></a>
-<span class="sourceLineNo">340</span>    public void postRemoveRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.340"></a>
-<span class="sourceLineNo">341</span>        String name) throws IOException {<a name="line.341"></a>
-<span class="sourceLineNo">342</span>      postRemoveRSGroupCalled = true;<a name="line.342"></a>
-<span class="sourceLineNo">343</span>    }<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    @Override<a name="line.344"></a>
-<span class="sourceLineNo">345</span>    public void preAddRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.345"></a>
-<span class="sourceLineNo">346</span>        String name) throws IOException {<a name="line.346"></a>
-<span class="sourceLineNo">347</span>      preAddRSGroupCalled = true;<a name="line.347"></a>
-<span class="sourceLineNo">348</span>    }<a name="line.348"></a>
-<span class="sourceLineNo">349</span>    @Override<a name="line.349"></a>
-<span class="sourceLineNo">350</span>    public void postAddRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.350"></a>
-<span class="sourceLineNo">351</span>        String name) throws IOException {<a name="line.351"></a>
-<span class="sourceLineNo">352</span>      postAddRSGroupCalled = true;<a name="line.352"></a>
-<span class="sourceLineNo">353</span>    }<a name="line.353"></a>
-<span class="sourceLineNo">354</span>    @Override<a name="line.354"></a>
-<span class="sourceLineNo">355</span>    public void preMoveTables(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.355"></a>
-<span class="sourceLineNo">356</span>        Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.356"></a>
-<span class="sourceLineNo">357</span>      preMoveTablesCalled = true;<a name="line.357"></a>
+<span class="sourceLineNo">308</span>    void resetFlags() {<a name="line.308"></a>
+<span class="sourceLineNo">309</span>      preBalanceRSGroupCalled = false;<a name="line.309"></a>
+<span class="sourceLineNo">310</span>      postBalanceRSGroupCalled = false;<a name="line.310"></a>
+<span class="sourceLineNo">311</span>      preMoveServersCalled = false;<a name="line.311"></a>
+<span class="sourceLineNo">312</span>      postMoveServersCalled = false;<a name="line.312"></a>
+<span class="sourceLineNo">313</span>      preMoveTablesCalled = false;<a name="line.313"></a>
+<span class="sourceLineNo">314</span>      postMoveTablesCalled = false;<a name="line.314"></a>
+<span class="sourceLineNo">315</span>      preAddRSGroupCalled = false;<a name="line.315"></a>
+<span class="sourceLineNo">316</span>      postAddRSGroupCalled = false;<a name="line.316"></a>
+<span class="sourceLineNo">317</span>      preRemoveRSGroupCalled = false;<a name="line.317"></a>
+<span class="sourceLineNo">318</span>      postRemoveRSGroupCalled = false;<a name="line.318"></a>
+<span class="sourceLineNo">319</span>      preRemoveServersCalled = false;<a name="line.319"></a>
+<span class="sourceLineNo">320</span>      postRemoveServersCalled = false;<a name="line.320"></a>
+<span class="sourceLineNo">321</span>      preMoveServersAndTables = false;<a name="line.321"></a>
+<span class="sourceLineNo">322</span>      postMoveServersAndTables = false;<a name="line.322"></a>
+<span class="sourceLineNo">323</span>      preGetRSGroupInfoCalled = false;<a name="line.323"></a>
+<span class="sourceLineNo">324</span>      postGetRSGroupInfoCalled = false;<a name="line.324"></a>
+<span class="sourceLineNo">325</span>      preGetRSGroupInfoOfTableCalled = false;<a name="line.325"></a>
+<span class="sourceLineNo">326</span>      postGetRSGroupInfoOfTableCalled = false;<a name="line.326"></a>
+<span class="sourceLineNo">327</span>      preListRSGroupsCalled = false;<a name="line.327"></a>
+<span class="sourceLineNo">328</span>      postListRSGroupsCalled = false;<a name="line.328"></a>
+<span class="sourceLineNo">329</span>      preGetRSGroupInfoOfServerCalled = false;<a name="line.329"></a>
+<span class="sourceLineNo">330</span>      postGetRSGroupInfoOfServerCalled = false;<a name="line.330"></a>
+<span class="sourceLineNo">331</span>    }<a name="line.331"></a>
+<span class="sourceLineNo">332</span><a name="line.332"></a>
+<span class="sourceLineNo">333</span>    @Override<a name="line.333"></a>
+<span class="sourceLineNo">334</span>    public Optional&lt;MasterObserver&gt; getMasterObserver() {<a name="line.334"></a>
+<span class="sourceLineNo">335</span>      return Optional.of(this);<a name="line.335"></a>
+<span class="sourceLineNo">336</span>    }<a name="line.336"></a>
+<span class="sourceLineNo">337</span>    @Override<a name="line.337"></a>
+<span class="sourceLineNo">338</span>    public void preMoveServersAndTables(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.338"></a>
+<span class="sourceLineNo">339</span>        Set&lt;Address&gt; servers, Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.339"></a>
+<span class="sourceLineNo">340</span>      preMoveServersAndTables = true;<a name="line.340"></a>
+<span class="sourceLineNo">341</span>    }<a name="line.341"></a>
+<span class="sourceLineNo">342</span>    @Override<a name="line.342"></a>
+<span class="sourceLineNo">343</span>    public void postMoveServersAndTables(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.343"></a>
+<span class="sourceLineNo">344</span>        Set&lt;Address&gt; servers, Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.344"></a>
+<span class="sourceLineNo">345</span>      postMoveServersAndTables = true;<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    }<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    @Override<a name="line.347"></a>
+<span class="sourceLineNo">348</span>    public void preRemoveServers(<a name="line.348"></a>
+<span class="sourceLineNo">349</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.349"></a>
+<span class="sourceLineNo">350</span>        Set&lt;Address&gt; servers) throws IOException {<a name="line.350"></a>
+<span class="sourceLineNo">351</span>      preRemoveServersCalled = true;<a name="line.351"></a>
+<span class="sourceLineNo">352</span>    }<a name="line.352"></a>
+<span class="sourceLineNo">353</span>    @Override<a name="line.353"></a>
+<span class="sourceLineNo">354</span>    public void postRemoveServers(<a name="line.354"></a>
+<span class="sourceLineNo">355</span>        final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.355"></a>
+<span class="sourceLineNo">356</span>        Set&lt;Address&gt; servers) throws IOException {<a name="line.356"></a>
+<span class="sourceLineNo">357</span>      postRemoveServersCalled = true;<a name="line.357"></a>
 <span class="sourceLineNo">358</span>    }<a name="line.358"></a>
 <span class="sourceLineNo">359</span>    @Override<a name="line.359"></a>
-<span class="sourceLineNo">360</span>    public void postMoveTables(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.360"></a>
-<span class="sourceLineNo">361</span>        Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.361"></a>
-<span class="sourceLineNo">362</span>      postMoveTablesCalled = true;<a name="line.362"></a>
+<span class="sourceLineNo">360</span>    public void preRemoveRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.360"></a>
+<span class="sourceLineNo">361</span>        String name) throws IOException {<a name="line.361"></a>
+<span class="sourceLineNo">362</span>      preRemoveRSGroupCalled = true;<a name="line.362"></a>
 <span class="sourceLineNo">363</span>    }<a name="line.363"></a>
 <span class="sourceLineNo">364</span>    @Override<a name="line.364"></a>
-<span class="sourceLineNo">365</span>    public void preMoveServers(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.365"></a>
-<span class="sourceLineNo">366</span>        Set&lt;Address&gt; servers, String targetGroup) throws IOException {<a name="line.366"></a>
-<span class="sourceLineNo">367</span>      preMoveServersCalled = true;<a name="line.367"></a>
+<span class="sourceLineNo">365</span>    public void postRemoveRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.365"></a>
+<span class="sourceLineNo">366</span>        String name) throws IOException {<a name="line.366"></a>
+<span class="sourceLineNo">367</span>      postRemoveRSGroupCalled = true;<a name="line.367"></a>
 <span class="sourceLineNo">368</span>    }<a name="line.368"></a>
-<span class="sourceLineNo">369</span><a name="line.369"></a>
-<span class="sourceLineNo">370</span>    @Override<a name="line.370"></a>
-<span class="sourceLineNo">371</span>    public void postMoveServers(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.371"></a>
-<span class="sourceLineNo">372</span>        Set&lt;Address&gt; servers, String targetGroup) throws IOException {<a name="line.372"></a>
-<span class="sourceLineNo">373</span>      postMoveServersCalled = true;<a name="line.373"></a>
-<span class="sourceLineNo">374</span>    }<a name="line.374"></a>
-<span class="sourceLineNo">375</span>    @Override<a name="line.375"></a>
-<span class="sourceLineNo">376</span>    public void preBalanceRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.376"></a>
-<span class="sourceLineNo">377</span>        String groupName) throws IOException {<a name="line.377"></a>
-<span class="sourceLineNo">378</span>      preBalanceRSGroupCalled = true;<a name="line.378"></a>
-<span class="sourceLineNo">379</span>    }<a name="line.379"></a>
-<span class="sourceLineNo">380</span>    @Override<a name="line.380"></a>
-<span class="sourceLineNo">381</span>    public void postBalanceRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.381"></a>
-<span class="sourceLineNo">382</span>        String groupName, boolean balancerRan) throws IOException {<a name="line.382"></a>
-<span class="sourceLineNo">383</span>      postBalanceRSGroupCalled = true;<a name="line.383"></a>
-<span class="sourceLineNo">384</span>    }<a name="line.384"></a>
-<span class="sourceLineNo">385</span><a name="line.385"></a>
-<span class="sourceLineNo">386</span>    @Override<a name="line.386"></a>
-<span class="sourceLineNo">387</span>    public void preGetRSGroupInfo(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.387"></a>
-<span class="sourceLineNo">388</span>        final String groupName) throws IOException {<a name="line.388"></a>
-<span class="sourceLineNo">389</span>      preGetRSGroupInfoCalled = true;<a name="line.389"></a>
-<span class="sourceLineNo">390</span>    }<a name="line.390"></a>
-<span class="sourceLineNo">391</span><a name="line.391"></a>
-<span class="sourceLineNo">392</span>    @Override<a name="line.392"></a>
-<span class="sourceLineNo">393</span>    public void postGetRSGroupInfo(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.393"></a>
-<span class="sourceLineNo">394</span>        final String groupName) throws IOException {<a name="line.394"></a>
-<span class="sourceLineNo">395</span>      postGetRSGroupInfoCalled = true;<a name="line.395"></a>
-<span class="sourceLineNo">396</span>    }<a name="line.396"></a>
-<span class="sourceLineNo">397</span><a name="line.397"></a>
-<span class="sourceLineNo">398</span>    @Override<a name="line.398"></a>
-<span class="sourceLineNo">399</span>    public void preGetRSGroupInfoOfTable(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.399"></a>
-<span class="sourceLineNo">400</span>        final TableName tableName) throws IOException {<a name="line.400"></a>
-<span class="sourceLineNo">401</span>      preGetRSGroupInfoOfTableCalled = true;<a name="line.401"></a>
-<span class="sourceLineNo">402</span>    }<a name="line.402"></a>
-<span class="sourceLineNo">403</span><a name="line.403"></a>
-<span class="sourceLineNo">404</span>    @Override<a name="line.404"></a>
-<span class="sourceLineNo">405</span>    public void postGetRSGroupInfoOfTable(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.405"></a>
-<span class="sourceLineNo">406</span>        final TableName tableName) throws IOException {<a name="line.406"></a>
-<span class="sourceLineNo">407</span>      postGetRSGroupInfoOfTableCalled = true;<a name="line.407"></a>
-<span class="sourceLineNo">408</span>    }<a name="line.408"></a>
-<span class="sourceLineNo">409</span><a name="line.409"></a>
-<span class="sourceLineNo">410</span>    @Override<a name="line.410"></a>
-<span class="sourceLineNo">411</span>    public void preListRSGroups(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx)<a name="line.411"></a>
-<span class="sourceLineNo">412</span>        throws IOException {<a name="line.412"></a>
-<span class="sourceLineNo">413</span>      preListRSGroupsCalled = true;<a name="line.413"></a>
-<span class="sourceLineNo">414</span>    }<a name="line.414"></a>
-<span class="sourceLineNo">415</span><a name="line.415"></a>
-<span class="sourceLineNo">416</span>    @Override<a name="line.416"></a>
-<span class="sourceLineNo">417</span>    public void postListRSGroups(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx)<a name="line.417"></a>
-<span class="sourceLineNo">418</span>        throws IOException {<a name="line.418"></a>
-<span class="sourceLineNo">419</span>      postListRSGroupsCalled = true;<a name="line.419"></a>
-<span class="sourceLineNo">420</span>    }<a name="line.420"></a>
-<span class="sourceLineNo">421</span><a name="line.421"></a>
-<span class="sourceLineNo">422</span>    @Override<a name="line.422"></a>
-<span class="sourceLineNo">423</span>    public void preGetRSGroupInfoOfServer(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.423"></a>
-<span class="sourceLineNo">424</span>        final Address server) throws IOException {<a name="line.424"></a>
-<span class="sourceLineNo">425</span>      preGetRSGroupInfoOfServerCalled = true;<a name="line.425"></a>
-<span class="sourceLineNo">426</span>    }<a name="line.426"></a>
-<span class="sourceLineNo">427</span><a name="line.427"></a>
-<span class="sourceLineNo">428</span>    @Override<a name="line.428"></a>
-<span class="sourceLineNo">429</span>    public void postGetRSGroupInfoOfServer(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.429"></a>
-<span class="sourceLineNo">430</span>        final Address server) throws IOException {<a name="line.430"></a>
-<span class="sourceLineNo">431</span>      postGetRSGroupInfoOfServerCalled = true;<a name="line.431"></a>
-<span class="sourceLineNo">432</span>    }<a name="line.432"></a>
-<span class="sourceLineNo">433</span>  }<a name="line.433"></a>
+<span class="sourceLineNo">369</span>    @Override<a name="line.369"></a>
+<span class="sourceLineNo">370</span>    public void preAddRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.370"></a>
+<span class="sourceLineNo">371</span>        String name) throws IOException {<a name="line.371"></a>
+<span class="sourceLineNo">372</span>      preAddRSGroupCalled = true;<a name="line.372"></a>
+<span class="sourceLineNo">373</span>    }<a name="line.373"></a>
+<span class="sourceLineNo">374</span>    @Override<a name="line.374"></a>
+<span class="sourceLineNo">375</span>    public void postAddRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.375"></a>
+<span class="sourceLineNo">376</span>        String name) throws IOException {<a name="line.376"></a>
+<span class="sourceLineNo">377</span>      postAddRSGroupCalled = true;<a name="line.377"></a>
+<span class="sourceLineNo">378</span>    }<a name="line.378"></a>
+<span class="sourceLineNo">379</span>    @Override<a name="line.379"></a>
+<span class="sourceLineNo">380</span>    public void preMoveTables(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.380"></a>
+<span class="sourceLineNo">381</span>        Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.381"></a>
+<span class="sourceLineNo">382</span>      preMoveTablesCalled = true;<a name="line.382"></a>
+<span class="sourceLineNo">383</span>    }<a name="line.383"></a>
+<span class="sourceLineNo">384</span>    @Override<a name="line.384"></a>
+<span class="sourceLineNo">385</span>    public void postMoveTables(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.385"></a>
+<span class="sourceLineNo">386</span>        Set&lt;TableName&gt; tables, String targetGroup) throws IOException {<a name="line.386"></a>
+<span class="sourceLineNo">387</span>      postMoveTablesCalled = true;<a name="line.387"></a>
+<span class="sourceLineNo">388</span>    }<a name="line.388"></a>
+<span class="sourceLineNo">389</span>    @Override<a name="line.389"></a>
+<span class="sourceLineNo">390</span>    public void preMoveServers(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.390"></a>
+<span class="sourceLineNo">391</span>        Set&lt;Address&gt; servers, String targetGroup) throws IOException {<a name="line.391"></a>
+<span class="sourceLineNo">392</span>      preMoveServersCalled = true;<a name="line.392"></a>
+<span class="sourceLineNo">393</span>    }<a name="line.393"></a>
+<span class="sourceLineNo">394</span><a name="line.394"></a>
+<span class="sourceLineNo">395</span>    @Override<a name="line.395"></a>
+<span class="sourceLineNo">396</span>    public void postMoveServers(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.396"></a>
+<span class="sourceLineNo">397</span>        Set&lt;Address&gt; servers, String targetGroup) throws IOException {<a name="line.397"></a>
+<span class="sourceLineNo">398</span>      postMoveServersCalled = true;<a name="line.398"></a>
+<span class="sourceLineNo">399</span>    }<a name="line.399"></a>
+<span class="sourceLineNo">400</span>    @Override<a name="line.400"></a>
+<span class="sourceLineNo">401</span>    public void preBalanceRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.401"></a>
+<span class="sourceLineNo">402</span>        String groupName) throws IOException {<a name="line.402"></a>
+<span class="sourceLineNo">403</span>      preBalanceRSGroupCalled = true;<a name="line.403"></a>
+<span class="sourceLineNo">404</span>    }<a name="line.404"></a>
+<span class="sourceLineNo">405</span>    @Override<a name="line.405"></a>
+<span class="sourceLineNo">406</span>    public void postBalanceRSGroup(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.406"></a>
+<span class="sourceLineNo">407</span>        String groupName, boolean balancerRan) throws IOException {<a name="line.407"></a>
+<span class="sourceLineNo">408</span>      postBalanceRSGroupCalled = true;<a name="line.408"></a>
+<span class="sourceLineNo">409</span>    }<a name="line.409"></a>
+<span class="sourceLineNo">410</span><a name="line.410"></a>
+<span class="sourceLineNo">411</span>    @Override<a name="line.411"></a>
+<span class="sourceLineNo">412</span>    public void preGetRSGroupInfo(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.412"></a>
+<span class="sourceLineNo">413</span>        final String groupName) throws IOException {<a name="line.413"></a>
+<span class="sourceLineNo">414</span>      preGetRSGroupInfoCalled = true;<a name="line.414"></a>
+<span class="sourceLineNo">415</span>    }<a name="line.415"></a>
+<span class="sourceLineNo">416</span><a name="line.416"></a>
+<span class="sourceLineNo">417</span>    @Override<a name="line.417"></a>
+<span class="sourceLineNo">418</span>    public void postGetRSGroupInfo(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.418"></a>
+<span class="sourceLineNo">419</span>        final String groupName) throws IOException {<a name="line.419"></a>
+<span class="sourceLineNo">420</span>      postGetRSGroupInfoCalled = true;<a name="line.420"></a>
+<span class="sourceLineNo">421</span>    }<a name="line.421"></a>
+<span class="sourceLineNo">422</span><a name="line.422"></a>
+<span class="sourceLineNo">423</span>    @Override<a name="line.423"></a>
+<span class="sourceLineNo">424</span>    public void preGetRSGroupInfoOfTable(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.424"></a>
+<span class="sourceLineNo">425</span>        final TableName tableName) throws IOException {<a name="line.425"></a>
+<span class="sourceLineNo">426</span>      preGetRSGroupInfoOfTableCalled = true;<a name="line.426"></a>
+<span class="sourceLineNo">427</span>    }<a name="line.427"></a>
+<span class="sourceLineNo">428</span><a name="line.428"></a>
+<span class="sourceLineNo">429</span>    @Override<a name="line.429"></a>
+<span class="sourceLineNo">430</span>    public void postGetRSGroupInfoOfTable(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.430"></a>
+<span class="sourceLineNo">431</span>        final TableName tableName) throws IOException {<a name="line.431"></a>
+<span class="sourceLineNo">432</span>      postGetRSGroupInfoOfTableCalled = true;<a name="line.432"></a>
+<span class="sourceLineNo">433</span>    }<a name="line.433"></a>
 <span class="sourceLineNo">434</span><a name="line.434"></a>
-<span class="sourceLineNo">435</span>  @Test<a name="line.435"></a>
-<span class="sourceLineNo">436</span>  public void testGetRSGroupInfoCPHookCalled() throws Exception {<a name="line.436"></a>
-<span class="sourceLineNo">437</span>    rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP);<a name="line.437"></a>
-<span class="sourceLineNo">438</span>    assertTrue(observer.preGetRSGroupInfoCalled);<a name="line.438"></a>
-<span class="sourceLineNo">439</span>    assertTrue(observer.postGetRSGroupInfoCalled);<a name="line.439"></a>
-<span class="sourceLineNo">440</span>  }<a name="line.440"></a>
-<span class="sourceLineNo">441</span><a name="line.441"></a>
-<span class="sourceLineNo">442</span>  @Test<a name="line.442"></a>
-<span class="sourceLineNo">443</span>  public void testGetRSGroupInfoOfTableCPHookCalled() throws Exception {<a name="line.443"></a>
-<span class="sourceLineNo">444</span>    rsGroupAdmin.getRSGroupInfoOfTable(TableName.META_TABLE_NAME);<a name="line.444"></a>
-<span class="sourceLineNo">445</span>    assertTrue(observer.preGetRSGroupInfoOfTableCalled);<a name="line.445"></a>
-<span class="sourceLineNo">446</span>    assertTrue(observer.postGetRSGroupInfoOfTableCalled);<a name="line.446"></a>
-<span class="sourceLineNo">447</span>  }<a name="line.447"></a>
-<span class="sourceLineNo">448</span><a name="line.448"></a>
-<span class="sourceLineNo">449</span>  @Test<a name="line.449"></a>
-<span class="sourceLineNo">450</span>  public void testListRSGroupsCPHookCalled() throws Exception {<a name="line.450"></a>
-<span class="sourceLineNo">451</span>    rsGroupAdmin.listRSGroups();<a name="line.451"></a>
-<span class="sourceLineNo">452</span>    assertTrue(observer.preListRSGroupsCalled);<a name="line.452"></a>
-<span class="sourceLineNo">453</span>    assertTrue(observer.postListRSGroupsCalled);<a name="line.453"></a>
-<span class="sourceLineNo">454</span>  }<a name="line.454"></a>
-<span class="sourceLineNo">455</span><a name="line.455"></a>
-<span class="sourceLineNo">456</span>  @Test<a name="line.456"></a>
-<span class="sourceLineNo">457</span>  public void testGetRSGroupInfoOfServerCPHookCalled() throws Exception {<a name="line.457"></a>
-<span class="sourceLineNo">458</span>    ServerName masterServerName = ((MiniHBaseCluster) cluster).getMaster().getServerName();<a name="line.458"></a>
-<span class="sourceLineNo">459</span>    rsGroupAdmin.getRSGroupOfServer(masterServerName.getAddress());<a name="line.459"></a>
-<span class="sourceLineNo">460</span>    assertTrue(observer.preGetRSGroupInfoOfServerCalled);<a name="line.460"></a>
-<span class="sourceLineNo">461</span>    assertTrue(observer.postGetRSGroupInfoOfServerCalled);<a name="line.461"></a>
-<span class="sourceLineNo">462</span>  }<a name="line.462"></a>
-<span class="sourceLineNo">463</span><a name="line.463"></a>
-<span class="sourceLineNo">464</span>  @Test<a name="line.464"></a>
-<span class="sourceLineNo">465</span>  public void testMoveServersAndTables() throws Exception {<a name="line.465"></a>
-<span class="sourceLineNo">466</span>    super.testMoveServersAndTables();<a name="line.466"></a>
-<span class="sourceLineNo">467</span>    assertTrue(observer.preMoveServersAndTables);<a name="line.467"></a>
-<span class="sourceLineNo">468</span>    assertTrue(observer.postMoveServersAndTables);<a name="line.468"></a>
-<span class="sourceLineNo">469</span>  }<a name="line.469"></a>
-<span class="sourceLineNo">470</span>  @Test<a name="line.470"></a>
-<span class="sourceLineNo">471</span>  public void testTableMoveTruncateAndDrop() throws Exception {<a name="line.471"></a>
-<span class="sourceLineNo">472</span>    super.testTableMoveTruncateAndDrop();<a name="line.472"></a>
-<span class="sourceLineNo">473</span>    assertTrue(observer.preMoveTablesCalled);<a name="line.473"></a>
-<span class="sourceLineNo">474</span>    assertTrue(observer.postMoveTablesCalled);<a name="line.474"></a>
-<span class="sourceLineNo">475</span>  }<a name="line.475"></a>
-<span class="sourceLineNo">476</span><a name="line.476"></a>
-<span class="sourceLineNo">477</span>  @Test<a name="line.477"></a>
-<span class="sourceLineNo">478</span>  public void testRemoveServers() throws Exception {<a name="line.478"></a>
-<span class="sourceLineNo">479</span>    super.testRemoveServers();<a name="line.479"></a>
-<span class="sourceLineNo">480</span>    assertTrue(observer.preRemoveServersCalled);<a name="line.480"></a>
-<span class="sourceLineNo">481</span>    assertTrue(observer.postRemoveServersCalled);<a name="line.481"></a>
-<span class="sourceLineNo">482</span>  }<a name="line.482"></a>
-<span class="sourceLineNo">483</span><a name="line.483"></a>
-<span class="sourceLineNo">484</span>  @Test<a name="line.484"></a>
-<span class="sourceLineNo">485</span>  public void testMisplacedRegions() throws Exception {<a name="line.485"></a>
-<span class="sourceLineNo">486</span>    final TableName tableName = TableName.valueOf(tablePrefix+"_testMisplacedRegions");<a name="line.486"></a>
-<span class="sourceLineNo">487</span>    LOG.info("testMisplacedRegions");<a name="line.487"></a>
+<span class="sourceLineNo">435</span>    @Override<a name="line.435"></a>
+<span class="sourceLineNo">436</span>    public void preListRSGroups(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx)<a name="line.436"></a>
+<span class="sourceLineNo">437</span>        throws IOException {<a name="line.437"></a>
+<span class="sourceLineNo">438</span>      preListRSGroupsCalled = true;<a name="line.438"></a>
+<span class="sourceLineNo">439</span>    }<a name="line.439"></a>
+<span class="sourceLineNo">440</span><a name="line.440"></a>
+<span class="sourceLineNo">441</span>    @Override<a name="line.441"></a>
+<span class="sourceLineNo">442</span>    public void postListRSGroups(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx)<a name="line.442"></a>
+<span class="sourceLineNo">443</span>        throws IOException {<a name="line.443"></a>
+<span class="sourceLineNo">444</span>      postListRSGroupsCalled = true;<a name="line.444"></a>
+<span class="sourceLineNo">445</span>    }<a name="line.445"></a>
+<span class="sourceLineNo">446</span><a name="line.446"></a>
+<span class="sourceLineNo">447</span>    @Override<a name="line.447"></a>
+<span class="sourceLineNo">448</span>    public void preGetRSGroupInfoOfServer(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.448"></a>
+<span class="sourceLineNo">449</span>        final Address server) throws IOException {<a name="line.449"></a>
+<span class="sourceLineNo">450</span>      preGetRSGroupInfoOfServerCalled = true;<a name="line.450"></a>
+<span class="sourceLineNo">451</span>    }<a name="line.451"></a>
+<span class="sourceLineNo">452</span><a name="line.452"></a>
+<span class="sourceLineNo">453</span>    @Override<a name="line.453"></a>
+<span class="sourceLineNo">454</span>    public void postGetRSGroupInfoOfServer(final ObserverContext&lt;MasterCoprocessorEnvironment&gt; ctx,<a name="line.454"></a>
+<span class="sourceLineNo">455</span>        final Address server) throws IOException {<a name="line.455"></a>
+<span class="sourceLineNo">456</span>      postGetRSGroupInfoOfServerCalled = true;<a name="line.456"></a>
+<span class="sourceLineNo">457</span>    }<a name="line.457"></a>
+<span class="sourceLineNo">458</span>  }<a name="line.458"></a>
+<span class="sourceLineNo">459</span><a name="line.459"></a>
+<span class="sourceLineNo">460</span>  @Test<a name="line.460"></a>
+<span class="sourceLineNo">461</span>  public void testGetRSGroupInfoCPHookCalled() throws Exception {<a name="line.461"></a>
+<span class="sourceLineNo">462</span>    rsGroupAdmin.getRSGroupInfo(RSGroupInfo.DEFAULT_GROUP);<a name="line.462"></a>
+<span class="sourceLineNo">463</span>    assertTrue(observer.preGetRSGroupInfoCalled);<a name="line.463"></a>
+<span class="sourceLineNo">464</span>    assertTrue(observer.postGetRSGroupInfoCalled);<a name="line.464"></a>
+<span class="sourceLineNo">465</span>  }<a name="line.465"></a>
+<span class="sourceLineNo">466</span><a name="line.466"></a>
+<span class="sourceLineNo">467</span>  @Test<a name="line.467"></a>
+<span class="sourceLineNo">468</span>  public void testGetRSGroupInfoOfTableCPHookCalled() throws Exception {<a name="line.468"></a>
+<span class="sourceLineNo">469</span>    rsGroupAdmin.getRSGroupInfoOfTable(TableName.META_TABLE_NAME);<a name="line.469"></a>
+<span class="sourceLineNo">470</span>    assertTrue(observer.preGetRSGroupInfoOfTableCalled);<a name="line.470"></a>
+<span class="sourceLineNo">471</span>    assertTrue(observer.postGetRSGroupInfoOfTableCalled);<a name="line.471"></a>
+<span class="sourceLineNo">472</span>  }<a name="line.472"></a>
+<span class="sourceLineNo">473</span><a name="line.473"></a>
+<span class="sourceLineNo">474</span>  @Test<a name="line.474"></a>
+<span class="sourceLineNo">475</span>  public void testListRSGroupsCPHookCalled() throws Exception {<a name="line.475"></a>
+<span class="sourceLineNo">476</span>    rsGroupAdmin.listRSGroups();<a name="line.476"></a>
+<span class="sourceLineNo">477</span>    assertTrue(observer.preListRSGroupsCalled);<a name="line.477"></a>
+<span class="sourceLineNo">478</span>    assertTrue(observer.postListRSGroupsCalled);<a name="line.478"></a>
+<span class="sourceLineNo">479</span>  }<a name="line.479"></a>
+<span class="sourceLineNo">480</span><a name="line.480"></a>
+<span class="sourceLineNo">481</span>  @Test<a name="line.481"></a>
+<span class="sourceLineNo">482</span>  public void testGetRSGroupInfoOfServerCPHookCalled() throws Exception {<a name="line.482"></a>
+<span class="sourceLineNo">483</span>    ServerName masterServerName = ((MiniHBaseCluster) cluster).getMaster().getServerName();<a name="line.483"></a>
+<span class="sourceLineNo">484</span>    rsGroupAdmin.getRSGroupOfServer(masterServerName.getAddress());<a name="line.484"></a>
+<span class="sourceLineNo">485</span>    assertTrue(observer.preGetRSGroupInfoOfServerCalled);<a name="line.485"></a>
+<span class="sourceLineNo">486</span>    assertTrue(observer.postGetRSGroupInfoOfServerCalled);<a name="line.486"></a>
+<span class="sourceLineNo">487</span>  }<a name="line.487"></a>
 <span class="sourceLineNo">488</span><a name="line.488"></a>
-<span class="sourceLineNo">489</span>    final RSGroupInfo RSGroupInfo = addGroup("testMisplacedRegions", 1);<a name="line.489"></a>
-<span class="sourceLineNo">490</span><a name="line.490"></a>
-<span class="sourceLineNo">491</span>    TEST_UTIL.createMultiRegionTable(tableName, new byte[]{'f'}, 15);<a name="line.491"></a>
-<span class="sourceLineNo">492</span>    TEST_UTIL.waitUntilAllRegionsAssigned(tableName);<a name="line.492"></a>
-<span class="sourceLineNo">493</span><a name="line.493"></a>
-<span class="sourceLineNo">494</span>    rsGroupAdminEndpoint.getGroupInfoManager()<a name="line.494"></a>
-<span class="sourceLineNo">495</span>        .moveTables(Sets.newHashSet(tableName), RSGroupInfo.getName());<a name="line.495"></a>
-<span class="sourceLineNo">496</span><a name="line.496"></a>
-<span class="sourceLineNo">497</span>    admin.setBalancerRunning(true,true);<a name="line.497"></a>
-<span class="sourceLineNo">498</span>    assertTrue(rsGroupAdmin.balanceRSGroup(RSGroupInfo.getName()));<a name="line.498"></a>
-<span class="sourceLineNo">499</span>    admin.setBalancerRunning(false,true);<a name="line.499"></a>
-<span class="sourceLineNo">500</span>    assertTrue(observer.preBalanceRSGroupCalled);<a name="line.500"></a>
-<span class="sourceLineNo">501</span>    assertTrue(observer.postBalanceRSGroupCalled);<a name="line.501"></a>
-<span class="sourceLineNo">502</span><a name="line.502"></a>
-<span class="sourceLineNo">503</span>    TEST_UTIL.waitFor(60000, new Predicate&lt;Exception&gt;() {<a name="line.503"></a>
-<span class="sourceLineNo">504</span>      @Override<a name="line.504"></a>
-<span class="sourceLineNo">505</span>      public boolean evaluate() throws Exception {<a name="line.505"></a>
-<span class="sourceLineNo">506</span>        ServerName serverName =<a name="line.506"></a>
-<span class="sourceLineNo">507</span>            ServerName.valueOf(RSGroupInfo.getServers().iterator().next().toString(), 1);<a name="line.507"></a>
-<span class="sourceLineNo">508</span>        return admin.getConnection().getAdmin()<a name="line.508"></a>
-<span class="sourceLineNo">509</span>            .getOnlineRegions(serverName).size() == 15;<a name="line.509"></a>
-<span class="sourceLineNo">510</span>      }<a name="line.510"></a>
-<span class="sourceLineNo">511</span>    });<a name="line.511"></a>
-<span class="sourceLineNo">512</span>  }<a name="line.512"></a>
+<span class="sourceLineNo">489</span>  @Test<a name="line.489"></a>
+<span class="sourceLineNo">490</span>  public void testMoveServersAndTables() throws Exception {<a name="line.490"></a>
+<span class="sourceLineNo">491</span>    super.testMoveServersAndTables();<a name="line.491"></a>
+<span class="sourceLineNo">492</span>    assertTrue(observer.preMoveServersAndTables);<a name="line.492"></a>
+<span class="sourceLineNo">493</span>    assertTrue(observer.postMoveServersAndTables);<a name="line.493"></a>
+<span class="sourceLineNo">494</span>  }<a name="line.494"></a>
+<span class="sourceLineNo">495</span>  @Test<a name="line.495"></a>
+<span class="sourceLineNo">496</span>  public void testTableMoveTruncateAndDrop() throws Exception {<a name="line.496"></a>
+<span class="sourceLineNo">497</span>    super.testTableMoveTruncateAndDrop();<a name="line.497"></a>
+<span class="sourceLineNo">498</span>    assertTrue(observer.preMoveTablesCalled);<a name="line.498"></a>
+<span class="sourceLineNo">499</span>    assertTrue(observer.postMoveTablesCalled);<a name="line.499"></a>
+<span class="sourceLineNo">500</span>  }<a name="line.500"></a>
+<span class="sourceLineNo">501</span><a name="line.501"></a>
+<span class="sourceLineNo">502</span>  @Test<a name="line.502"></a>
+<span class="sourceLineNo">503</span>  public void testRemoveServers() throws Exception {<a name="line.503"></a>
+<span class="sourceLineNo">504</span>    super.testRemoveServers();<a name="line.504"></a>
+<span class="sourceLineNo">505</span>    assertTrue(observer.preRemoveServersCalled);<a name="line.505"></a>
+<span class="sourceLineNo">506</span>    assertTrue(observer.postRemoveServersCalled);<a name="line.506"></a>
+<span class="sourceLineNo">507</span>  }<a name="line.507"></a>
+<span class="sourceLineNo">508</span><a name="line.508"></a>
+<span class="sourceLineNo">509</span>  @Test<a name="line.509"></a>
+<span class="sourceLineNo">510</span>  public void testMisplacedRegions() throws Exception {<a name="line.510"></a>
+<span class="sourceLineNo">511</span>    final TableName tableName = TableName.valueOf(tablePrefix+"_testMisplacedRegions");<a name="line.511"></a>
+<span class="sourceLineNo">512</span>    LOG.info("testMisplacedRegions");<a name="line.512"></a>
 <span class="sourceLineNo">513</span><a name="line.513"></a>
-<span class="sourceLineNo">514</span>  @Test<a name="line.514"></a>
-<span class="sourceLineNo">515</span>  public void testCloneSnapshot() throws Exception {<a name="line.515"></a>
-<span class="sourceLineNo">516</span>    byte[] FAMILY = Bytes.toBytes("test");<a name="line.516"></a>
-<span class="sourceLineNo">517</span>    String snapshotName = tableName.getNameAsString() + "_snap";<a name="line.517"></a>
-<span class="sourceLineNo">518</span>    TableName clonedTableName = TableName.valueOf(tableName.getNameAsString() + "_clone");<a name="line.518"></a>
-<span class="sourceLineNo">519</span><a name="line.519"></a>
-<span class="sourceLineNo">520</span>    // create base table<a name="line.520"></a>
-<span class="sourceLineNo">521</span>    TEST_UTIL.createTable(tableName, FAMILY);<a name="line.521"></a>
-<span class="sourceLineNo">522</span><a name="line.522"></a>
-<span class="sourceLineNo">523</span>    // create snapshot<a name="line.523"></a>
-<span class="sourceLineNo">524</span>    admin.snapshot(snapshotName, tableName);<a name="line.524"></a>
-<span class="sourceLineNo">525</span><a name="line.525"></a>
-<span class="sourceLineNo">526</span>    // clone<a name="line.526"></a>
-<span class="sourceLineNo">527</span>    admin.cloneSnapshot(snapshotName, clonedTableName);<a name="line.527"></a>
-<span class="sourceLineNo">528</span>  }<a name="line.528"></a>
-<span class="sourceLineNo">529</span><a name="line.529"></a>
-<span class="sourceLineNo">530</span>  @Test<a name="line.530"></a>
-<span class="sourceLineNo">531</span>  public void testRSGroupsWithHBaseQuota() throws Exception {<a name="line.531"></a>
-<span class="sourceLineNo">532</span>    TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, true);<a name="line.532"></a>
-<span class="sourceLineNo">533</span>    restartHBaseCluster();<a name="line.533"></a>
-<span class="sourceLineNo">534</span>    try {<a name="line.534"></a>
-<span class="sourceLineNo">535</span>      TEST_UTIL.waitFor(90000, new Waiter.Predicate&lt;Exception&gt;() {<a name="line.535"></a>
-<span class="sourceLineNo">536</span>        @Override<a name="line.536"></a>
-<span class="sourceLineNo">537</span>        public boolean evaluate() throws Exception {<a name="line.537"></a>
-<span class="sourceLineNo">538</span>          return admin.isTableAvailable(QuotaTableUtil.QUOTA_TABLE_NAME);<a name="line.538"></a>
-<span class="sourceLineNo">539</span>        }<a name="line.539"></a>
-<span class="sourceLineNo">540</span>      });<a name="line.540"></a>
-<span class="sourceLineNo">541</span>    } finally {<a name="line.541"></a>
-<span class="sourceLineNo">542</span>      TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, false);<a name="line.542"></a>
-<span class="sourceLineNo">543</span>      restartHBaseCluster();<a name="line.543"></a>
-<span class="sourceLineNo">544</span>    }<a name="line.544"></a>
-<span class="sourceLineNo">545</span>  }<a name="line.545"></a>
-<span class="sourceLineNo">546</span><a name="line.546"></a>
-<span class="sourceLineNo">547</span>  @Test<a name="line.547"></a>
-<span class="sourceLineNo">548</span>  public void testRSGroupListDoesNotContainFailedTableCreation() throws Exception {<a name="line.548"></a>
-<span class="sourceLineNo">549</span>    toggleQuotaCheckAndRestartMiniCluster(true);<a name="line.549"></a>
-<span class="sourceLineNo">550</span>    String nsp = "np1";<a name="line.550"></a>
-<span class="sourceLineNo">551</span>    NamespaceDescriptor nspDesc =<a name="line.551"></a>
-<span class="sourceLineNo">552</span>        NamespaceDescriptor.create(nsp).addConfiguration(TableNamespaceManager.KEY_MAX_REGIONS, "5")<a name="line.552"></a>
-<span class="sourceLineNo">553</span>            .addConfiguration(TableNamespaceManager.KEY_MAX_TABLES, "2").build();<a name="line.553"></a>
-<span class="sourceLineNo">554</span>    admin.createNamespace(nspDesc);<a name="line.554"></a>
-<span class="sourceLineNo">555</span>    assertEquals(3, admin.listNamespaceDescriptors().length);<a name="line.555"></a>
-<span class="sourceLineNo">556</span>    HColumnDescriptor fam1 = new HColumnDescriptor("fam1");<a name="line.556"></a>
-<span class="sourceLineNo">557</span>    HTableDescriptor tableDescOne =<a name="line.557"></a>
-<span class="sourceLineNo">558</span>        new HTableDescriptor(TableName.valueOf(nsp + TableName.NAMESPACE_DELIM + "table1"));<a name="line.558"></a>
-<span class="sourceLineNo">559</span>    tableDescOne.addFamily(fam1);<a name="line.559"></a>
-<span class="sourceLineNo">560</span>    admin.createTable(tableDescOne);<a name="line.560"></a>
-<span class="sourceLineNo">561</span><a name="line.561"></a>
-<span class="sourceLineNo">562</span>    HTableDescriptor tableDescTwo =<a name="line.562"></a>
-<span class="sourceLineNo">563</span>        new HTableDescriptor(TableName.valueOf(nsp + TableName.NAMESPACE_DELIM + "table2"));<a name="line.563"></a>
-<span class="sourceLineNo">564</span>    tableDescTwo.addFamily(fam1);<a name="line.564"></a>
-<span class="sourceLineNo">565</span>    boolean constraintViolated = false;<a name="line.565"></a>
-<span class="sourceLineNo">566</span><a name="line.566"></a>
-<span class="sourceLineNo">567</span>    try {<a name="line.567"></a>
-<span class="sourceLineNo">568</span>      admin.createTable(tableDescTwo, Bytes.toBytes("AAA"), Bytes.toBytes("ZZZ"),<a name="line.568"></a>
-<span class="sourceLineNo">569</span>          6);<a name="line.569"></a>
-<span class="sourceLineNo">570</span>      Assert.fail("Creation table should fail because of quota violation.");<a name="line.570"></a>
-<span class="sourceLineNo">571</span>    } catch (Exception exp) {<a name="line.571"></a>
-<span class="sourceLineNo">572</span>      assertTrue(exp instanceof IOException);<a name="line.572"></a>
-<span class="sourceLineNo">573</span>      constraintViolated = true;<a name="line.573"></a>
-<span class="sourceLineNo">574</span>    } finally {<a name="line.574"></a>
-<span class="sourceLineNo">575</span>      assertTrue("Constraint not violated for table " + tableDescTwo.getTableName(),<a name="line.575"></a>
-<span class="sourceLineNo">576</span>          constraintViolated);<a name="line.576"></a>
-<span class="sourceLineNo">577</span>    }<a name="line.577"></a>
-<span class="sourceLineNo">578</span>    List&lt;RSGroupInfo&gt; rsGroupInfoList = rsGroupAdmin.listRSGroups();<a name="line.578"></a>
-<span class="sourceLineNo">579</span>    boolean foundTable2 = false;<a name="line.579"></a>
-<span class="sourceLineNo">580</span>    boolean foundTable1 = false;<a name="line.580"></a>
-<span class="sourceLineNo">581</span>    for(int i = 0; i &lt; rsGroupInfoList.size(); i++){<a name="line.581"></a>
-<span class="sourceLineNo">582</span>      if(rsGroupInfoList.get(i).getTables().contains(tableDescTwo.getTableName())){<a name="line.582"></a>
-<span class="sourceLineNo">583</span>        foundTable2 = true;<a name="line.583"></a>
-<span class="sourceLineNo">584</span>      }<a name="line.584"></a>
-<span class="sourceLineNo">585</span>      if(rsGroupInfoList.get(i).getTables().contains(tableDescOne.getTableName())){<a name="line.585"></a>
-<span class="sourceLineNo">586</span>        foundTable1 = true;<a name="line.586"></a>
-<span class="sourceLineNo">587</span>      }<a name="line.587"></a>
-<span class="sourceLineNo">588</span>    }<a name="line.588"></a>
-<span class="sourceLineNo">589</span>    assertFalse("Found table2 in rsgroup list.", foundTable2);<a name="line.589"></a>
-<span class="sourceLineNo">590</span>    assertTrue("Did not find table1 in rsgroup list", foundTable1);<a name="line.590"></a>
+<span class="sourceLineNo">514</span>    final RSGroupInfo RSGroupInfo = addGroup("testMisplacedRegions", 1);<a name="line.514"></a>
+<span class="sourceLineNo">515</span><a name="line.515"></a>
+<span class="sourceLineNo">516</span>    TEST_UTIL.createMultiRegionTable(tableName, new byte[]{'f'}, 15);<a name="line.516"></a>
+<span class="sourceLineNo">517</span>    TEST_UTIL.waitUntilAllRegionsAssigned(tableName);<a name="line.517"></a>
+<span class="sourceLineNo">518</span><a name="line.518"></a>
+<span class="sourceLineNo">519</span>    rsGroupAdminEndpoint.getGroupInfoManager()<a name="line.519"></a>
+<span class="sourceLineNo">520</span>        .moveTables(Sets.newHashSet(tableName), RSGroupInfo.getName());<a name="line.520"></a>
+<span class="sourceLineNo">521</span><a name="line.521"></a>
+<span class="sourceLineNo">522</span>    admin.setBalancerRunning(true,true);<a name="line.522"></a>
+<span class="sourceLineNo">523</span>    assertTrue(rsGroupAdmin.balanceRSGroup(RSGroupInfo.getName()));<a name="line.523"></a>
+<span class="sourceLineNo">524</span>    admin.setBalancerRunning(false,true);<a name="line.524"></a>
+<span class="sourceLineNo">525</span>    assertTrue(observer.preBalanceRSGroupCalled);<a name="line.525"></a>
+<span class="sourceLineNo">526</span>    assertTrue(observer.postBalanceRSGroupCalled);<a name="line.526"></a>
+<span class="sourceLineNo">527</span><a name="line.527"></a>
+<span class="sourceLineNo">528</span>    TEST_UTIL.waitFor(60000, new Predicate&lt;Exception&gt;() {<a name="line.528"></a>
+<span class="sourceLineNo">529</span>      @Override<a name="line.529"></a>
+<span class="sourceLineNo">530</span>      public boolean evaluate() throws Exception {<a name="line.530"></a>
+<span class="sourceLineNo">531</span>        ServerName serverName =<a name="line.531"></a>
+<span class="sourceLineNo">532</span>            ServerName.valueOf(RSGroupInfo.getServers().iterator().next().toString(), 1);<a name="line.532"></a>
+<span class="sourceLineNo">533</span>        return admin.getConnection().getAdmin()<a name="line.533"></a>
+<span class="sourceLineNo">534</span>            .getOnlineRegions(serverName).size() == 15;<a name="line.534"></a>
+<span class="sourceLineNo">535</span>      }<a name="line.535"></a>
+<span class="sourceLineNo">536</span>    });<a name="line.536"></a>
+<span class="sourceLineNo">537</span>  }<a name="line.537"></a>
+<span class="sourceLineNo">538</span><a name="line.538"></a>
+<span class="sourceLineNo">539</span>  @Test<a name="line.539"></a>
+<span class="sourceLineNo">540</span>  public void testCloneSnapshot() throws Exception {<a name="line.540"></a>
+<span class="sourceLineNo">541</span>    byte[] FAMILY = Bytes.toBytes("test");<a name="line.541"></a>
+<span class="sourceLineNo">542</span>    String snapshotName = tableName.getNameAsString() + "_snap";<a name="line.542"></a>
+<span class="sourceLineNo">543</span>    TableName clonedTableName = TableName.valueOf(tableName.getNameAsString() + "_clone");<a name="line.543"></a>
+<span class="sourceLineNo">544</span><a name="line.544"></a>
+<span class="sourceLineNo">545</span>    // create base table<a name="line.545"></a>
+<span class="sourceLineNo">546</span>    TEST_UTIL.createTable(tableName, FAMILY);<a name="line.546"></a>
+<span class="sourceLineNo">547</span><a name="line.547"></a>
+<span class="sourceLineNo">548</span>    // create snapshot<a name="line.548"></a>
+<span class="sourceLineNo">549</span>    admin.snapshot(snapshotName, tableName);<a name="line.549"></a>
+<span class="sourceLineNo">550</span><a name="line.550"></a>
+<span class="sourceLineNo">551</span>    // clone<a name="line.551"></a>
+<span class="sourceLineNo">552</span>    admin.cloneSnapshot(snapshotName, clonedTableName);<a name="line.552"></a>
+<span class="sourceLineNo">553</span>  }<a name="line.553"></a>
+<span class="sourceLineNo">554</span><a name="line.554"></a>
+<span class="sourceLineNo">555</span>  @Test<a name="line.555"></a>
+<span class="sourceLineNo">556</span>  public void testRSGroupsWithHBaseQuota() throws Exception {<a name="line.556"></a>
+<span class="sourceLineNo">557</span>    TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, true);<a name="line.557"></a>
+<span class="sourceLineNo">558</span>    restartHBaseCluster();<a name="line.558"></a>
+<span class="sourceLineNo">559</span>    try {<a name="line.559"></a>
+<span class="sourceLineNo">560</span>      TEST_UTIL.waitFor(90000, new Waiter.Predicate&lt;Exception&gt;() {<a name="line.560"></a>
+<span class="sourceLineNo">561</span>        @Override<a name="line.561"></a>
+<span class="sourceLineNo">562</span>        public boolean evaluate() throws Exception {<a name="line.562"></a>
+<span class="sourceLineNo">563</span>          return admin.isTableAvailable(QuotaTableUtil.QUOTA_TABLE_NAME);<a name="line.563"></a>
+<span class="sourceLineNo">564</span>        }<a name="line.564"></a>
+<span class="sourceLineNo">565</span>      });<a name="line.565"></a>
+<span class="sourceLineNo">566</span>    } finally {<a name="line.566"></a>
+<span class="sourceLineNo">567</span>      TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, false);<a name="line.567"></a>
+<span class="sourceLineNo">568</span>      restartHBaseCluster();<a name="line.568"></a>
+<span class="sourceLineNo">569</span>    }<a name="line.569"></a>
+<span class="sourceLineNo">570</span>  }<a name="line.570"></a>
+<span class="sourceLineNo">571</span><a name="line.571"></a>
+<span class="sourceLineNo">572</span>  @Test<a name="line.572"></a>
+<span class="sourceLineNo">573</span>  public void testRSGroupListDoesNotContainFailedTableCreation() throws Exception {<a name="line.573"></a>
+<span class="sourceLineNo">574</span>    toggleQuotaCheckAndRestartMiniCluster(true);<a name="line.574"></a>
+<span class="sourceLineNo">575</span>    String nsp = "np1";<a name="line.575"></a>
+<span class="sourceLineNo">576</span>    NamespaceDescriptor nspDesc =<a name="line.576"></a>
+<span class="sourceLineNo">577</span>        NamespaceDescriptor.create(nsp).addConfiguration(TableNamespaceManager.KEY_MAX_REGIONS, "5")<a name="line.577"></a>
+<span class="sourceLineNo">578</span>            .addConfiguration(TableNamespaceManager.KEY_MAX_TABLES, "2").build();<a name="line.578"></a>
+<span class="sourceLineNo">579</span>    admin.createNamespace(nspDesc);<a name="line.579"></a>
+<span class="sourceLineNo">580</span>    assertEquals(3, admin.listNamespaceDescriptors().length);<a name="line.580"></a>
+<span class="sourceLineNo">581</span>    HColumnDescriptor fam1 = new HColumnDescriptor("fam1");<a name="line.581"></a>
+<span class="sourceLineNo">582</span>    HTableDescriptor tableDescOne =<a name="line.582"></a>
+<span class="sourceLineNo">583</span>        new HTableDescriptor(TableName.valueOf(nsp + TableName.NAMESPACE_DELIM + "table1"));<a name="line.583"></a>
+<span class="sourceLineNo">584</span>    tableDescOne.addFamily(fam1);<a name="line.584"></a>
+<span class="sourceLineNo">585</span>    admin.createTable(tableDescOne);<a name="line.585"></a>
+<span class="sourceLineNo">586</span><a name="line.586"></a>
+<span class="sourceLineNo">587</span>    HTableDescriptor tableDescTwo =<a name="line.587"></a>
+<span class="sourceLineNo">588</span>        new HTableDescriptor(TableName.valueOf(nsp + TableName.NAMESPACE_DELIM + "table2"));<a name="line.588"></a>
+<span class="sourceLineNo">589</span>    tableDescTwo.addFamily(fam1);<a name="line.589"></a>
+<span class="sourceLineNo">590</span>    boolean constraintViolated = false;<a name="line.590"></a>
 <span class="sourceLineNo">591</span><a name="line.591"></a>
-<span class="sourceLineNo">592</span>    TEST_UTIL.deleteTable(tableDescOne.getTableName());<a name="line.592"></a>
-<span class="sourceLineNo">593</span>    admin.deleteNamespace(nspDesc.getName());<a name="line.593"></a>
-<span class="sourceLineNo">594</span>    toggleQuotaCheckAndRestartMiniCluster(false);<a name="line.594"></a>
-<span class="sourceLineNo">595</span><a name="line.595"></a>
-<span class="sourceLineNo">596</span>  }<a name="line.596"></a>
-<span class="sourceLineNo">597</span>  private void toggleQuotaCheckAndRestartMiniCluster(boolean enable) throws Exception{<a name="line.597"></a>
-<span class="sourceLineNo">598</span>    TEST_UTIL.shutdownMiniCluster();<a name="line.598"></a>
-<span class="sourceLineNo">599</span>    TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, enable);<a name="line.599"></a>
-<span class="sourceLineNo">600</span>    TEST_UTIL.startMiniCluster(NUM_SLAVES_BASE - 1);<a name="line.600"></a>
-<span class="sourceLineNo">601</span>    TEST_UTIL.getConfiguration().setInt(<a name="line.601"></a>
-<span class="sourceLineNo">602</span>        ServerManager.WAIT_ON_REGIONSERVERS_MINTOSTART,<a name="line.602"></a>
-<span class="sourceLineNo">603</span>        NUM_SLAVES_BASE - 1);<a name="line.603"></a>
-<span class="sourceLineNo">604</span>    TEST_UTIL.getConfiguration().setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);<a name="line.604"></a>
-<span class="sourceLineNo">605</span>    initialize();<a name="line.605"></a>
-<span class="sourceLineNo">606</span>  }<a name="line.606"></a>
-<span class="sourceLineNo">607</span><a name="line.607"></a>
-<span class="sourceLineNo">608</span>  private void restartHBaseCluster() throws Exception {<a name="line.608"></a>
-<span class="sourceLineNo">609</span>    LOG.info("\n\nShutting down cluster");<a name="line.609"></a>
-<span class="sourceLineNo">610</span>    TEST_UTIL.shutdownMiniHBaseCluster();<a name="line.610"></a>
-<span class="sourceLineNo">611</span>    LOG.info("\n\nSleeping a bit");<a name="line.611"></a>
-<span class="sourceLineNo">612</span>    Thread.sleep(2000);<a name="line.612"></a>
-<span class="sourceLineNo">613</span>    TEST_UTIL.restartHBaseCluster(NUM_SLAVES_BASE - 1);<a name="line.613"></a>
-<span class="sourceLineNo">614</span>    initialize();<a name="line.614"></a>
-<span class="sourceLineNo">615</span>  }<a name="line.615"></a>
-<span class="sourceLineNo">616</span>}<a name="line.616"></a>
+<span class="sourceLineNo">592</span>    try {<a name="line.592"></a>
+<span class="sourceLineNo">593</span>      admin.createTable(tableDescTwo, Bytes.toBytes("AAA"), Bytes.toBytes("ZZZ"),<a name="line.593"></a>
+<span class="sourceLineNo">594</span>          6);<a name="line.594"></a>
+<span class="sourceLineNo">595</span>      Assert.fail("Creation table should fail because of quota violation.");<a name="line.595"></a>
+<span class="sourceLineNo">596</span>    } catch (Exception exp) {<a name="line.596"></a>
+<span class="sourceLineNo">597</span>      assertTrue(exp instanceof IOException);<a name="line.597"></a>
+<span class="sourceLineNo">598</span>      constraintViolated = true;<a name="line.598"></a>
+<span class="sourceLineNo">599</span>    } finally {<a name="line.599"></a>
+<span class="sourceLineNo">600</span>      assertTrue("Constraint not violated for table " + tableDescTwo.getTableName(),<a name="line.600"></a>
+<span class="sourceLineNo">601</span>          constraintViolated);<a name="line.601"></a>
+<span class="sourceLineNo">602</span>    }<a name="line.602"></a>
+<span class="sourceLineNo">603</span>    List&lt;RSGroupInfo&gt; rsGroupInfoList = rsGroupAdmin.listRSGroups();<a name="line.603"></a>
+<span class="sourceLineNo">604</span>    boolean foundTable2 = false;<a name="line.604"></a>
+<span class="sourceLineNo">605</span>    boolean foundTable1 = false;<a name="line.605"></a>
+<span class="sourceLineNo">606</span>    for(int i = 0; i &lt; rsGroupInfoList.size(); i++){<a name="line.606"></a>
+<span class="sourceLineNo">607</span>      if(rsGroupInfoList.get(i).getTables().contains(tableDescTwo.getTableName())){<a name="line.607"></a>
+<span class="sourceLineNo">608</span>        foundTable2 = true;<a name="line.608"></a>
+<span class="sourceLineNo">609</span>      }<a name="line.609"></a>
+<span class="sourceLineNo">610</span>      if(rsGroupInfoList.get(i).getTables().contains(tableDescOne.getTableName())){<a name="line.610"></a>
+<span class="sourceLineNo">611</span>        foundTable1 = true;<a name="line.611"></a>
+<span class="sourceLineNo">612</span>      }<a name="line.612"></a>
+<span class="sourceLineNo">613</span>    }<a name="line.613"></a>
+<span class="sourceLineNo">614</span>    assertFalse("Found table2 in rsgroup list.", foundTable2);<a name="line.614"></a>
+<span class="sourceLineNo">615</span>    assertTrue("Did not find table1 in rsgroup list", foundTable1);<a name="line.615"></a>
+<span class="sourceLineNo">616</span><a name="line.616"></a>
+<span class="sourceLineNo">617</span>    TEST_UTIL.deleteTable(tableDescOne.getTableName());<a name="line.617"></a>
+<span class="sourceLineNo">618</span>    admin.deleteNamespace(nspDesc.getName());<a name="line.618"></a>
+<span class="sourceLineNo">619</span>    toggleQuotaCheckAndRestartMiniCluster(false);<a name="line.619"></a>
+<span class="sourceLineNo">620</span><a name="line.620"></a>
+<span class="sourceLineNo">621</span>  }<a name="line.621"></a>
+<span class="sourceLineNo">622</span>  private void toggleQuotaCheckAndRestartMiniCluster(boolean enable) throws Exception{<a name="line.622"></a>
+<span class="sourceLineNo">623</span>    TEST_UTIL.shutdownMiniCluster();<a name="line.623"></a>
+<span class="sourceLineNo">624</span>    TEST_UTIL.getConfiguration().setBoolean(QuotaUtil.QUOTA_CONF_KEY, enable);<a name="line.624"></a>
+<span class="sourceLineNo">625</span>    TEST_UTIL.startMiniCluster(NUM_SLAVES_BASE - 1);<a name="line.625"></a>
+<span class="sourceLineNo">626</span>    TEST_UTIL.getConfiguration().setInt(<a name="line.626"></a>
+<span class="sourceLineNo">627</span>        ServerManager.WAIT_ON_REGIONSERVERS_MINTOSTART,<a name="line.627"></a>
+<span class="sourceLineNo">628</span>        NUM_SLAVES_BASE - 1);<a name="line.628"></a>
+<span class="sourceLineNo">629</span>    TEST_UTIL.getConfiguration().setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);<a name="line.629"></a>
+<span class="sourceLineNo">630</span>    initialize();<a name="line.630"></a>
+<span class="sourceLineNo">631</span>  }<a name="line.631"></a>
+<span class="sourceLineNo">632</span><a name="line.632"></a>
+<span class="sourceLineNo">633</span>  private void restartHBaseCluster() throws Exception {<a name="line.633"></a>
+<span class="sourceLineNo">634</span>    LOG.info("\n\nShutting down cluster");<a name="line.634"></a>
+<span class="sourceLineNo">635</span>    TEST_UTIL.shutdownMiniHBaseCluster();<a name="line.635"></a>
+<span class="sourceLineNo">636</span>    LOG.info("\n\nSleeping a bit");<a name="line.636"></a>
+<span class="sourceLineNo">637</span>    Thread.sleep(2000);<a name="line.637"></a>
+<span class="sourceLineNo">638</span>    TEST_UTIL.restartHBaseCluster(NUM_SLAVES_BASE - 1);<a name="line.638"></a>
+<span class="sourceLineNo">639</span>    initialize();<a name="line.639"></a>
+<span class="sourceLineNo">640</span>  }<a name="line.640"></a>
+<span class="sourceLineNo">641</span>}<a name="line.641"></a>
 
 
 


Mime
View raw message