hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1465198 [8/41] - in /hbase/hbase.apache.org/trunk: ./ css/ hbase-assembly/ images/ xref-test/ xref-test/org/apache/hadoop/hbase/ xref-test/org/apache/hadoop/hbase/client/ xref-test/org/apache/hadoop/hbase/client/replication/ xref-test/org/...
Date Sat, 06 Apr 2013 06:06:09 GMT
Modified: hbase/hbase.apache.org/trunk/xref-test/org/apache/hadoop/hbase/HBaseTestingUtility.html
URL: http://svn.apache.org/viewvc/hbase/hbase.apache.org/trunk/xref-test/org/apache/hadoop/hbase/HBaseTestingUtility.html?rev=1465198&r1=1465197&r2=1465198&view=diff
==============================================================================
--- hbase/hbase.apache.org/trunk/xref-test/org/apache/hadoop/hbase/HBaseTestingUtility.html (original)
+++ hbase/hbase.apache.org/trunk/xref-test/org/apache/hadoop/hbase/HBaseTestingUtility.html Sat Apr  6 06:06:07 2013
@@ -2247,407 +2247,426 @@
 <a class="jxr_linenumber" name="2237" href="#2237">2237</a>     scanner.close();
 <a class="jxr_linenumber" name="2238" href="#2238">2238</a>     <strong class="jxr_keyword">return</strong> result;
 <a class="jxr_linenumber" name="2239" href="#2239">2239</a>   }
-<a class="jxr_linenumber" name="2240" href="#2240">2240</a> 
+<a class="jxr_linenumber" name="2240" href="#2240">2240</a>   
 <a class="jxr_linenumber" name="2241" href="#2241">2241</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2242" href="#2242">2242</a> <em class="jxr_javadoccomment">   * Do a small get/scan against one store. This is required because store</em>
-<a class="jxr_linenumber" name="2243" href="#2243">2243</a> <em class="jxr_javadoccomment">   * has no actual methods of querying itself, and relies on StoreScanner.</em>
-<a class="jxr_linenumber" name="2244" href="#2244">2244</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2245" href="#2245">2245</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> List&lt;KeyValue&gt; getFromStoreFile(HStore store,
-<a class="jxr_linenumber" name="2246" href="#2246">2246</a>                                                 byte [] row,
-<a class="jxr_linenumber" name="2247" href="#2247">2247</a>                                                 NavigableSet&lt;byte[]&gt; columns
-<a class="jxr_linenumber" name="2248" href="#2248">2248</a>                                                 ) <strong class="jxr_keyword">throws</strong> IOException {
-<a class="jxr_linenumber" name="2249" href="#2249">2249</a>     Get get = <strong class="jxr_keyword">new</strong> Get(row);
-<a class="jxr_linenumber" name="2250" href="#2250">2250</a>     Map&lt;byte[], NavigableSet&lt;byte[]&gt;&gt; s = get.getFamilyMap();
-<a class="jxr_linenumber" name="2251" href="#2251">2251</a>     s.put(store.getFamily().getName(), columns);
-<a class="jxr_linenumber" name="2252" href="#2252">2252</a> 
-<a class="jxr_linenumber" name="2253" href="#2253">2253</a>     <strong class="jxr_keyword">return</strong> getFromStoreFile(store,get);
-<a class="jxr_linenumber" name="2254" href="#2254">2254</a>   }
-<a class="jxr_linenumber" name="2255" href="#2255">2255</a> 
-<a class="jxr_linenumber" name="2256" href="#2256">2256</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2257" href="#2257">2257</a> <em class="jxr_javadoccomment">   * Gets a ZooKeeperWatcher.</em>
-<a class="jxr_linenumber" name="2258" href="#2258">2258</a> <em class="jxr_javadoccomment">   * @param TEST_UTIL</em>
-<a class="jxr_linenumber" name="2259" href="#2259">2259</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2260" href="#2260">2260</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> ZooKeeperWatcher getZooKeeperWatcher(
-<a class="jxr_linenumber" name="2261" href="#2261">2261</a>       <a href="../../../../org/apache/hadoop/hbase/HBaseTestingUtility.html">HBaseTestingUtility</a> TEST_UTIL) <strong class="jxr_keyword">throws</strong> ZooKeeperConnectionException,
-<a class="jxr_linenumber" name="2262" href="#2262">2262</a>       IOException {
-<a class="jxr_linenumber" name="2263" href="#2263">2263</a>     ZooKeeperWatcher zkw = <strong class="jxr_keyword">new</strong> ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
-<a class="jxr_linenumber" name="2264" href="#2264">2264</a>         <span class="jxr_string">"unittest"</span>, <strong class="jxr_keyword">new</strong> Abortable() {
-<a class="jxr_linenumber" name="2265" href="#2265">2265</a>           <strong class="jxr_keyword">boolean</strong> aborted = false;
-<a class="jxr_linenumber" name="2266" href="#2266">2266</a> 
-<a class="jxr_linenumber" name="2267" href="#2267">2267</a>           @Override
-<a class="jxr_linenumber" name="2268" href="#2268">2268</a>           <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> abort(String why, Throwable e) {
-<a class="jxr_linenumber" name="2269" href="#2269">2269</a>             aborted = <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="2270" href="#2270">2270</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> RuntimeException(<span class="jxr_string">"Fatal ZK error, why="</span> + why, e);
-<a class="jxr_linenumber" name="2271" href="#2271">2271</a>           }
-<a class="jxr_linenumber" name="2272" href="#2272">2272</a> 
-<a class="jxr_linenumber" name="2273" href="#2273">2273</a>           @Override
-<a class="jxr_linenumber" name="2274" href="#2274">2274</a>           <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isAborted() {
-<a class="jxr_linenumber" name="2275" href="#2275">2275</a>             <strong class="jxr_keyword">return</strong> aborted;
-<a class="jxr_linenumber" name="2276" href="#2276">2276</a>           }
-<a class="jxr_linenumber" name="2277" href="#2277">2277</a>         });
-<a class="jxr_linenumber" name="2278" href="#2278">2278</a>     <strong class="jxr_keyword">return</strong> zkw;
-<a class="jxr_linenumber" name="2279" href="#2279">2279</a>   }
-<a class="jxr_linenumber" name="2280" href="#2280">2280</a> 
-<a class="jxr_linenumber" name="2281" href="#2281">2281</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2282" href="#2282">2282</a> <em class="jxr_javadoccomment">   * Creates a znode with OPENED state.</em>
-<a class="jxr_linenumber" name="2283" href="#2283">2283</a> <em class="jxr_javadoccomment">   * @param TEST_UTIL</em>
-<a class="jxr_linenumber" name="2284" href="#2284">2284</a> <em class="jxr_javadoccomment">   * @param region</em>
-<a class="jxr_linenumber" name="2285" href="#2285">2285</a> <em class="jxr_javadoccomment">   * @param serverName</em>
-<a class="jxr_linenumber" name="2286" href="#2286">2286</a> <em class="jxr_javadoccomment">   * @return</em>
-<a class="jxr_linenumber" name="2287" href="#2287">2287</a> <em class="jxr_javadoccomment">   * @throws IOException</em>
-<a class="jxr_linenumber" name="2288" href="#2288">2288</a> <em class="jxr_javadoccomment">   * @throws org.apache.hadoop.hbase.exceptions.ZooKeeperConnectionException</em>
-<a class="jxr_linenumber" name="2289" href="#2289">2289</a> <em class="jxr_javadoccomment">   * @throws KeeperException</em>
-<a class="jxr_linenumber" name="2290" href="#2290">2290</a> <em class="jxr_javadoccomment">   * @throws NodeExistsException</em>
-<a class="jxr_linenumber" name="2291" href="#2291">2291</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2292" href="#2292">2292</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> ZooKeeperWatcher createAndForceNodeToOpenedState(
-<a class="jxr_linenumber" name="2293" href="#2293">2293</a>       <a href="../../../../org/apache/hadoop/hbase/HBaseTestingUtility.html">HBaseTestingUtility</a> TEST_UTIL, HRegion region,
-<a class="jxr_linenumber" name="2294" href="#2294">2294</a>       ServerName serverName) <strong class="jxr_keyword">throws</strong> ZooKeeperConnectionException,
-<a class="jxr_linenumber" name="2295" href="#2295">2295</a>       IOException, KeeperException, NodeExistsException {
-<a class="jxr_linenumber" name="2296" href="#2296">2296</a>     ZooKeeperWatcher zkw = getZooKeeperWatcher(TEST_UTIL);
-<a class="jxr_linenumber" name="2297" href="#2297">2297</a>     ZKAssign.createNodeOffline(zkw, region.getRegionInfo(), serverName);
-<a class="jxr_linenumber" name="2298" href="#2298">2298</a>     <strong class="jxr_keyword">int</strong> version = ZKAssign.transitionNodeOpening(zkw, region
-<a class="jxr_linenumber" name="2299" href="#2299">2299</a>         .getRegionInfo(), serverName);
-<a class="jxr_linenumber" name="2300" href="#2300">2300</a>     ZKAssign.transitionNodeOpened(zkw, region.getRegionInfo(), serverName,
-<a class="jxr_linenumber" name="2301" href="#2301">2301</a>         version);
-<a class="jxr_linenumber" name="2302" href="#2302">2302</a>     <strong class="jxr_keyword">return</strong> zkw;
-<a class="jxr_linenumber" name="2303" href="#2303">2303</a>   }
-<a class="jxr_linenumber" name="2304" href="#2304">2304</a> 
-<a class="jxr_linenumber" name="2305" href="#2305">2305</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> assertKVListsEqual(String additionalMsg,
-<a class="jxr_linenumber" name="2306" href="#2306">2306</a>       <strong class="jxr_keyword">final</strong> List&lt;KeyValue&gt; expected,
-<a class="jxr_linenumber" name="2307" href="#2307">2307</a>       <strong class="jxr_keyword">final</strong> List&lt;KeyValue&gt; actual) {
-<a class="jxr_linenumber" name="2308" href="#2308">2308</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> eLen = expected.size();
-<a class="jxr_linenumber" name="2309" href="#2309">2309</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> aLen = actual.size();
-<a class="jxr_linenumber" name="2310" href="#2310">2310</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> minLen = Math.min(eLen, aLen);
-<a class="jxr_linenumber" name="2311" href="#2311">2311</a> 
-<a class="jxr_linenumber" name="2312" href="#2312">2312</a>     <strong class="jxr_keyword">int</strong> i;
-<a class="jxr_linenumber" name="2313" href="#2313">2313</a>     <strong class="jxr_keyword">for</strong> (i = 0; i &lt; minLen
-<a class="jxr_linenumber" name="2314" href="#2314">2314</a>         &amp;&amp; KeyValue.COMPARATOR.compare(expected.get(i), actual.get(i)) == 0;
-<a class="jxr_linenumber" name="2315" href="#2315">2315</a>         ++i) {}
-<a class="jxr_linenumber" name="2316" href="#2316">2316</a> 
-<a class="jxr_linenumber" name="2317" href="#2317">2317</a>     <strong class="jxr_keyword">if</strong> (additionalMsg == <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="2318" href="#2318">2318</a>       additionalMsg = <span class="jxr_string">""</span>;
-<a class="jxr_linenumber" name="2319" href="#2319">2319</a>     }
-<a class="jxr_linenumber" name="2320" href="#2320">2320</a>     <strong class="jxr_keyword">if</strong> (!additionalMsg.isEmpty()) {
-<a class="jxr_linenumber" name="2321" href="#2321">2321</a>       additionalMsg = <span class="jxr_string">". "</span> + additionalMsg;
-<a class="jxr_linenumber" name="2322" href="#2322">2322</a>     }
+<a class="jxr_linenumber" name="2242" href="#2242">2242</a> <em class="jxr_javadoccomment">   * Create region split keys between startkey and endKey</em>
+<a class="jxr_linenumber" name="2243" href="#2243">2243</a> <em class="jxr_javadoccomment">   * </em>
+<a class="jxr_linenumber" name="2244" href="#2244">2244</a> <em class="jxr_javadoccomment">   * @param startKey</em>
+<a class="jxr_linenumber" name="2245" href="#2245">2245</a> <em class="jxr_javadoccomment">   * @param endKey</em>
+<a class="jxr_linenumber" name="2246" href="#2246">2246</a> <em class="jxr_javadoccomment">   * @param numRegions the number of regions to be created. it has to be greater than 3.</em>
+<a class="jxr_linenumber" name="2247" href="#2247">2247</a> <em class="jxr_javadoccomment">   * @return</em>
+<a class="jxr_linenumber" name="2248" href="#2248">2248</a> <em class="jxr_javadoccomment">   */</em>
+<a class="jxr_linenumber" name="2249" href="#2249">2249</a>   <strong class="jxr_keyword">public</strong> byte[][] getRegionSplitStartKeys(byte[] startKey, byte[] endKey, <strong class="jxr_keyword">int</strong> numRegions){
+<a class="jxr_linenumber" name="2250" href="#2250">2250</a>     assertTrue(numRegions&gt;3);
+<a class="jxr_linenumber" name="2251" href="#2251">2251</a>     byte [][] tmpSplitKeys = Bytes.split(startKey, endKey, numRegions - 3);
+<a class="jxr_linenumber" name="2252" href="#2252">2252</a>     byte [][] result = <strong class="jxr_keyword">new</strong> byte[tmpSplitKeys.length+1][];
+<a class="jxr_linenumber" name="2253" href="#2253">2253</a>     <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i=0;i&lt;tmpSplitKeys.length;i++) {
+<a class="jxr_linenumber" name="2254" href="#2254">2254</a>       result[i+1] = tmpSplitKeys[i];
+<a class="jxr_linenumber" name="2255" href="#2255">2255</a>     }
+<a class="jxr_linenumber" name="2256" href="#2256">2256</a>     result[0] = HConstants.EMPTY_BYTE_ARRAY;
+<a class="jxr_linenumber" name="2257" href="#2257">2257</a>     <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="2258" href="#2258">2258</a>   }
+<a class="jxr_linenumber" name="2259" href="#2259">2259</a> 
+<a class="jxr_linenumber" name="2260" href="#2260">2260</a>   <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="2261" href="#2261">2261</a> <em class="jxr_javadoccomment">   * Do a small get/scan against one store. This is required because store</em>
+<a class="jxr_linenumber" name="2262" href="#2262">2262</a> <em class="jxr_javadoccomment">   * has no actual methods of querying itself, and relies on StoreScanner.</em>
+<a class="jxr_linenumber" name="2263" href="#2263">2263</a> <em class="jxr_javadoccomment">   */</em>
+<a class="jxr_linenumber" name="2264" href="#2264">2264</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> List&lt;KeyValue&gt; getFromStoreFile(HStore store,
+<a class="jxr_linenumber" name="2265" href="#2265">2265</a>                                                 byte [] row,
+<a class="jxr_linenumber" name="2266" href="#2266">2266</a>                                                 NavigableSet&lt;byte[]&gt; columns
+<a class="jxr_linenumber" name="2267" href="#2267">2267</a>                                                 ) <strong class="jxr_keyword">throws</strong> IOException {
+<a class="jxr_linenumber" name="2268" href="#2268">2268</a>     Get get = <strong class="jxr_keyword">new</strong> Get(row);
+<a class="jxr_linenumber" name="2269" href="#2269">2269</a>     Map&lt;byte[], NavigableSet&lt;byte[]&gt;&gt; s = get.getFamilyMap();
+<a class="jxr_linenumber" name="2270" href="#2270">2270</a>     s.put(store.getFamily().getName(), columns);
+<a class="jxr_linenumber" name="2271" href="#2271">2271</a> 
+<a class="jxr_linenumber" name="2272" href="#2272">2272</a>     <strong class="jxr_keyword">return</strong> getFromStoreFile(store,get);
+<a class="jxr_linenumber" name="2273" href="#2273">2273</a>   }
+<a class="jxr_linenumber" name="2274" href="#2274">2274</a> 
+<a class="jxr_linenumber" name="2275" href="#2275">2275</a>   <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="2276" href="#2276">2276</a> <em class="jxr_javadoccomment">   * Gets a ZooKeeperWatcher.</em>
+<a class="jxr_linenumber" name="2277" href="#2277">2277</a> <em class="jxr_javadoccomment">   * @param TEST_UTIL</em>
+<a class="jxr_linenumber" name="2278" href="#2278">2278</a> <em class="jxr_javadoccomment">   */</em>
+<a class="jxr_linenumber" name="2279" href="#2279">2279</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> ZooKeeperWatcher getZooKeeperWatcher(
+<a class="jxr_linenumber" name="2280" href="#2280">2280</a>       <a href="../../../../org/apache/hadoop/hbase/HBaseTestingUtility.html">HBaseTestingUtility</a> TEST_UTIL) <strong class="jxr_keyword">throws</strong> ZooKeeperConnectionException,
+<a class="jxr_linenumber" name="2281" href="#2281">2281</a>       IOException {
+<a class="jxr_linenumber" name="2282" href="#2282">2282</a>     ZooKeeperWatcher zkw = <strong class="jxr_keyword">new</strong> ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
+<a class="jxr_linenumber" name="2283" href="#2283">2283</a>         <span class="jxr_string">"unittest"</span>, <strong class="jxr_keyword">new</strong> Abortable() {
+<a class="jxr_linenumber" name="2284" href="#2284">2284</a>           <strong class="jxr_keyword">boolean</strong> aborted = false;
+<a class="jxr_linenumber" name="2285" href="#2285">2285</a> 
+<a class="jxr_linenumber" name="2286" href="#2286">2286</a>           @Override
+<a class="jxr_linenumber" name="2287" href="#2287">2287</a>           <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> abort(String why, Throwable e) {
+<a class="jxr_linenumber" name="2288" href="#2288">2288</a>             aborted = <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="2289" href="#2289">2289</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> RuntimeException(<span class="jxr_string">"Fatal ZK error, why="</span> + why, e);
+<a class="jxr_linenumber" name="2290" href="#2290">2290</a>           }
+<a class="jxr_linenumber" name="2291" href="#2291">2291</a> 
+<a class="jxr_linenumber" name="2292" href="#2292">2292</a>           @Override
+<a class="jxr_linenumber" name="2293" href="#2293">2293</a>           <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isAborted() {
+<a class="jxr_linenumber" name="2294" href="#2294">2294</a>             <strong class="jxr_keyword">return</strong> aborted;
+<a class="jxr_linenumber" name="2295" href="#2295">2295</a>           }
+<a class="jxr_linenumber" name="2296" href="#2296">2296</a>         });
+<a class="jxr_linenumber" name="2297" href="#2297">2297</a>     <strong class="jxr_keyword">return</strong> zkw;
+<a class="jxr_linenumber" name="2298" href="#2298">2298</a>   }
+<a class="jxr_linenumber" name="2299" href="#2299">2299</a> 
+<a class="jxr_linenumber" name="2300" href="#2300">2300</a>   <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="2301" href="#2301">2301</a> <em class="jxr_javadoccomment">   * Creates a znode with OPENED state.</em>
+<a class="jxr_linenumber" name="2302" href="#2302">2302</a> <em class="jxr_javadoccomment">   * @param TEST_UTIL</em>
+<a class="jxr_linenumber" name="2303" href="#2303">2303</a> <em class="jxr_javadoccomment">   * @param region</em>
+<a class="jxr_linenumber" name="2304" href="#2304">2304</a> <em class="jxr_javadoccomment">   * @param serverName</em>
+<a class="jxr_linenumber" name="2305" href="#2305">2305</a> <em class="jxr_javadoccomment">   * @return</em>
+<a class="jxr_linenumber" name="2306" href="#2306">2306</a> <em class="jxr_javadoccomment">   * @throws IOException</em>
+<a class="jxr_linenumber" name="2307" href="#2307">2307</a> <em class="jxr_javadoccomment">   * @throws org.apache.hadoop.hbase.exceptions.ZooKeeperConnectionException</em>
+<a class="jxr_linenumber" name="2308" href="#2308">2308</a> <em class="jxr_javadoccomment">   * @throws KeeperException</em>
+<a class="jxr_linenumber" name="2309" href="#2309">2309</a> <em class="jxr_javadoccomment">   * @throws NodeExistsException</em>
+<a class="jxr_linenumber" name="2310" href="#2310">2310</a> <em class="jxr_javadoccomment">   */</em>
+<a class="jxr_linenumber" name="2311" href="#2311">2311</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> ZooKeeperWatcher createAndForceNodeToOpenedState(
+<a class="jxr_linenumber" name="2312" href="#2312">2312</a>       <a href="../../../../org/apache/hadoop/hbase/HBaseTestingUtility.html">HBaseTestingUtility</a> TEST_UTIL, HRegion region,
+<a class="jxr_linenumber" name="2313" href="#2313">2313</a>       ServerName serverName) <strong class="jxr_keyword">throws</strong> ZooKeeperConnectionException,
+<a class="jxr_linenumber" name="2314" href="#2314">2314</a>       IOException, KeeperException, NodeExistsException {
+<a class="jxr_linenumber" name="2315" href="#2315">2315</a>     ZooKeeperWatcher zkw = getZooKeeperWatcher(TEST_UTIL);
+<a class="jxr_linenumber" name="2316" href="#2316">2316</a>     ZKAssign.createNodeOffline(zkw, region.getRegionInfo(), serverName);
+<a class="jxr_linenumber" name="2317" href="#2317">2317</a>     <strong class="jxr_keyword">int</strong> version = ZKAssign.transitionNodeOpening(zkw, region
+<a class="jxr_linenumber" name="2318" href="#2318">2318</a>         .getRegionInfo(), serverName);
+<a class="jxr_linenumber" name="2319" href="#2319">2319</a>     ZKAssign.transitionNodeOpened(zkw, region.getRegionInfo(), serverName,
+<a class="jxr_linenumber" name="2320" href="#2320">2320</a>         version);
+<a class="jxr_linenumber" name="2321" href="#2321">2321</a>     <strong class="jxr_keyword">return</strong> zkw;
+<a class="jxr_linenumber" name="2322" href="#2322">2322</a>   }
 <a class="jxr_linenumber" name="2323" href="#2323">2323</a> 
-<a class="jxr_linenumber" name="2324" href="#2324">2324</a>     <strong class="jxr_keyword">if</strong> (eLen != aLen || i != minLen) {
-<a class="jxr_linenumber" name="2325" href="#2325">2325</a>       <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> AssertionError(
-<a class="jxr_linenumber" name="2326" href="#2326">2326</a>           <span class="jxr_string">"Expected and actual KV arrays differ at position "</span> + i + <span class="jxr_string">": "</span> +
-<a class="jxr_linenumber" name="2327" href="#2327">2327</a>           safeGetAsStr(expected, i) + <span class="jxr_string">" (length "</span> + eLen +<span class="jxr_string">") vs. "</span> +
-<a class="jxr_linenumber" name="2328" href="#2328">2328</a>           safeGetAsStr(actual, i) + <span class="jxr_string">" (length "</span> + aLen + <span class="jxr_string">")"</span> + additionalMsg);
-<a class="jxr_linenumber" name="2329" href="#2329">2329</a>     }
-<a class="jxr_linenumber" name="2330" href="#2330">2330</a>   }
-<a class="jxr_linenumber" name="2331" href="#2331">2331</a> 
-<a class="jxr_linenumber" name="2332" href="#2332">2332</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> &lt;T&gt; String safeGetAsStr(List&lt;T&gt; lst, <strong class="jxr_keyword">int</strong> i) {
-<a class="jxr_linenumber" name="2333" href="#2333">2333</a>     <strong class="jxr_keyword">if</strong> (0 &lt;= i &amp;&amp; i &lt; lst.size()) {
-<a class="jxr_linenumber" name="2334" href="#2334">2334</a>       <strong class="jxr_keyword">return</strong> lst.get(i).toString();
-<a class="jxr_linenumber" name="2335" href="#2335">2335</a>     } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="2336" href="#2336">2336</a>       <strong class="jxr_keyword">return</strong> <span class="jxr_string">"&lt;out_of_range&gt;"</span>;
-<a class="jxr_linenumber" name="2337" href="#2337">2337</a>     }
-<a class="jxr_linenumber" name="2338" href="#2338">2338</a>   }
-<a class="jxr_linenumber" name="2339" href="#2339">2339</a> 
-<a class="jxr_linenumber" name="2340" href="#2340">2340</a>   <strong class="jxr_keyword">public</strong> String getClusterKey() {
-<a class="jxr_linenumber" name="2341" href="#2341">2341</a>     <strong class="jxr_keyword">return</strong> conf.get(HConstants.ZOOKEEPER_QUORUM) + <span class="jxr_string">":"</span>
-<a class="jxr_linenumber" name="2342" href="#2342">2342</a>         + conf.get(HConstants.ZOOKEEPER_CLIENT_PORT) + <span class="jxr_string">":"</span>
-<a class="jxr_linenumber" name="2343" href="#2343">2343</a>         + conf.get(HConstants.ZOOKEEPER_ZNODE_PARENT,
-<a class="jxr_linenumber" name="2344" href="#2344">2344</a>             HConstants.DEFAULT_ZOOKEEPER_ZNODE_PARENT);
-<a class="jxr_linenumber" name="2345" href="#2345">2345</a>   }
-<a class="jxr_linenumber" name="2346" href="#2346">2346</a> 
-<a class="jxr_linenumber" name="2347" href="#2347">2347</a>   <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Creates a random table with the given parameters */</em>
-<a class="jxr_linenumber" name="2348" href="#2348">2348</a>   <strong class="jxr_keyword">public</strong> HTable createRandomTable(String tableName,
-<a class="jxr_linenumber" name="2349" href="#2349">2349</a>       <strong class="jxr_keyword">final</strong> Collection&lt;String&gt; families,
-<a class="jxr_linenumber" name="2350" href="#2350">2350</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> maxVersions,
-<a class="jxr_linenumber" name="2351" href="#2351">2351</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numColsPerRow,
-<a class="jxr_linenumber" name="2352" href="#2352">2352</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numFlushes,
-<a class="jxr_linenumber" name="2353" href="#2353">2353</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numRegions,
-<a class="jxr_linenumber" name="2354" href="#2354">2354</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numRowsPerFlush)
-<a class="jxr_linenumber" name="2355" href="#2355">2355</a>       <strong class="jxr_keyword">throws</strong> IOException, InterruptedException {
-<a class="jxr_linenumber" name="2356" href="#2356">2356</a> 
-<a class="jxr_linenumber" name="2357" href="#2357">2357</a>     LOG.info(<span class="jxr_string">"\n\nCreating random table "</span> + tableName + <span class="jxr_string">" with "</span> + numRegions +
-<a class="jxr_linenumber" name="2358" href="#2358">2358</a>         <span class="jxr_string">" regions, "</span> + numFlushes + <span class="jxr_string">" storefiles per region, "</span> +
-<a class="jxr_linenumber" name="2359" href="#2359">2359</a>         numRowsPerFlush + <span class="jxr_string">" rows per flush, maxVersions="</span> +  maxVersions +
-<a class="jxr_linenumber" name="2360" href="#2360">2360</a>         <span class="jxr_string">"\n"</span>);
-<a class="jxr_linenumber" name="2361" href="#2361">2361</a> 
-<a class="jxr_linenumber" name="2362" href="#2362">2362</a>     <strong class="jxr_keyword">final</strong> Random rand = <strong class="jxr_keyword">new</strong> Random(tableName.hashCode() * 17L + 12938197137L);
-<a class="jxr_linenumber" name="2363" href="#2363">2363</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numCF = families.size();
-<a class="jxr_linenumber" name="2364" href="#2364">2364</a>     <strong class="jxr_keyword">final</strong> byte[][] cfBytes = <strong class="jxr_keyword">new</strong> byte[numCF][];
-<a class="jxr_linenumber" name="2365" href="#2365">2365</a>     <strong class="jxr_keyword">final</strong> byte[] tableNameBytes = Bytes.toBytes(tableName);
-<a class="jxr_linenumber" name="2366" href="#2366">2366</a> 
-<a class="jxr_linenumber" name="2367" href="#2367">2367</a>     {
-<a class="jxr_linenumber" name="2368" href="#2368">2368</a>       <strong class="jxr_keyword">int</strong> cfIndex = 0;
-<a class="jxr_linenumber" name="2369" href="#2369">2369</a>       <strong class="jxr_keyword">for</strong> (String cf : families) {
-<a class="jxr_linenumber" name="2370" href="#2370">2370</a>         cfBytes[cfIndex++] = Bytes.toBytes(cf);
-<a class="jxr_linenumber" name="2371" href="#2371">2371</a>       }
-<a class="jxr_linenumber" name="2372" href="#2372">2372</a>     }
-<a class="jxr_linenumber" name="2373" href="#2373">2373</a> 
-<a class="jxr_linenumber" name="2374" href="#2374">2374</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> actualStartKey = 0;
-<a class="jxr_linenumber" name="2375" href="#2375">2375</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> actualEndKey = Integer.MAX_VALUE;
-<a class="jxr_linenumber" name="2376" href="#2376">2376</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> keysPerRegion = (actualEndKey - actualStartKey) / numRegions;
-<a class="jxr_linenumber" name="2377" href="#2377">2377</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> splitStartKey = actualStartKey + keysPerRegion;
-<a class="jxr_linenumber" name="2378" href="#2378">2378</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> splitEndKey = actualEndKey - keysPerRegion;
-<a class="jxr_linenumber" name="2379" href="#2379">2379</a>     <strong class="jxr_keyword">final</strong> String keyFormat = <span class="jxr_string">"%08x"</span>;
-<a class="jxr_linenumber" name="2380" href="#2380">2380</a>     <strong class="jxr_keyword">final</strong> HTable table = createTable(tableNameBytes, cfBytes,
-<a class="jxr_linenumber" name="2381" href="#2381">2381</a>         maxVersions,
-<a class="jxr_linenumber" name="2382" href="#2382">2382</a>         Bytes.toBytes(String.format(keyFormat, splitStartKey)),
-<a class="jxr_linenumber" name="2383" href="#2383">2383</a>         Bytes.toBytes(String.format(keyFormat, splitEndKey)),
-<a class="jxr_linenumber" name="2384" href="#2384">2384</a>         numRegions);
+<a class="jxr_linenumber" name="2324" href="#2324">2324</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> assertKVListsEqual(String additionalMsg,
+<a class="jxr_linenumber" name="2325" href="#2325">2325</a>       <strong class="jxr_keyword">final</strong> List&lt;KeyValue&gt; expected,
+<a class="jxr_linenumber" name="2326" href="#2326">2326</a>       <strong class="jxr_keyword">final</strong> List&lt;KeyValue&gt; actual) {
+<a class="jxr_linenumber" name="2327" href="#2327">2327</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> eLen = expected.size();
+<a class="jxr_linenumber" name="2328" href="#2328">2328</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> aLen = actual.size();
+<a class="jxr_linenumber" name="2329" href="#2329">2329</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> minLen = Math.min(eLen, aLen);
+<a class="jxr_linenumber" name="2330" href="#2330">2330</a> 
+<a class="jxr_linenumber" name="2331" href="#2331">2331</a>     <strong class="jxr_keyword">int</strong> i;
+<a class="jxr_linenumber" name="2332" href="#2332">2332</a>     <strong class="jxr_keyword">for</strong> (i = 0; i &lt; minLen
+<a class="jxr_linenumber" name="2333" href="#2333">2333</a>         &amp;&amp; KeyValue.COMPARATOR.compare(expected.get(i), actual.get(i)) == 0;
+<a class="jxr_linenumber" name="2334" href="#2334">2334</a>         ++i) {}
+<a class="jxr_linenumber" name="2335" href="#2335">2335</a> 
+<a class="jxr_linenumber" name="2336" href="#2336">2336</a>     <strong class="jxr_keyword">if</strong> (additionalMsg == <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="2337" href="#2337">2337</a>       additionalMsg = <span class="jxr_string">""</span>;
+<a class="jxr_linenumber" name="2338" href="#2338">2338</a>     }
+<a class="jxr_linenumber" name="2339" href="#2339">2339</a>     <strong class="jxr_keyword">if</strong> (!additionalMsg.isEmpty()) {
+<a class="jxr_linenumber" name="2340" href="#2340">2340</a>       additionalMsg = <span class="jxr_string">". "</span> + additionalMsg;
+<a class="jxr_linenumber" name="2341" href="#2341">2341</a>     }
+<a class="jxr_linenumber" name="2342" href="#2342">2342</a> 
+<a class="jxr_linenumber" name="2343" href="#2343">2343</a>     <strong class="jxr_keyword">if</strong> (eLen != aLen || i != minLen) {
+<a class="jxr_linenumber" name="2344" href="#2344">2344</a>       <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> AssertionError(
+<a class="jxr_linenumber" name="2345" href="#2345">2345</a>           <span class="jxr_string">"Expected and actual KV arrays differ at position "</span> + i + <span class="jxr_string">": "</span> +
+<a class="jxr_linenumber" name="2346" href="#2346">2346</a>           safeGetAsStr(expected, i) + <span class="jxr_string">" (length "</span> + eLen +<span class="jxr_string">") vs. "</span> +
+<a class="jxr_linenumber" name="2347" href="#2347">2347</a>           safeGetAsStr(actual, i) + <span class="jxr_string">" (length "</span> + aLen + <span class="jxr_string">")"</span> + additionalMsg);
+<a class="jxr_linenumber" name="2348" href="#2348">2348</a>     }
+<a class="jxr_linenumber" name="2349" href="#2349">2349</a>   }
+<a class="jxr_linenumber" name="2350" href="#2350">2350</a> 
+<a class="jxr_linenumber" name="2351" href="#2351">2351</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> &lt;T&gt; String safeGetAsStr(List&lt;T&gt; lst, <strong class="jxr_keyword">int</strong> i) {
+<a class="jxr_linenumber" name="2352" href="#2352">2352</a>     <strong class="jxr_keyword">if</strong> (0 &lt;= i &amp;&amp; i &lt; lst.size()) {
+<a class="jxr_linenumber" name="2353" href="#2353">2353</a>       <strong class="jxr_keyword">return</strong> lst.get(i).toString();
+<a class="jxr_linenumber" name="2354" href="#2354">2354</a>     } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="2355" href="#2355">2355</a>       <strong class="jxr_keyword">return</strong> <span class="jxr_string">"&lt;out_of_range&gt;"</span>;
+<a class="jxr_linenumber" name="2356" href="#2356">2356</a>     }
+<a class="jxr_linenumber" name="2357" href="#2357">2357</a>   }
+<a class="jxr_linenumber" name="2358" href="#2358">2358</a> 
+<a class="jxr_linenumber" name="2359" href="#2359">2359</a>   <strong class="jxr_keyword">public</strong> String getClusterKey() {
+<a class="jxr_linenumber" name="2360" href="#2360">2360</a>     <strong class="jxr_keyword">return</strong> conf.get(HConstants.ZOOKEEPER_QUORUM) + <span class="jxr_string">":"</span>
+<a class="jxr_linenumber" name="2361" href="#2361">2361</a>         + conf.get(HConstants.ZOOKEEPER_CLIENT_PORT) + <span class="jxr_string">":"</span>
+<a class="jxr_linenumber" name="2362" href="#2362">2362</a>         + conf.get(HConstants.ZOOKEEPER_ZNODE_PARENT,
+<a class="jxr_linenumber" name="2363" href="#2363">2363</a>             HConstants.DEFAULT_ZOOKEEPER_ZNODE_PARENT);
+<a class="jxr_linenumber" name="2364" href="#2364">2364</a>   }
+<a class="jxr_linenumber" name="2365" href="#2365">2365</a> 
+<a class="jxr_linenumber" name="2366" href="#2366">2366</a>   <em class="jxr_javadoccomment">/**</em><em class="jxr_javadoccomment"> Creates a random table with the given parameters */</em>
+<a class="jxr_linenumber" name="2367" href="#2367">2367</a>   <strong class="jxr_keyword">public</strong> HTable createRandomTable(String tableName,
+<a class="jxr_linenumber" name="2368" href="#2368">2368</a>       <strong class="jxr_keyword">final</strong> Collection&lt;String&gt; families,
+<a class="jxr_linenumber" name="2369" href="#2369">2369</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> maxVersions,
+<a class="jxr_linenumber" name="2370" href="#2370">2370</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numColsPerRow,
+<a class="jxr_linenumber" name="2371" href="#2371">2371</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numFlushes,
+<a class="jxr_linenumber" name="2372" href="#2372">2372</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numRegions,
+<a class="jxr_linenumber" name="2373" href="#2373">2373</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numRowsPerFlush)
+<a class="jxr_linenumber" name="2374" href="#2374">2374</a>       <strong class="jxr_keyword">throws</strong> IOException, InterruptedException {
+<a class="jxr_linenumber" name="2375" href="#2375">2375</a> 
+<a class="jxr_linenumber" name="2376" href="#2376">2376</a>     LOG.info(<span class="jxr_string">"\n\nCreating random table "</span> + tableName + <span class="jxr_string">" with "</span> + numRegions +
+<a class="jxr_linenumber" name="2377" href="#2377">2377</a>         <span class="jxr_string">" regions, "</span> + numFlushes + <span class="jxr_string">" storefiles per region, "</span> +
+<a class="jxr_linenumber" name="2378" href="#2378">2378</a>         numRowsPerFlush + <span class="jxr_string">" rows per flush, maxVersions="</span> +  maxVersions +
+<a class="jxr_linenumber" name="2379" href="#2379">2379</a>         <span class="jxr_string">"\n"</span>);
+<a class="jxr_linenumber" name="2380" href="#2380">2380</a> 
+<a class="jxr_linenumber" name="2381" href="#2381">2381</a>     <strong class="jxr_keyword">final</strong> Random rand = <strong class="jxr_keyword">new</strong> Random(tableName.hashCode() * 17L + 12938197137L);
+<a class="jxr_linenumber" name="2382" href="#2382">2382</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> numCF = families.size();
+<a class="jxr_linenumber" name="2383" href="#2383">2383</a>     <strong class="jxr_keyword">final</strong> byte[][] cfBytes = <strong class="jxr_keyword">new</strong> byte[numCF][];
+<a class="jxr_linenumber" name="2384" href="#2384">2384</a>     <strong class="jxr_keyword">final</strong> byte[] tableNameBytes = Bytes.toBytes(tableName);
 <a class="jxr_linenumber" name="2385" href="#2385">2385</a> 
-<a class="jxr_linenumber" name="2386" href="#2386">2386</a>     <strong class="jxr_keyword">if</strong> (hbaseCluster != <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="2387" href="#2387">2387</a>       getMiniHBaseCluster().flushcache(HConstants.META_TABLE_NAME);
-<a class="jxr_linenumber" name="2388" href="#2388">2388</a>     }
-<a class="jxr_linenumber" name="2389" href="#2389">2389</a> 
-<a class="jxr_linenumber" name="2390" href="#2390">2390</a>     <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> iFlush = 0; iFlush &lt; numFlushes; ++iFlush) {
-<a class="jxr_linenumber" name="2391" href="#2391">2391</a>       <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> iRow = 0; iRow &lt; numRowsPerFlush; ++iRow) {
-<a class="jxr_linenumber" name="2392" href="#2392">2392</a>         <strong class="jxr_keyword">final</strong> byte[] row = Bytes.toBytes(String.format(keyFormat,
-<a class="jxr_linenumber" name="2393" href="#2393">2393</a>             actualStartKey + rand.nextInt(actualEndKey - actualStartKey)));
-<a class="jxr_linenumber" name="2394" href="#2394">2394</a> 
-<a class="jxr_linenumber" name="2395" href="#2395">2395</a>         Put put = <strong class="jxr_keyword">new</strong> Put(row);
-<a class="jxr_linenumber" name="2396" href="#2396">2396</a>         Delete del = <strong class="jxr_keyword">new</strong> Delete(row);
-<a class="jxr_linenumber" name="2397" href="#2397">2397</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> iCol = 0; iCol &lt; numColsPerRow; ++iCol) {
-<a class="jxr_linenumber" name="2398" href="#2398">2398</a>           <strong class="jxr_keyword">final</strong> byte[] cf = cfBytes[rand.nextInt(numCF)];
-<a class="jxr_linenumber" name="2399" href="#2399">2399</a>           <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> ts = rand.nextInt();
-<a class="jxr_linenumber" name="2400" href="#2400">2400</a>           <strong class="jxr_keyword">final</strong> byte[] qual = Bytes.toBytes(<span class="jxr_string">"col"</span> + iCol);
-<a class="jxr_linenumber" name="2401" href="#2401">2401</a>           <strong class="jxr_keyword">if</strong> (rand.nextBoolean()) {
-<a class="jxr_linenumber" name="2402" href="#2402">2402</a>             <strong class="jxr_keyword">final</strong> byte[] value = Bytes.toBytes(<span class="jxr_string">"value_for_row_"</span> + iRow +
-<a class="jxr_linenumber" name="2403" href="#2403">2403</a>                 <span class="jxr_string">"_cf_"</span> + Bytes.toStringBinary(cf) + <span class="jxr_string">"_col_"</span> + iCol + <span class="jxr_string">"_ts_"</span> +
-<a class="jxr_linenumber" name="2404" href="#2404">2404</a>                 ts + <span class="jxr_string">"_random_"</span> + rand.nextLong());
-<a class="jxr_linenumber" name="2405" href="#2405">2405</a>             put.add(cf, qual, ts, value);
-<a class="jxr_linenumber" name="2406" href="#2406">2406</a>           } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (rand.nextDouble() &lt; 0.8) {
-<a class="jxr_linenumber" name="2407" href="#2407">2407</a>             del.deleteColumn(cf, qual, ts);
-<a class="jxr_linenumber" name="2408" href="#2408">2408</a>           } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="2409" href="#2409">2409</a>             del.deleteColumns(cf, qual, ts);
-<a class="jxr_linenumber" name="2410" href="#2410">2410</a>           }
-<a class="jxr_linenumber" name="2411" href="#2411">2411</a>         }
-<a class="jxr_linenumber" name="2412" href="#2412">2412</a> 
-<a class="jxr_linenumber" name="2413" href="#2413">2413</a>         <strong class="jxr_keyword">if</strong> (!put.isEmpty()) {
-<a class="jxr_linenumber" name="2414" href="#2414">2414</a>           table.put(put);
-<a class="jxr_linenumber" name="2415" href="#2415">2415</a>         }
-<a class="jxr_linenumber" name="2416" href="#2416">2416</a> 
-<a class="jxr_linenumber" name="2417" href="#2417">2417</a>         <strong class="jxr_keyword">if</strong> (!del.isEmpty()) {
-<a class="jxr_linenumber" name="2418" href="#2418">2418</a>           table.delete(del);
-<a class="jxr_linenumber" name="2419" href="#2419">2419</a>         }
-<a class="jxr_linenumber" name="2420" href="#2420">2420</a>       }
-<a class="jxr_linenumber" name="2421" href="#2421">2421</a>       LOG.info(<span class="jxr_string">"Initiating flush #"</span> + iFlush + <span class="jxr_string">" for table "</span> + tableName);
-<a class="jxr_linenumber" name="2422" href="#2422">2422</a>       table.flushCommits();
-<a class="jxr_linenumber" name="2423" href="#2423">2423</a>       <strong class="jxr_keyword">if</strong> (hbaseCluster != <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="2424" href="#2424">2424</a>         getMiniHBaseCluster().flushcache(tableNameBytes);
-<a class="jxr_linenumber" name="2425" href="#2425">2425</a>       }
-<a class="jxr_linenumber" name="2426" href="#2426">2426</a>     }
-<a class="jxr_linenumber" name="2427" href="#2427">2427</a> 
-<a class="jxr_linenumber" name="2428" href="#2428">2428</a>     <strong class="jxr_keyword">return</strong> table;
-<a class="jxr_linenumber" name="2429" href="#2429">2429</a>   }
-<a class="jxr_linenumber" name="2430" href="#2430">2430</a> 
-<a class="jxr_linenumber" name="2431" href="#2431">2431</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> MIN_RANDOM_PORT = 0xc000;
-<a class="jxr_linenumber" name="2432" href="#2432">2432</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> MAX_RANDOM_PORT = 0xfffe;
-<a class="jxr_linenumber" name="2433" href="#2433">2433</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> Random random = <strong class="jxr_keyword">new</strong> Random();
-<a class="jxr_linenumber" name="2434" href="#2434">2434</a> 
-<a class="jxr_linenumber" name="2435" href="#2435">2435</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2436" href="#2436">2436</a> <em class="jxr_javadoccomment">   * Returns a random port. These ports cannot be registered with IANA and are</em>
-<a class="jxr_linenumber" name="2437" href="#2437">2437</a> <em class="jxr_javadoccomment">   * intended for dynamic allocation (see <a href="http://bit.ly/dynports)." target="alexandria_uri">http://bit.ly/dynports).</a></em>
-<a class="jxr_linenumber" name="2438" href="#2438">2438</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2439" href="#2439">2439</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> randomPort() {
-<a class="jxr_linenumber" name="2440" href="#2440">2440</a>     <strong class="jxr_keyword">return</strong> MIN_RANDOM_PORT
-<a class="jxr_linenumber" name="2441" href="#2441">2441</a>         + random.nextInt(MAX_RANDOM_PORT - MIN_RANDOM_PORT);
-<a class="jxr_linenumber" name="2442" href="#2442">2442</a>   }
-<a class="jxr_linenumber" name="2443" href="#2443">2443</a> 
-<a class="jxr_linenumber" name="2444" href="#2444">2444</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2445" href="#2445">2445</a> <em class="jxr_javadoccomment">   * Returns a random free port and marks that port as taken. Not thread-safe. Expected to be</em>
-<a class="jxr_linenumber" name="2446" href="#2446">2446</a> <em class="jxr_javadoccomment">   * called from single-threaded test setup code/</em>
-<a class="jxr_linenumber" name="2447" href="#2447">2447</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2448" href="#2448">2448</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> randomFreePort() {
-<a class="jxr_linenumber" name="2449" href="#2449">2449</a>     <strong class="jxr_keyword">int</strong> port = 0;
-<a class="jxr_linenumber" name="2450" href="#2450">2450</a>     <strong class="jxr_keyword">do</strong> {
-<a class="jxr_linenumber" name="2451" href="#2451">2451</a>       port = randomPort();
-<a class="jxr_linenumber" name="2452" href="#2452">2452</a>       <strong class="jxr_keyword">if</strong> (takenRandomPorts.contains(port)) {
-<a class="jxr_linenumber" name="2453" href="#2453">2453</a>         <strong class="jxr_keyword">continue</strong>;
-<a class="jxr_linenumber" name="2454" href="#2454">2454</a>       }
-<a class="jxr_linenumber" name="2455" href="#2455">2455</a>       takenRandomPorts.add(port);
-<a class="jxr_linenumber" name="2456" href="#2456">2456</a> 
-<a class="jxr_linenumber" name="2457" href="#2457">2457</a>       <strong class="jxr_keyword">try</strong> {
-<a class="jxr_linenumber" name="2458" href="#2458">2458</a>         ServerSocket sock = <strong class="jxr_keyword">new</strong> ServerSocket(port);
-<a class="jxr_linenumber" name="2459" href="#2459">2459</a>         sock.close();
-<a class="jxr_linenumber" name="2460" href="#2460">2460</a>       } <strong class="jxr_keyword">catch</strong> (IOException ex) {
-<a class="jxr_linenumber" name="2461" href="#2461">2461</a>         port = 0;
-<a class="jxr_linenumber" name="2462" href="#2462">2462</a>       }
-<a class="jxr_linenumber" name="2463" href="#2463">2463</a>     } <strong class="jxr_keyword">while</strong> (port == 0);
-<a class="jxr_linenumber" name="2464" href="#2464">2464</a>     <strong class="jxr_keyword">return</strong> port;
-<a class="jxr_linenumber" name="2465" href="#2465">2465</a>   }
-<a class="jxr_linenumber" name="2466" href="#2466">2466</a> 
-<a class="jxr_linenumber" name="2467" href="#2467">2467</a> 
-<a class="jxr_linenumber" name="2468" href="#2468">2468</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> String randomMultiCastAddress() {
-<a class="jxr_linenumber" name="2469" href="#2469">2469</a>     <strong class="jxr_keyword">return</strong> <span class="jxr_string">"226.1.1."</span> + random.nextInt(254);
-<a class="jxr_linenumber" name="2470" href="#2470">2470</a>   }
-<a class="jxr_linenumber" name="2471" href="#2471">2471</a> 
-<a class="jxr_linenumber" name="2472" href="#2472">2472</a> 
-<a class="jxr_linenumber" name="2473" href="#2473">2473</a> 
-<a class="jxr_linenumber" name="2474" href="#2474">2474</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> waitForHostPort(String host, <strong class="jxr_keyword">int</strong> port)
-<a class="jxr_linenumber" name="2475" href="#2475">2475</a>       <strong class="jxr_keyword">throws</strong> IOException {
-<a class="jxr_linenumber" name="2476" href="#2476">2476</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> maxTimeMs = 10000;
-<a class="jxr_linenumber" name="2477" href="#2477">2477</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> maxNumAttempts = maxTimeMs / HConstants.SOCKET_RETRY_WAIT_MS;
-<a class="jxr_linenumber" name="2478" href="#2478">2478</a>     IOException savedException = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="2479" href="#2479">2479</a>     LOG.info(<span class="jxr_string">"Waiting for server at "</span> + host + <span class="jxr_string">":"</span> + port);
-<a class="jxr_linenumber" name="2480" href="#2480">2480</a>     <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> attempt = 0; attempt &lt; maxNumAttempts; ++attempt) {
-<a class="jxr_linenumber" name="2481" href="#2481">2481</a>       <strong class="jxr_keyword">try</strong> {
-<a class="jxr_linenumber" name="2482" href="#2482">2482</a>         Socket sock = <strong class="jxr_keyword">new</strong> Socket(InetAddress.getByName(host), port);
-<a class="jxr_linenumber" name="2483" href="#2483">2483</a>         sock.close();
-<a class="jxr_linenumber" name="2484" href="#2484">2484</a>         savedException = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="2485" href="#2485">2485</a>         LOG.info(<span class="jxr_string">"Server at "</span> + host + <span class="jxr_string">":"</span> + port + <span class="jxr_string">" is available"</span>);
-<a class="jxr_linenumber" name="2486" href="#2486">2486</a>         <strong class="jxr_keyword">break</strong>;
-<a class="jxr_linenumber" name="2487" href="#2487">2487</a>       } <strong class="jxr_keyword">catch</strong> (UnknownHostException e) {
-<a class="jxr_linenumber" name="2488" href="#2488">2488</a>         <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IOException(<span class="jxr_string">"Failed to look up "</span> + host, e);
-<a class="jxr_linenumber" name="2489" href="#2489">2489</a>       } <strong class="jxr_keyword">catch</strong> (IOException e) {
-<a class="jxr_linenumber" name="2490" href="#2490">2490</a>         savedException = e;
-<a class="jxr_linenumber" name="2491" href="#2491">2491</a>       }
-<a class="jxr_linenumber" name="2492" href="#2492">2492</a>       Threads.sleepWithoutInterrupt(HConstants.SOCKET_RETRY_WAIT_MS);
-<a class="jxr_linenumber" name="2493" href="#2493">2493</a>     }
-<a class="jxr_linenumber" name="2494" href="#2494">2494</a> 
-<a class="jxr_linenumber" name="2495" href="#2495">2495</a>     <strong class="jxr_keyword">if</strong> (savedException != <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="2496" href="#2496">2496</a>       <strong class="jxr_keyword">throw</strong> savedException;
-<a class="jxr_linenumber" name="2497" href="#2497">2497</a>     }
-<a class="jxr_linenumber" name="2498" href="#2498">2498</a>   }
-<a class="jxr_linenumber" name="2499" href="#2499">2499</a> 
-<a class="jxr_linenumber" name="2500" href="#2500">2500</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2501" href="#2501">2501</a> <em class="jxr_javadoccomment">   * Creates a pre-split table for load testing. If the table already exists,</em>
-<a class="jxr_linenumber" name="2502" href="#2502">2502</a> <em class="jxr_javadoccomment">   * logs a warning and continues.</em>
-<a class="jxr_linenumber" name="2503" href="#2503">2503</a> <em class="jxr_javadoccomment">   * @return the number of regions the table was split into</em>
-<a class="jxr_linenumber" name="2504" href="#2504">2504</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2505" href="#2505">2505</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> createPreSplitLoadTestTable(Configuration conf,
-<a class="jxr_linenumber" name="2506" href="#2506">2506</a>       byte[] tableName, byte[] columnFamily, Algorithm compression,
-<a class="jxr_linenumber" name="2507" href="#2507">2507</a>       DataBlockEncoding dataBlockEncoding) <strong class="jxr_keyword">throws</strong> IOException {
-<a class="jxr_linenumber" name="2508" href="#2508">2508</a>     HTableDescriptor desc = <strong class="jxr_keyword">new</strong> HTableDescriptor(tableName);
-<a class="jxr_linenumber" name="2509" href="#2509">2509</a>     HColumnDescriptor hcd = <strong class="jxr_keyword">new</strong> HColumnDescriptor(columnFamily);
-<a class="jxr_linenumber" name="2510" href="#2510">2510</a>     hcd.setDataBlockEncoding(dataBlockEncoding);
-<a class="jxr_linenumber" name="2511" href="#2511">2511</a>     hcd.setCompressionType(compression);
-<a class="jxr_linenumber" name="2512" href="#2512">2512</a>     <strong class="jxr_keyword">return</strong> createPreSplitLoadTestTable(conf, desc, hcd);
-<a class="jxr_linenumber" name="2513" href="#2513">2513</a>   }
-<a class="jxr_linenumber" name="2514" href="#2514">2514</a> 
-<a class="jxr_linenumber" name="2515" href="#2515">2515</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2516" href="#2516">2516</a> <em class="jxr_javadoccomment">   * Creates a pre-split table for load testing. If the table already exists,</em>
-<a class="jxr_linenumber" name="2517" href="#2517">2517</a> <em class="jxr_javadoccomment">   * logs a warning and continues.</em>
-<a class="jxr_linenumber" name="2518" href="#2518">2518</a> <em class="jxr_javadoccomment">   * @return the number of regions the table was split into</em>
-<a class="jxr_linenumber" name="2519" href="#2519">2519</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2520" href="#2520">2520</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> createPreSplitLoadTestTable(Configuration conf,
-<a class="jxr_linenumber" name="2521" href="#2521">2521</a>       HTableDescriptor desc, HColumnDescriptor hcd) <strong class="jxr_keyword">throws</strong> IOException {
-<a class="jxr_linenumber" name="2522" href="#2522">2522</a>     <strong class="jxr_keyword">if</strong> (!desc.hasFamily(hcd.getName())) {
-<a class="jxr_linenumber" name="2523" href="#2523">2523</a>       desc.addFamily(hcd);
-<a class="jxr_linenumber" name="2524" href="#2524">2524</a>     }
-<a class="jxr_linenumber" name="2525" href="#2525">2525</a> 
-<a class="jxr_linenumber" name="2526" href="#2526">2526</a>     <strong class="jxr_keyword">int</strong> totalNumberOfRegions = 0;
-<a class="jxr_linenumber" name="2527" href="#2527">2527</a>     HBaseAdmin admin = <strong class="jxr_keyword">new</strong> HBaseAdmin(conf);
-<a class="jxr_linenumber" name="2528" href="#2528">2528</a>     <strong class="jxr_keyword">try</strong> {
-<a class="jxr_linenumber" name="2529" href="#2529">2529</a>       <em class="jxr_comment">// create a table a pre-splits regions.</em>
-<a class="jxr_linenumber" name="2530" href="#2530">2530</a>       <em class="jxr_comment">// The number of splits is set as:</em>
-<a class="jxr_linenumber" name="2531" href="#2531">2531</a>       <em class="jxr_comment">//    region servers * regions per region server).</em>
-<a class="jxr_linenumber" name="2532" href="#2532">2532</a>       <strong class="jxr_keyword">int</strong> numberOfServers = admin.getClusterStatus().getServers().size();
-<a class="jxr_linenumber" name="2533" href="#2533">2533</a>       <strong class="jxr_keyword">if</strong> (numberOfServers == 0) {
-<a class="jxr_linenumber" name="2534" href="#2534">2534</a>         <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IllegalStateException(<span class="jxr_string">"No live regionservers"</span>);
-<a class="jxr_linenumber" name="2535" href="#2535">2535</a>       }
-<a class="jxr_linenumber" name="2536" href="#2536">2536</a> 
-<a class="jxr_linenumber" name="2537" href="#2537">2537</a>       totalNumberOfRegions = numberOfServers * DEFAULT_REGIONS_PER_SERVER;
-<a class="jxr_linenumber" name="2538" href="#2538">2538</a>       LOG.info(<span class="jxr_string">"Number of live regionservers: "</span> + numberOfServers + <span class="jxr_string">", "</span> +
-<a class="jxr_linenumber" name="2539" href="#2539">2539</a>           <span class="jxr_string">"pre-splitting table into "</span> + totalNumberOfRegions + <span class="jxr_string">" regions "</span> +
-<a class="jxr_linenumber" name="2540" href="#2540">2540</a>           <span class="jxr_string">"(default regions per server: "</span> + DEFAULT_REGIONS_PER_SERVER + <span class="jxr_string">")"</span>);
-<a class="jxr_linenumber" name="2541" href="#2541">2541</a> 
-<a class="jxr_linenumber" name="2542" href="#2542">2542</a>       byte[][] splits = <strong class="jxr_keyword">new</strong> RegionSplitter.HexStringSplit().split(
-<a class="jxr_linenumber" name="2543" href="#2543">2543</a>           totalNumberOfRegions);
+<a class="jxr_linenumber" name="2386" href="#2386">2386</a>     {
+<a class="jxr_linenumber" name="2387" href="#2387">2387</a>       <strong class="jxr_keyword">int</strong> cfIndex = 0;
+<a class="jxr_linenumber" name="2388" href="#2388">2388</a>       <strong class="jxr_keyword">for</strong> (String cf : families) {
+<a class="jxr_linenumber" name="2389" href="#2389">2389</a>         cfBytes[cfIndex++] = Bytes.toBytes(cf);
+<a class="jxr_linenumber" name="2390" href="#2390">2390</a>       }
+<a class="jxr_linenumber" name="2391" href="#2391">2391</a>     }
+<a class="jxr_linenumber" name="2392" href="#2392">2392</a> 
+<a class="jxr_linenumber" name="2393" href="#2393">2393</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> actualStartKey = 0;
+<a class="jxr_linenumber" name="2394" href="#2394">2394</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> actualEndKey = Integer.MAX_VALUE;
+<a class="jxr_linenumber" name="2395" href="#2395">2395</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> keysPerRegion = (actualEndKey - actualStartKey) / numRegions;
+<a class="jxr_linenumber" name="2396" href="#2396">2396</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> splitStartKey = actualStartKey + keysPerRegion;
+<a class="jxr_linenumber" name="2397" href="#2397">2397</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> splitEndKey = actualEndKey - keysPerRegion;
+<a class="jxr_linenumber" name="2398" href="#2398">2398</a>     <strong class="jxr_keyword">final</strong> String keyFormat = <span class="jxr_string">"%08x"</span>;
+<a class="jxr_linenumber" name="2399" href="#2399">2399</a>     <strong class="jxr_keyword">final</strong> HTable table = createTable(tableNameBytes, cfBytes,
+<a class="jxr_linenumber" name="2400" href="#2400">2400</a>         maxVersions,
+<a class="jxr_linenumber" name="2401" href="#2401">2401</a>         Bytes.toBytes(String.format(keyFormat, splitStartKey)),
+<a class="jxr_linenumber" name="2402" href="#2402">2402</a>         Bytes.toBytes(String.format(keyFormat, splitEndKey)),
+<a class="jxr_linenumber" name="2403" href="#2403">2403</a>         numRegions);
+<a class="jxr_linenumber" name="2404" href="#2404">2404</a> 
+<a class="jxr_linenumber" name="2405" href="#2405">2405</a>     <strong class="jxr_keyword">if</strong> (hbaseCluster != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="2406" href="#2406">2406</a>       getMiniHBaseCluster().flushcache(HConstants.META_TABLE_NAME);
+<a class="jxr_linenumber" name="2407" href="#2407">2407</a>     }
+<a class="jxr_linenumber" name="2408" href="#2408">2408</a> 
+<a class="jxr_linenumber" name="2409" href="#2409">2409</a>     <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> iFlush = 0; iFlush &lt; numFlushes; ++iFlush) {
+<a class="jxr_linenumber" name="2410" href="#2410">2410</a>       <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> iRow = 0; iRow &lt; numRowsPerFlush; ++iRow) {
+<a class="jxr_linenumber" name="2411" href="#2411">2411</a>         <strong class="jxr_keyword">final</strong> byte[] row = Bytes.toBytes(String.format(keyFormat,
+<a class="jxr_linenumber" name="2412" href="#2412">2412</a>             actualStartKey + rand.nextInt(actualEndKey - actualStartKey)));
+<a class="jxr_linenumber" name="2413" href="#2413">2413</a> 
+<a class="jxr_linenumber" name="2414" href="#2414">2414</a>         Put put = <strong class="jxr_keyword">new</strong> Put(row);
+<a class="jxr_linenumber" name="2415" href="#2415">2415</a>         Delete del = <strong class="jxr_keyword">new</strong> Delete(row);
+<a class="jxr_linenumber" name="2416" href="#2416">2416</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> iCol = 0; iCol &lt; numColsPerRow; ++iCol) {
+<a class="jxr_linenumber" name="2417" href="#2417">2417</a>           <strong class="jxr_keyword">final</strong> byte[] cf = cfBytes[rand.nextInt(numCF)];
+<a class="jxr_linenumber" name="2418" href="#2418">2418</a>           <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> ts = rand.nextInt();
+<a class="jxr_linenumber" name="2419" href="#2419">2419</a>           <strong class="jxr_keyword">final</strong> byte[] qual = Bytes.toBytes(<span class="jxr_string">"col"</span> + iCol);
+<a class="jxr_linenumber" name="2420" href="#2420">2420</a>           <strong class="jxr_keyword">if</strong> (rand.nextBoolean()) {
+<a class="jxr_linenumber" name="2421" href="#2421">2421</a>             <strong class="jxr_keyword">final</strong> byte[] value = Bytes.toBytes(<span class="jxr_string">"value_for_row_"</span> + iRow +
+<a class="jxr_linenumber" name="2422" href="#2422">2422</a>                 <span class="jxr_string">"_cf_"</span> + Bytes.toStringBinary(cf) + <span class="jxr_string">"_col_"</span> + iCol + <span class="jxr_string">"_ts_"</span> +
+<a class="jxr_linenumber" name="2423" href="#2423">2423</a>                 ts + <span class="jxr_string">"_random_"</span> + rand.nextLong());
+<a class="jxr_linenumber" name="2424" href="#2424">2424</a>             put.add(cf, qual, ts, value);
+<a class="jxr_linenumber" name="2425" href="#2425">2425</a>           } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (rand.nextDouble() &lt; 0.8) {
+<a class="jxr_linenumber" name="2426" href="#2426">2426</a>             del.deleteColumn(cf, qual, ts);
+<a class="jxr_linenumber" name="2427" href="#2427">2427</a>           } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="2428" href="#2428">2428</a>             del.deleteColumns(cf, qual, ts);
+<a class="jxr_linenumber" name="2429" href="#2429">2429</a>           }
+<a class="jxr_linenumber" name="2430" href="#2430">2430</a>         }
+<a class="jxr_linenumber" name="2431" href="#2431">2431</a> 
+<a class="jxr_linenumber" name="2432" href="#2432">2432</a>         <strong class="jxr_keyword">if</strong> (!put.isEmpty()) {
+<a class="jxr_linenumber" name="2433" href="#2433">2433</a>           table.put(put);
+<a class="jxr_linenumber" name="2434" href="#2434">2434</a>         }
+<a class="jxr_linenumber" name="2435" href="#2435">2435</a> 
+<a class="jxr_linenumber" name="2436" href="#2436">2436</a>         <strong class="jxr_keyword">if</strong> (!del.isEmpty()) {
+<a class="jxr_linenumber" name="2437" href="#2437">2437</a>           table.delete(del);
+<a class="jxr_linenumber" name="2438" href="#2438">2438</a>         }
+<a class="jxr_linenumber" name="2439" href="#2439">2439</a>       }
+<a class="jxr_linenumber" name="2440" href="#2440">2440</a>       LOG.info(<span class="jxr_string">"Initiating flush #"</span> + iFlush + <span class="jxr_string">" for table "</span> + tableName);
+<a class="jxr_linenumber" name="2441" href="#2441">2441</a>       table.flushCommits();
+<a class="jxr_linenumber" name="2442" href="#2442">2442</a>       <strong class="jxr_keyword">if</strong> (hbaseCluster != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="2443" href="#2443">2443</a>         getMiniHBaseCluster().flushcache(tableNameBytes);
+<a class="jxr_linenumber" name="2444" href="#2444">2444</a>       }
+<a class="jxr_linenumber" name="2445" href="#2445">2445</a>     }
+<a class="jxr_linenumber" name="2446" href="#2446">2446</a> 
+<a class="jxr_linenumber" name="2447" href="#2447">2447</a>     <strong class="jxr_keyword">return</strong> table;
+<a class="jxr_linenumber" name="2448" href="#2448">2448</a>   }
+<a class="jxr_linenumber" name="2449" href="#2449">2449</a> 
+<a class="jxr_linenumber" name="2450" href="#2450">2450</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> MIN_RANDOM_PORT = 0xc000;
+<a class="jxr_linenumber" name="2451" href="#2451">2451</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> MAX_RANDOM_PORT = 0xfffe;
+<a class="jxr_linenumber" name="2452" href="#2452">2452</a>   <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> Random random = <strong class="jxr_keyword">new</strong> Random();
+<a class="jxr_linenumber" name="2453" href="#2453">2453</a> 
+<a class="jxr_linenumber" name="2454" href="#2454">2454</a>   <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="2455" href="#2455">2455</a> <em class="jxr_javadoccomment">   * Returns a random port. These ports cannot be registered with IANA and are</em>
+<a class="jxr_linenumber" name="2456" href="#2456">2456</a> <em class="jxr_javadoccomment">   * intended for dynamic allocation (see <a href="http://bit.ly/dynports)." target="alexandria_uri">http://bit.ly/dynports).</a></em>
+<a class="jxr_linenumber" name="2457" href="#2457">2457</a> <em class="jxr_javadoccomment">   */</em>
+<a class="jxr_linenumber" name="2458" href="#2458">2458</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> randomPort() {
+<a class="jxr_linenumber" name="2459" href="#2459">2459</a>     <strong class="jxr_keyword">return</strong> MIN_RANDOM_PORT
+<a class="jxr_linenumber" name="2460" href="#2460">2460</a>         + random.nextInt(MAX_RANDOM_PORT - MIN_RANDOM_PORT);
+<a class="jxr_linenumber" name="2461" href="#2461">2461</a>   }
+<a class="jxr_linenumber" name="2462" href="#2462">2462</a> 
+<a class="jxr_linenumber" name="2463" href="#2463">2463</a>   <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="2464" href="#2464">2464</a> <em class="jxr_javadoccomment">   * Returns a random free port and marks that port as taken. Not thread-safe. Expected to be</em>
+<a class="jxr_linenumber" name="2465" href="#2465">2465</a> <em class="jxr_javadoccomment">   * called from single-threaded test setup code/</em>
+<a class="jxr_linenumber" name="2466" href="#2466">2466</a> <em class="jxr_javadoccomment">   */</em>
+<a class="jxr_linenumber" name="2467" href="#2467">2467</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> randomFreePort() {
+<a class="jxr_linenumber" name="2468" href="#2468">2468</a>     <strong class="jxr_keyword">int</strong> port = 0;
+<a class="jxr_linenumber" name="2469" href="#2469">2469</a>     <strong class="jxr_keyword">do</strong> {
+<a class="jxr_linenumber" name="2470" href="#2470">2470</a>       port = randomPort();
+<a class="jxr_linenumber" name="2471" href="#2471">2471</a>       <strong class="jxr_keyword">if</strong> (takenRandomPorts.contains(port)) {
+<a class="jxr_linenumber" name="2472" href="#2472">2472</a>         <strong class="jxr_keyword">continue</strong>;
+<a class="jxr_linenumber" name="2473" href="#2473">2473</a>       }
+<a class="jxr_linenumber" name="2474" href="#2474">2474</a>       takenRandomPorts.add(port);
+<a class="jxr_linenumber" name="2475" href="#2475">2475</a> 
+<a class="jxr_linenumber" name="2476" href="#2476">2476</a>       <strong class="jxr_keyword">try</strong> {
+<a class="jxr_linenumber" name="2477" href="#2477">2477</a>         ServerSocket sock = <strong class="jxr_keyword">new</strong> ServerSocket(port);
+<a class="jxr_linenumber" name="2478" href="#2478">2478</a>         sock.close();
+<a class="jxr_linenumber" name="2479" href="#2479">2479</a>       } <strong class="jxr_keyword">catch</strong> (IOException ex) {
+<a class="jxr_linenumber" name="2480" href="#2480">2480</a>         port = 0;
+<a class="jxr_linenumber" name="2481" href="#2481">2481</a>       }
+<a class="jxr_linenumber" name="2482" href="#2482">2482</a>     } <strong class="jxr_keyword">while</strong> (port == 0);
+<a class="jxr_linenumber" name="2483" href="#2483">2483</a>     <strong class="jxr_keyword">return</strong> port;
+<a class="jxr_linenumber" name="2484" href="#2484">2484</a>   }
+<a class="jxr_linenumber" name="2485" href="#2485">2485</a> 
+<a class="jxr_linenumber" name="2486" href="#2486">2486</a> 
+<a class="jxr_linenumber" name="2487" href="#2487">2487</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> String randomMultiCastAddress() {
+<a class="jxr_linenumber" name="2488" href="#2488">2488</a>     <strong class="jxr_keyword">return</strong> <span class="jxr_string">"226.1.1."</span> + random.nextInt(254);
+<a class="jxr_linenumber" name="2489" href="#2489">2489</a>   }
+<a class="jxr_linenumber" name="2490" href="#2490">2490</a> 
+<a class="jxr_linenumber" name="2491" href="#2491">2491</a> 
+<a class="jxr_linenumber" name="2492" href="#2492">2492</a> 
+<a class="jxr_linenumber" name="2493" href="#2493">2493</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">void</strong> waitForHostPort(String host, <strong class="jxr_keyword">int</strong> port)
+<a class="jxr_linenumber" name="2494" href="#2494">2494</a>       <strong class="jxr_keyword">throws</strong> IOException {
+<a class="jxr_linenumber" name="2495" href="#2495">2495</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> maxTimeMs = 10000;
+<a class="jxr_linenumber" name="2496" href="#2496">2496</a>     <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> maxNumAttempts = maxTimeMs / HConstants.SOCKET_RETRY_WAIT_MS;
+<a class="jxr_linenumber" name="2497" href="#2497">2497</a>     IOException savedException = <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="2498" href="#2498">2498</a>     LOG.info(<span class="jxr_string">"Waiting for server at "</span> + host + <span class="jxr_string">":"</span> + port);
+<a class="jxr_linenumber" name="2499" href="#2499">2499</a>     <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> attempt = 0; attempt &lt; maxNumAttempts; ++attempt) {
+<a class="jxr_linenumber" name="2500" href="#2500">2500</a>       <strong class="jxr_keyword">try</strong> {
+<a class="jxr_linenumber" name="2501" href="#2501">2501</a>         Socket sock = <strong class="jxr_keyword">new</strong> Socket(InetAddress.getByName(host), port);
+<a class="jxr_linenumber" name="2502" href="#2502">2502</a>         sock.close();
+<a class="jxr_linenumber" name="2503" href="#2503">2503</a>         savedException = <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="2504" href="#2504">2504</a>         LOG.info(<span class="jxr_string">"Server at "</span> + host + <span class="jxr_string">":"</span> + port + <span class="jxr_string">" is available"</span>);
+<a class="jxr_linenumber" name="2505" href="#2505">2505</a>         <strong class="jxr_keyword">break</strong>;
+<a class="jxr_linenumber" name="2506" href="#2506">2506</a>       } <strong class="jxr_keyword">catch</strong> (UnknownHostException e) {
+<a class="jxr_linenumber" name="2507" href="#2507">2507</a>         <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IOException(<span class="jxr_string">"Failed to look up "</span> + host, e);
+<a class="jxr_linenumber" name="2508" href="#2508">2508</a>       } <strong class="jxr_keyword">catch</strong> (IOException e) {
+<a class="jxr_linenumber" name="2509" href="#2509">2509</a>         savedException = e;
+<a class="jxr_linenumber" name="2510" href="#2510">2510</a>       }
+<a class="jxr_linenumber" name="2511" href="#2511">2511</a>       Threads.sleepWithoutInterrupt(HConstants.SOCKET_RETRY_WAIT_MS);
+<a class="jxr_linenumber" name="2512" href="#2512">2512</a>     }
+<a class="jxr_linenumber" name="2513" href="#2513">2513</a> 
+<a class="jxr_linenumber" name="2514" href="#2514">2514</a>     <strong class="jxr_keyword">if</strong> (savedException != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="2515" href="#2515">2515</a>       <strong class="jxr_keyword">throw</strong> savedException;
+<a class="jxr_linenumber" name="2516" href="#2516">2516</a>     }
+<a class="jxr_linenumber" name="2517" href="#2517">2517</a>   }
+<a class="jxr_linenumber" name="2518" href="#2518">2518</a> 
+<a class="jxr_linenumber" name="2519" href="#2519">2519</a>   <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="2520" href="#2520">2520</a> <em class="jxr_javadoccomment">   * Creates a pre-split table for load testing. If the table already exists,</em>
+<a class="jxr_linenumber" name="2521" href="#2521">2521</a> <em class="jxr_javadoccomment">   * logs a warning and continues.</em>
+<a class="jxr_linenumber" name="2522" href="#2522">2522</a> <em class="jxr_javadoccomment">   * @return the number of regions the table was split into</em>
+<a class="jxr_linenumber" name="2523" href="#2523">2523</a> <em class="jxr_javadoccomment">   */</em>
+<a class="jxr_linenumber" name="2524" href="#2524">2524</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> createPreSplitLoadTestTable(Configuration conf,
+<a class="jxr_linenumber" name="2525" href="#2525">2525</a>       byte[] tableName, byte[] columnFamily, Algorithm compression,
+<a class="jxr_linenumber" name="2526" href="#2526">2526</a>       DataBlockEncoding dataBlockEncoding) <strong class="jxr_keyword">throws</strong> IOException {
+<a class="jxr_linenumber" name="2527" href="#2527">2527</a>     HTableDescriptor desc = <strong class="jxr_keyword">new</strong> HTableDescriptor(tableName);
+<a class="jxr_linenumber" name="2528" href="#2528">2528</a>     HColumnDescriptor hcd = <strong class="jxr_keyword">new</strong> HColumnDescriptor(columnFamily);
+<a class="jxr_linenumber" name="2529" href="#2529">2529</a>     hcd.setDataBlockEncoding(dataBlockEncoding);
+<a class="jxr_linenumber" name="2530" href="#2530">2530</a>     hcd.setCompressionType(compression);
+<a class="jxr_linenumber" name="2531" href="#2531">2531</a>     <strong class="jxr_keyword">return</strong> createPreSplitLoadTestTable(conf, desc, hcd);
+<a class="jxr_linenumber" name="2532" href="#2532">2532</a>   }
+<a class="jxr_linenumber" name="2533" href="#2533">2533</a> 
+<a class="jxr_linenumber" name="2534" href="#2534">2534</a>   <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="2535" href="#2535">2535</a> <em class="jxr_javadoccomment">   * Creates a pre-split table for load testing. If the table already exists,</em>
+<a class="jxr_linenumber" name="2536" href="#2536">2536</a> <em class="jxr_javadoccomment">   * logs a warning and continues.</em>
+<a class="jxr_linenumber" name="2537" href="#2537">2537</a> <em class="jxr_javadoccomment">   * @return the number of regions the table was split into</em>
+<a class="jxr_linenumber" name="2538" href="#2538">2538</a> <em class="jxr_javadoccomment">   */</em>
+<a class="jxr_linenumber" name="2539" href="#2539">2539</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> createPreSplitLoadTestTable(Configuration conf,
+<a class="jxr_linenumber" name="2540" href="#2540">2540</a>       HTableDescriptor desc, HColumnDescriptor hcd) <strong class="jxr_keyword">throws</strong> IOException {
+<a class="jxr_linenumber" name="2541" href="#2541">2541</a>     <strong class="jxr_keyword">if</strong> (!desc.hasFamily(hcd.getName())) {
+<a class="jxr_linenumber" name="2542" href="#2542">2542</a>       desc.addFamily(hcd);
+<a class="jxr_linenumber" name="2543" href="#2543">2543</a>     }
 <a class="jxr_linenumber" name="2544" href="#2544">2544</a> 
-<a class="jxr_linenumber" name="2545" href="#2545">2545</a>       admin.createTable(desc, splits);
-<a class="jxr_linenumber" name="2546" href="#2546">2546</a>       admin.close();
-<a class="jxr_linenumber" name="2547" href="#2547">2547</a>     } <strong class="jxr_keyword">catch</strong> (MasterNotRunningException e) {
-<a class="jxr_linenumber" name="2548" href="#2548">2548</a>       LOG.error(<span class="jxr_string">"Master not running"</span>, e);
-<a class="jxr_linenumber" name="2549" href="#2549">2549</a>       <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> IOException(e);
-<a class="jxr_linenumber" name="2550" href="#2550">2550</a>     } <strong class="jxr_keyword">catch</strong> (TableExistsException e) {
-<a class="jxr_linenumber" name="2551" href="#2551">2551</a>       LOG.warn(<span class="jxr_string">"Table "</span> + Bytes.toStringBinary(desc.getName()) +
-<a class="jxr_linenumber" name="2552" href="#2552">2552</a>           <span class="jxr_string">" already exists, continuing"</span>);
-<a class="jxr_linenumber" name="2553" href="#2553">2553</a>     } <strong class="jxr_keyword">finally</strong> {
-<a class="jxr_linenumber" name="2554" href="#2554">2554</a>       admin.close();
-<a class="jxr_linenumber" name="2555" href="#2555">2555</a>     }
-<a class="jxr_linenumber" name="2556" href="#2556">2556</a>     <strong class="jxr_keyword">return</strong> totalNumberOfRegions;
-<a class="jxr_linenumber" name="2557" href="#2557">2557</a>   }
-<a class="jxr_linenumber" name="2558" href="#2558">2558</a> 
-<a class="jxr_linenumber" name="2559" href="#2559">2559</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">int</strong> getMetaRSPort(Configuration conf) <strong class="jxr_keyword">throws</strong> IOException {
-<a class="jxr_linenumber" name="2560" href="#2560">2560</a>     HTable table = <strong class="jxr_keyword">new</strong> HTable(conf, HConstants.META_TABLE_NAME);
-<a class="jxr_linenumber" name="2561" href="#2561">2561</a>     HRegionLocation hloc = table.getRegionLocation(Bytes.toBytes(<span class="jxr_string">""</span>));
-<a class="jxr_linenumber" name="2562" href="#2562">2562</a>     table.close();
-<a class="jxr_linenumber" name="2563" href="#2563">2563</a>     <strong class="jxr_keyword">return</strong> hloc.getPort();
-<a class="jxr_linenumber" name="2564" href="#2564">2564</a>   }
-<a class="jxr_linenumber" name="2565" href="#2565">2565</a> 
-<a class="jxr_linenumber" name="2566" href="#2566">2566</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2567" href="#2567">2567</a> <em class="jxr_javadoccomment">   *  Due to async racing issue, a region may not be in</em>
-<a class="jxr_linenumber" name="2568" href="#2568">2568</a> <em class="jxr_javadoccomment">   *  the online region list of a region server yet, after</em>
-<a class="jxr_linenumber" name="2569" href="#2569">2569</a> <em class="jxr_javadoccomment">   *  the assignment znode is deleted and the new assignment</em>
-<a class="jxr_linenumber" name="2570" href="#2570">2570</a> <em class="jxr_javadoccomment">   *  is recorded in master.</em>
-<a class="jxr_linenumber" name="2571" href="#2571">2571</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2572" href="#2572">2572</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> assertRegionOnServer(
-<a class="jxr_linenumber" name="2573" href="#2573">2573</a>       <strong class="jxr_keyword">final</strong> HRegionInfo hri, <strong class="jxr_keyword">final</strong> ServerName server,
-<a class="jxr_linenumber" name="2574" href="#2574">2574</a>       <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">long</strong> timeout) <strong class="jxr_keyword">throws</strong> IOException, InterruptedException {
-<a class="jxr_linenumber" name="2575" href="#2575">2575</a>     <strong class="jxr_keyword">long</strong> timeoutTime = System.currentTimeMillis() + timeout;
-<a class="jxr_linenumber" name="2576" href="#2576">2576</a>     <strong class="jxr_keyword">while</strong> (<strong class="jxr_keyword">true</strong>) {
-<a class="jxr_linenumber" name="2577" href="#2577">2577</a>       List&lt;HRegionInfo&gt; regions = getHBaseAdmin().getOnlineRegions(server);
-<a class="jxr_linenumber" name="2578" href="#2578">2578</a>       <strong class="jxr_keyword">if</strong> (regions.contains(hri)) <strong class="jxr_keyword">return</strong>;
-<a class="jxr_linenumber" name="2579" href="#2579">2579</a>       <strong class="jxr_keyword">long</strong> now = System.currentTimeMillis();
-<a class="jxr_linenumber" name="2580" href="#2580">2580</a>       <strong class="jxr_keyword">if</strong> (now &gt; timeoutTime) <strong class="jxr_keyword">break</strong>;
-<a class="jxr_linenumber" name="2581" href="#2581">2581</a>       Thread.sleep(10);
-<a class="jxr_linenumber" name="2582" href="#2582">2582</a>     }
-<a class="jxr_linenumber" name="2583" href="#2583">2583</a>     fail(<span class="jxr_string">"Could not find region "</span> + hri.getRegionNameAsString()
-<a class="jxr_linenumber" name="2584" href="#2584">2584</a>       + <span class="jxr_string">" on server "</span> + server);
-<a class="jxr_linenumber" name="2585" href="#2585">2585</a>   }
-<a class="jxr_linenumber" name="2586" href="#2586">2586</a> 
-<a class="jxr_linenumber" name="2587" href="#2587">2587</a>   <strong class="jxr_keyword">public</strong> HRegion createTestRegion(String tableName, HColumnDescriptor hcd)
-<a class="jxr_linenumber" name="2588" href="#2588">2588</a>       <strong class="jxr_keyword">throws</strong> IOException {
-<a class="jxr_linenumber" name="2589" href="#2589">2589</a>     HTableDescriptor htd = <strong class="jxr_keyword">new</strong> HTableDescriptor(tableName);
-<a class="jxr_linenumber" name="2590" href="#2590">2590</a>     htd.addFamily(hcd);
-<a class="jxr_linenumber" name="2591" href="#2591">2591</a>     HRegionInfo info =
-<a class="jxr_linenumber" name="2592" href="#2592">2592</a>         <strong class="jxr_keyword">new</strong> HRegionInfo(Bytes.toBytes(tableName), <strong class="jxr_keyword">null</strong>, <strong class="jxr_keyword">null</strong>, false);
-<a class="jxr_linenumber" name="2593" href="#2593">2593</a>     HRegion region =
-<a class="jxr_linenumber" name="2594" href="#2594">2594</a>         HRegion.createHRegion(info, getDataTestDir(), getConfiguration(), htd);
-<a class="jxr_linenumber" name="2595" href="#2595">2595</a>     <strong class="jxr_keyword">return</strong> region;
-<a class="jxr_linenumber" name="2596" href="#2596">2596</a>   }
-<a class="jxr_linenumber" name="2597" href="#2597">2597</a> 
-<a class="jxr_linenumber" name="2598" href="#2598">2598</a>   <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> setFileSystemURI(String fsURI) {
-<a class="jxr_linenumber" name="2599" href="#2599">2599</a>     FS_URI = fsURI;
-<a class="jxr_linenumber" name="2600" href="#2600">2600</a>   }
-<a class="jxr_linenumber" name="2601" href="#2601">2601</a> 
-<a class="jxr_linenumber" name="2602" href="#2602">2602</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2603" href="#2603">2603</a> <em class="jxr_javadoccomment">   * Wrapper method for {@link Waiter#waitFor(Configuration, long, Predicate)}.</em>
-<a class="jxr_linenumber" name="2604" href="#2604">2604</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2605" href="#2605">2605</a>   <strong class="jxr_keyword">public</strong> &lt;E <strong class="jxr_keyword">extends</strong> Exception&gt; <strong class="jxr_keyword">long</strong> waitFor(<strong class="jxr_keyword">long</strong> timeout, Predicate&lt;E&gt; predicate)
-<a class="jxr_linenumber" name="2606" href="#2606">2606</a>       <strong class="jxr_keyword">throws</strong> E {
-<a class="jxr_linenumber" name="2607" href="#2607">2607</a>     <strong class="jxr_keyword">return</strong> Waiter.waitFor(<strong class="jxr_keyword">this</strong>.conf, timeout, predicate);
-<a class="jxr_linenumber" name="2608" href="#2608">2608</a>   }
-<a class="jxr_linenumber" name="2609" href="#2609">2609</a> 
-<a class="jxr_linenumber" name="2610" href="#2610">2610</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2611" href="#2611">2611</a> <em class="jxr_javadoccomment">   * Wrapper method for {@link Waiter#waitFor(Configuration, long, long, Predicate)}.</em>
-<a class="jxr_linenumber" name="2612" href="#2612">2612</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2613" href="#2613">2613</a>   <strong class="jxr_keyword">public</strong> &lt;E <strong class="jxr_keyword">extends</strong> Exception&gt; <strong class="jxr_keyword">long</strong> waitFor(<strong class="jxr_keyword">long</strong> timeout, <strong class="jxr_keyword">long</strong> interval, Predicate&lt;E&gt; predicate)
-<a class="jxr_linenumber" name="2614" href="#2614">2614</a>       <strong class="jxr_keyword">throws</strong> E {
-<a class="jxr_linenumber" name="2615" href="#2615">2615</a>     <strong class="jxr_keyword">return</strong> Waiter.waitFor(<strong class="jxr_keyword">this</strong>.conf, timeout, interval, predicate);
-<a class="jxr_linenumber" name="2616" href="#2616">2616</a>   }
-<a class="jxr_linenumber" name="2617" href="#2617">2617</a> 
-<a class="jxr_linenumber" name="2618" href="#2618">2618</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2619" href="#2619">2619</a> <em class="jxr_javadoccomment">   * Wrapper method for {@link Waiter#waitFor(Configuration, long, long, boolean, Predicate)}.</em>
-<a class="jxr_linenumber" name="2620" href="#2620">2620</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2621" href="#2621">2621</a>   <strong class="jxr_keyword">public</strong> &lt;E <strong class="jxr_keyword">extends</strong> Exception&gt; <strong class="jxr_keyword">long</strong> waitFor(<strong class="jxr_keyword">long</strong> timeout, <strong class="jxr_keyword">long</strong> interval,
-<a class="jxr_linenumber" name="2622" href="#2622">2622</a>       <strong class="jxr_keyword">boolean</strong> failIfTimeout, Predicate&lt;E&gt; predicate) <strong class="jxr_keyword">throws</strong> E {
-<a class="jxr_linenumber" name="2623" href="#2623">2623</a>     <strong class="jxr_keyword">return</strong> Waiter.waitFor(<strong class="jxr_keyword">this</strong>.conf, timeout, interval, failIfTimeout, predicate);
-<a class="jxr_linenumber" name="2624" href="#2624">2624</a>   }
-<a class="jxr_linenumber" name="2625" href="#2625">2625</a> 
-<a class="jxr_linenumber" name="2626" href="#2626">2626</a>   <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="2627" href="#2627">2627</a> <em class="jxr_javadoccomment">   * Returns a {@link Predicate} for checking that there are no regions in transition in master</em>
-<a class="jxr_linenumber" name="2628" href="#2628">2628</a> <em class="jxr_javadoccomment">   */</em>
-<a class="jxr_linenumber" name="2629" href="#2629">2629</a>   <strong class="jxr_keyword">public</strong> Waiter.Predicate&lt;Exception&gt; predicateNoRegionsInTransition() {
-<a class="jxr_linenumber" name="2630" href="#2630">2630</a>     <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> Waiter.Predicate&lt;Exception&gt;() {
-<a class="jxr_linenumber" name="2631" href="#2631">2631</a>       @Override
-<a class="jxr_linenumber" name="2632" href="#2632">2632</a>       <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> evaluate() <strong class="jxr_keyword">throws</strong> Exception {

[... 127 lines stripped ...]


Mime
View raw message