hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject [01/51] [partial] hbase-site git commit: Published site at 2f5767376f42c0416e025df412e3d5944a1b2a67.
Date Wed, 03 Feb 2016 17:25:34 GMT
Repository: hbase-site
Updated Branches:
  refs/heads/asf-site 4bb5e366b -> 6a13df3e1


http://git-wip-us.apache.org/repos/asf/hbase-site/blob/6a13df3e/testdevapidocs/src-html/org/apache/hadoop/hbase/regionserver/TestHRegion.Incrementer.html
----------------------------------------------------------------------
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/regionserver/TestHRegion.Incrementer.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/regionserver/TestHRegion.Incrementer.html
index f538aaa..99eccfd 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/regionserver/TestHRegion.Incrementer.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/regionserver/TestHRegion.Incrementer.html
@@ -5018,1055 +5018,1055 @@
 <span class="sourceLineNo">5010</span>        put.addColumn(family, qf, null);<a name="line.5010"></a>
 <span class="sourceLineNo">5011</span>      }<a name="line.5011"></a>
 <span class="sourceLineNo">5012</span>      region.put(put);<a name="line.5012"></a>
-<span class="sourceLineNo">5013</span>    }<a name="line.5013"></a>
-<span class="sourceLineNo">5014</span>  }<a name="line.5014"></a>
-<span class="sourceLineNo">5015</span><a name="line.5015"></a>
-<span class="sourceLineNo">5016</span>  static void verifyData(HRegion newReg, int startRow, int numRows, byte[] qf, byte[]... families)<a name="line.5016"></a>
-<span class="sourceLineNo">5017</span>      throws IOException {<a name="line.5017"></a>
-<span class="sourceLineNo">5018</span>    for (int i = startRow; i &lt; startRow + numRows; i++) {<a name="line.5018"></a>
-<span class="sourceLineNo">5019</span>      byte[] row = Bytes.toBytes("" + i);<a name="line.5019"></a>
-<span class="sourceLineNo">5020</span>      Get get = new Get(row);<a name="line.5020"></a>
-<span class="sourceLineNo">5021</span>      for (byte[] family : families) {<a name="line.5021"></a>
-<span class="sourceLineNo">5022</span>        get.addColumn(family, qf);<a name="line.5022"></a>
-<span class="sourceLineNo">5023</span>      }<a name="line.5023"></a>
-<span class="sourceLineNo">5024</span>      Result result = newReg.get(get);<a name="line.5024"></a>
-<span class="sourceLineNo">5025</span>      Cell[] raw = result.rawCells();<a name="line.5025"></a>
-<span class="sourceLineNo">5026</span>      assertEquals(families.length, result.size());<a name="line.5026"></a>
-<span class="sourceLineNo">5027</span>      for (int j = 0; j &lt; families.length; j++) {<a name="line.5027"></a>
-<span class="sourceLineNo">5028</span>        assertTrue(CellUtil.matchingRow(raw[j], row));<a name="line.5028"></a>
-<span class="sourceLineNo">5029</span>        assertTrue(CellUtil.matchingFamily(raw[j], families[j]));<a name="line.5029"></a>
-<span class="sourceLineNo">5030</span>        assertTrue(CellUtil.matchingQualifier(raw[j], qf));<a name="line.5030"></a>
-<span class="sourceLineNo">5031</span>      }<a name="line.5031"></a>
-<span class="sourceLineNo">5032</span>    }<a name="line.5032"></a>
-<span class="sourceLineNo">5033</span>  }<a name="line.5033"></a>
-<span class="sourceLineNo">5034</span><a name="line.5034"></a>
-<span class="sourceLineNo">5035</span>  static void assertGet(final HRegion r, final byte[] family, final byte[] k) throws IOException {<a name="line.5035"></a>
-<span class="sourceLineNo">5036</span>    // Now I have k, get values out and assert they are as expected.<a name="line.5036"></a>
-<span class="sourceLineNo">5037</span>    Get get = new Get(k).addFamily(family).setMaxVersions();<a name="line.5037"></a>
-<span class="sourceLineNo">5038</span>    Cell[] results = r.get(get).rawCells();<a name="line.5038"></a>
-<span class="sourceLineNo">5039</span>    for (int j = 0; j &lt; results.length; j++) {<a name="line.5039"></a>
-<span class="sourceLineNo">5040</span>      byte[] tmp = CellUtil.cloneValue(results[j]);<a name="line.5040"></a>
-<span class="sourceLineNo">5041</span>      // Row should be equal to value every time.<a name="line.5041"></a>
-<span class="sourceLineNo">5042</span>      assertTrue(Bytes.equals(k, tmp));<a name="line.5042"></a>
-<span class="sourceLineNo">5043</span>    }<a name="line.5043"></a>
-<span class="sourceLineNo">5044</span>  }<a name="line.5044"></a>
-<span class="sourceLineNo">5045</span><a name="line.5045"></a>
-<span class="sourceLineNo">5046</span>  /*<a name="line.5046"></a>
-<span class="sourceLineNo">5047</span>   * Assert first value in the passed region is &lt;code&gt;firstValue&lt;/code&gt;.<a name="line.5047"></a>
-<span class="sourceLineNo">5048</span>   *<a name="line.5048"></a>
-<span class="sourceLineNo">5049</span>   * @param r<a name="line.5049"></a>
-<span class="sourceLineNo">5050</span>   *<a name="line.5050"></a>
-<span class="sourceLineNo">5051</span>   * @param fs<a name="line.5051"></a>
-<span class="sourceLineNo">5052</span>   *<a name="line.5052"></a>
-<span class="sourceLineNo">5053</span>   * @param firstValue<a name="line.5053"></a>
-<span class="sourceLineNo">5054</span>   *<a name="line.5054"></a>
-<span class="sourceLineNo">5055</span>   * @throws IOException<a name="line.5055"></a>
-<span class="sourceLineNo">5056</span>   */<a name="line.5056"></a>
-<span class="sourceLineNo">5057</span>  private void assertScan(final HRegion r, final byte[] fs, final byte[] firstValue)<a name="line.5057"></a>
-<span class="sourceLineNo">5058</span>      throws IOException {<a name="line.5058"></a>
-<span class="sourceLineNo">5059</span>    byte[][] families = { fs };<a name="line.5059"></a>
-<span class="sourceLineNo">5060</span>    Scan scan = new Scan();<a name="line.5060"></a>
-<span class="sourceLineNo">5061</span>    for (int i = 0; i &lt; families.length; i++)<a name="line.5061"></a>
-<span class="sourceLineNo">5062</span>      scan.addFamily(families[i]);<a name="line.5062"></a>
-<span class="sourceLineNo">5063</span>    InternalScanner s = r.getScanner(scan);<a name="line.5063"></a>
-<span class="sourceLineNo">5064</span>    try {<a name="line.5064"></a>
-<span class="sourceLineNo">5065</span>      List&lt;Cell&gt; curVals = new ArrayList&lt;Cell&gt;();<a name="line.5065"></a>
-<span class="sourceLineNo">5066</span>      boolean first = true;<a name="line.5066"></a>
-<span class="sourceLineNo">5067</span>      OUTER_LOOP: while (s.next(curVals)) {<a name="line.5067"></a>
-<span class="sourceLineNo">5068</span>        for (Cell kv : curVals) {<a name="line.5068"></a>
-<span class="sourceLineNo">5069</span>          byte[] val = CellUtil.cloneValue(kv);<a name="line.5069"></a>
-<span class="sourceLineNo">5070</span>          byte[] curval = val;<a name="line.5070"></a>
-<span class="sourceLineNo">5071</span>          if (first) {<a name="line.5071"></a>
-<span class="sourceLineNo">5072</span>            first = false;<a name="line.5072"></a>
-<span class="sourceLineNo">5073</span>            assertTrue(Bytes.compareTo(curval, firstValue) == 0);<a name="line.5073"></a>
-<span class="sourceLineNo">5074</span>          } else {<a name="line.5074"></a>
-<span class="sourceLineNo">5075</span>            // Not asserting anything. Might as well break.<a name="line.5075"></a>
-<span class="sourceLineNo">5076</span>            break OUTER_LOOP;<a name="line.5076"></a>
-<span class="sourceLineNo">5077</span>          }<a name="line.5077"></a>
-<span class="sourceLineNo">5078</span>        }<a name="line.5078"></a>
-<span class="sourceLineNo">5079</span>      }<a name="line.5079"></a>
-<span class="sourceLineNo">5080</span>    } finally {<a name="line.5080"></a>
-<span class="sourceLineNo">5081</span>      s.close();<a name="line.5081"></a>
-<span class="sourceLineNo">5082</span>    }<a name="line.5082"></a>
-<span class="sourceLineNo">5083</span>  }<a name="line.5083"></a>
-<span class="sourceLineNo">5084</span><a name="line.5084"></a>
-<span class="sourceLineNo">5085</span>  /**<a name="line.5085"></a>
-<span class="sourceLineNo">5086</span>   * Test that we get the expected flush results back<a name="line.5086"></a>
-<span class="sourceLineNo">5087</span>   * @throws IOException<a name="line.5087"></a>
-<span class="sourceLineNo">5088</span>   */<a name="line.5088"></a>
-<span class="sourceLineNo">5089</span>  @Test<a name="line.5089"></a>
-<span class="sourceLineNo">5090</span>  public void testFlushResult() throws IOException {<a name="line.5090"></a>
-<span class="sourceLineNo">5091</span>    String method = name.getMethodName();<a name="line.5091"></a>
-<span class="sourceLineNo">5092</span>    TableName tableName = TableName.valueOf(method);<a name="line.5092"></a>
-<span class="sourceLineNo">5093</span>    byte[] family = Bytes.toBytes("family");<a name="line.5093"></a>
-<span class="sourceLineNo">5094</span><a name="line.5094"></a>
-<span class="sourceLineNo">5095</span>    this.region = initHRegion(tableName, method, family);<a name="line.5095"></a>
-<span class="sourceLineNo">5096</span><a name="line.5096"></a>
-<span class="sourceLineNo">5097</span>    // empty memstore, flush doesn't run<a name="line.5097"></a>
-<span class="sourceLineNo">5098</span>    HRegion.FlushResult fr = region.flush(true);<a name="line.5098"></a>
-<span class="sourceLineNo">5099</span>    assertFalse(fr.isFlushSucceeded());<a name="line.5099"></a>
-<span class="sourceLineNo">5100</span>    assertFalse(fr.isCompactionNeeded());<a name="line.5100"></a>
-<span class="sourceLineNo">5101</span><a name="line.5101"></a>
-<span class="sourceLineNo">5102</span>    // Flush enough files to get up to the threshold, doesn't need compactions<a name="line.5102"></a>
-<span class="sourceLineNo">5103</span>    for (int i = 0; i &lt; 2; i++) {<a name="line.5103"></a>
-<span class="sourceLineNo">5104</span>      Put put = new Put(tableName.toBytes()).addColumn(family, family, tableName.toBytes());<a name="line.5104"></a>
-<span class="sourceLineNo">5105</span>      region.put(put);<a name="line.5105"></a>
-<span class="sourceLineNo">5106</span>      fr = region.flush(true);<a name="line.5106"></a>
-<span class="sourceLineNo">5107</span>      assertTrue(fr.isFlushSucceeded());<a name="line.5107"></a>
-<span class="sourceLineNo">5108</span>      assertFalse(fr.isCompactionNeeded());<a name="line.5108"></a>
-<span class="sourceLineNo">5109</span>    }<a name="line.5109"></a>
-<span class="sourceLineNo">5110</span><a name="line.5110"></a>
-<span class="sourceLineNo">5111</span>    // Two flushes after the threshold, compactions are needed<a name="line.5111"></a>
-<span class="sourceLineNo">5112</span>    for (int i = 0; i &lt; 2; i++) {<a name="line.5112"></a>
-<span class="sourceLineNo">5113</span>      Put put = new Put(tableName.toBytes()).addColumn(family, family, tableName.toBytes());<a name="line.5113"></a>
-<span class="sourceLineNo">5114</span>      region.put(put);<a name="line.5114"></a>
-<span class="sourceLineNo">5115</span>      fr = region.flush(true);<a name="line.5115"></a>
-<span class="sourceLineNo">5116</span>      assertTrue(fr.isFlushSucceeded());<a name="line.5116"></a>
-<span class="sourceLineNo">5117</span>      assertTrue(fr.isCompactionNeeded());<a name="line.5117"></a>
-<span class="sourceLineNo">5118</span>    }<a name="line.5118"></a>
-<span class="sourceLineNo">5119</span>  }<a name="line.5119"></a>
-<span class="sourceLineNo">5120</span><a name="line.5120"></a>
-<span class="sourceLineNo">5121</span>  private Configuration initSplit() {<a name="line.5121"></a>
-<span class="sourceLineNo">5122</span>    // Always compact if there is more than one store file.<a name="line.5122"></a>
-<span class="sourceLineNo">5123</span>    CONF.setInt("hbase.hstore.compactionThreshold", 2);<a name="line.5123"></a>
-<span class="sourceLineNo">5124</span><a name="line.5124"></a>
-<span class="sourceLineNo">5125</span>    // Make lease timeout longer, lease checks less frequent<a name="line.5125"></a>
-<span class="sourceLineNo">5126</span>    CONF.setInt("hbase.master.lease.thread.wakefrequency", 5 * 1000);<a name="line.5126"></a>
-<span class="sourceLineNo">5127</span><a name="line.5127"></a>
-<span class="sourceLineNo">5128</span>    CONF.setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, 10 * 1000);<a name="line.5128"></a>
-<span class="sourceLineNo">5129</span><a name="line.5129"></a>
-<span class="sourceLineNo">5130</span>    // Increase the amount of time between client retries<a name="line.5130"></a>
-<span class="sourceLineNo">5131</span>    CONF.setLong("hbase.client.pause", 15 * 1000);<a name="line.5131"></a>
-<span class="sourceLineNo">5132</span><a name="line.5132"></a>
-<span class="sourceLineNo">5133</span>    // This size should make it so we always split using the addContent<a name="line.5133"></a>
-<span class="sourceLineNo">5134</span>    // below. After adding all data, the first region is 1.3M<a name="line.5134"></a>
-<span class="sourceLineNo">5135</span>    CONF.setLong(HConstants.HREGION_MAX_FILESIZE, 1024 * 128);<a name="line.5135"></a>
-<span class="sourceLineNo">5136</span>    return CONF;<a name="line.5136"></a>
-<span class="sourceLineNo">5137</span>  }<a name="line.5137"></a>
-<span class="sourceLineNo">5138</span><a name="line.5138"></a>
-<span class="sourceLineNo">5139</span>  /**<a name="line.5139"></a>
-<span class="sourceLineNo">5140</span>   * @param tableName<a name="line.5140"></a>
-<span class="sourceLineNo">5141</span>   * @param callingMethod<a name="line.5141"></a>
-<span class="sourceLineNo">5142</span>   * @param conf<a name="line.5142"></a>
-<span class="sourceLineNo">5143</span>   * @param families<a name="line.5143"></a>
-<span class="sourceLineNo">5144</span>   * @throws IOException<a name="line.5144"></a>
-<span class="sourceLineNo">5145</span>   * @return A region on which you must call<a name="line.5145"></a>
-<span class="sourceLineNo">5146</span>   *         {@link HBaseTestingUtility#closeRegionAndWAL(HRegion)} when done.<a name="line.5146"></a>
-<span class="sourceLineNo">5147</span>   */<a name="line.5147"></a>
-<span class="sourceLineNo">5148</span>  private static HRegion initHRegion(TableName tableName, String callingMethod, Configuration conf,<a name="line.5148"></a>
-<span class="sourceLineNo">5149</span>      byte[]... families) throws IOException {<a name="line.5149"></a>
-<span class="sourceLineNo">5150</span>    return initHRegion(tableName, null, null, callingMethod, conf, false, families);<a name="line.5150"></a>
-<span class="sourceLineNo">5151</span>  }<a name="line.5151"></a>
-<span class="sourceLineNo">5152</span><a name="line.5152"></a>
-<span class="sourceLineNo">5153</span>  /**<a name="line.5153"></a>
-<span class="sourceLineNo">5154</span>   * @param tableName<a name="line.5154"></a>
-<span class="sourceLineNo">5155</span>   * @param callingMethod<a name="line.5155"></a>
-<span class="sourceLineNo">5156</span>   * @param conf<a name="line.5156"></a>
-<span class="sourceLineNo">5157</span>   * @param isReadOnly<a name="line.5157"></a>
-<span class="sourceLineNo">5158</span>   * @param families<a name="line.5158"></a>
-<span class="sourceLineNo">5159</span>   * @throws IOException<a name="line.5159"></a>
-<span class="sourceLineNo">5160</span>   * @return A region on which you must call<a name="line.5160"></a>
-<span class="sourceLineNo">5161</span>   *         {@link HBaseTestingUtility#closeRegionAndWAL(HRegion)} when done.<a name="line.5161"></a>
-<span class="sourceLineNo">5162</span>   */<a name="line.5162"></a>
-<span class="sourceLineNo">5163</span>  private static HRegion initHRegion(TableName tableName, String callingMethod, Configuration conf,<a name="line.5163"></a>
-<span class="sourceLineNo">5164</span>      boolean isReadOnly, byte[]... families) throws IOException {<a name="line.5164"></a>
-<span class="sourceLineNo">5165</span>    return initHRegion(tableName, null, null, callingMethod, conf, isReadOnly, families);<a name="line.5165"></a>
-<span class="sourceLineNo">5166</span>  }<a name="line.5166"></a>
-<span class="sourceLineNo">5167</span><a name="line.5167"></a>
-<span class="sourceLineNo">5168</span>  public static HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopKey,<a name="line.5168"></a>
-<span class="sourceLineNo">5169</span>      String callingMethod, Configuration conf, boolean isReadOnly, byte[]... families)<a name="line.5169"></a>
-<span class="sourceLineNo">5170</span>      throws IOException {<a name="line.5170"></a>
-<span class="sourceLineNo">5171</span>    Path logDir = TEST_UTIL.getDataTestDirOnTestFS(callingMethod + ".log");<a name="line.5171"></a>
-<span class="sourceLineNo">5172</span>    HRegionInfo hri = new HRegionInfo(tableName, startKey, stopKey);<a name="line.5172"></a>
-<span class="sourceLineNo">5173</span>    final WAL wal = HBaseTestingUtility.createWal(conf, logDir, hri);<a name="line.5173"></a>
-<span class="sourceLineNo">5174</span>    return initHRegion(tableName, startKey, stopKey, callingMethod, conf, isReadOnly,<a name="line.5174"></a>
-<span class="sourceLineNo">5175</span>        Durability.SYNC_WAL, wal, families);<a name="line.5175"></a>
-<span class="sourceLineNo">5176</span>  }<a name="line.5176"></a>
-<span class="sourceLineNo">5177</span><a name="line.5177"></a>
-<span class="sourceLineNo">5178</span>  /**<a name="line.5178"></a>
-<span class="sourceLineNo">5179</span>   * @param tableName<a name="line.5179"></a>
-<span class="sourceLineNo">5180</span>   * @param startKey<a name="line.5180"></a>
-<span class="sourceLineNo">5181</span>   * @param stopKey<a name="line.5181"></a>
-<span class="sourceLineNo">5182</span>   * @param callingMethod<a name="line.5182"></a>
-<span class="sourceLineNo">5183</span>   * @param conf<a name="line.5183"></a>
-<span class="sourceLineNo">5184</span>   * @param isReadOnly<a name="line.5184"></a>
-<span class="sourceLineNo">5185</span>   * @param families<a name="line.5185"></a>
-<span class="sourceLineNo">5186</span>   * @throws IOException<a name="line.5186"></a>
-<span class="sourceLineNo">5187</span>   * @return A region on which you must call<a name="line.5187"></a>
-<span class="sourceLineNo">5188</span>   *         {@link HBaseTestingUtility#closeRegionAndWAL(HRegion)} when done.<a name="line.5188"></a>
-<span class="sourceLineNo">5189</span>   */<a name="line.5189"></a>
-<span class="sourceLineNo">5190</span>  public static HRegion initHRegion(TableName tableName, byte[] startKey, byte[] stopKey,<a name="line.5190"></a>
-<span class="sourceLineNo">5191</span>      String callingMethod, Configuration conf, boolean isReadOnly, Durability durability,<a name="line.5191"></a>
-<span class="sourceLineNo">5192</span>      WAL wal, byte[]... families) throws IOException {<a name="line.5192"></a>
-<span class="sourceLineNo">5193</span>    return TEST_UTIL.createLocalHRegion(tableName, startKey, stopKey,<a name="line.5193"></a>
-<span class="sourceLineNo">5194</span>        isReadOnly, durability, wal, families);<a name="line.5194"></a>
-<span class="sourceLineNo">5195</span>  }<a name="line.5195"></a>
-<span class="sourceLineNo">5196</span><a name="line.5196"></a>
-<span class="sourceLineNo">5197</span>  /**<a name="line.5197"></a>
-<span class="sourceLineNo">5198</span>   * Assert that the passed in Cell has expected contents for the specified row,<a name="line.5198"></a>
-<span class="sourceLineNo">5199</span>   * column &amp; timestamp.<a name="line.5199"></a>
-<span class="sourceLineNo">5200</span>   */<a name="line.5200"></a>
-<span class="sourceLineNo">5201</span>  private void checkOneCell(Cell kv, byte[] cf, int rowIdx, int colIdx, long ts) {<a name="line.5201"></a>
-<span class="sourceLineNo">5202</span>    String ctx = "rowIdx=" + rowIdx + "; colIdx=" + colIdx + "; ts=" + ts;<a name="line.5202"></a>
-<span class="sourceLineNo">5203</span>    assertEquals("Row mismatch which checking: " + ctx, "row:" + rowIdx,<a name="line.5203"></a>
-<span class="sourceLineNo">5204</span>        Bytes.toString(CellUtil.cloneRow(kv)));<a name="line.5204"></a>
-<span class="sourceLineNo">5205</span>    assertEquals("ColumnFamily mismatch while checking: " + ctx, Bytes.toString(cf),<a name="line.5205"></a>
-<span class="sourceLineNo">5206</span>        Bytes.toString(CellUtil.cloneFamily(kv)));<a name="line.5206"></a>
-<span class="sourceLineNo">5207</span>    assertEquals("Column qualifier mismatch while checking: " + ctx, "column:" + colIdx,<a name="line.5207"></a>
-<span class="sourceLineNo">5208</span>        Bytes.toString(CellUtil.cloneQualifier(kv)));<a name="line.5208"></a>
-<span class="sourceLineNo">5209</span>    assertEquals("Timestamp mismatch while checking: " + ctx, ts, kv.getTimestamp());<a name="line.5209"></a>
-<span class="sourceLineNo">5210</span>    assertEquals("Value mismatch while checking: " + ctx, "value-version-" + ts,<a name="line.5210"></a>
-<span class="sourceLineNo">5211</span>        Bytes.toString(CellUtil.cloneValue(kv)));<a name="line.5211"></a>
-<span class="sourceLineNo">5212</span>  }<a name="line.5212"></a>
-<span class="sourceLineNo">5213</span><a name="line.5213"></a>
-<span class="sourceLineNo">5214</span>  @Test (timeout=60000)<a name="line.5214"></a>
-<span class="sourceLineNo">5215</span>  public void testReverseScanner_FromMemStore_SingleCF_Normal()<a name="line.5215"></a>
-<span class="sourceLineNo">5216</span>      throws IOException {<a name="line.5216"></a>
-<span class="sourceLineNo">5217</span>    byte[] rowC = Bytes.toBytes("rowC");<a name="line.5217"></a>
-<span class="sourceLineNo">5218</span>    byte[] rowA = Bytes.toBytes("rowA");<a name="line.5218"></a>
-<span class="sourceLineNo">5219</span>    byte[] rowB = Bytes.toBytes("rowB");<a name="line.5219"></a>
-<span class="sourceLineNo">5220</span>    byte[] cf = Bytes.toBytes("CF");<a name="line.5220"></a>
-<span class="sourceLineNo">5221</span>    byte[][] families = { cf };<a name="line.5221"></a>
-<span class="sourceLineNo">5222</span>    byte[] col = Bytes.toBytes("C");<a name="line.5222"></a>
-<span class="sourceLineNo">5223</span>    long ts = 1;<a name="line.5223"></a>
-<span class="sourceLineNo">5224</span>    String method = this.getName();<a name="line.5224"></a>
-<span class="sourceLineNo">5225</span>    this.region = initHRegion(tableName, method, families);<a name="line.5225"></a>
-<span class="sourceLineNo">5226</span>    try {<a name="line.5226"></a>
-<span class="sourceLineNo">5227</span>      KeyValue kv1 = new KeyValue(rowC, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5227"></a>
-<span class="sourceLineNo">5228</span>      KeyValue kv11 = new KeyValue(rowC, cf, col, ts + 1, KeyValue.Type.Put,<a name="line.5228"></a>
-<span class="sourceLineNo">5229</span>          null);<a name="line.5229"></a>
-<span class="sourceLineNo">5230</span>      KeyValue kv2 = new KeyValue(rowA, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5230"></a>
-<span class="sourceLineNo">5231</span>      KeyValue kv3 = new KeyValue(rowB, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5231"></a>
-<span class="sourceLineNo">5232</span>      Put put = null;<a name="line.5232"></a>
-<span class="sourceLineNo">5233</span>      put = new Put(rowC);<a name="line.5233"></a>
-<span class="sourceLineNo">5234</span>      put.add(kv1);<a name="line.5234"></a>
-<span class="sourceLineNo">5235</span>      put.add(kv11);<a name="line.5235"></a>
-<span class="sourceLineNo">5236</span>      region.put(put);<a name="line.5236"></a>
-<span class="sourceLineNo">5237</span>      put = new Put(rowA);<a name="line.5237"></a>
-<span class="sourceLineNo">5238</span>      put.add(kv2);<a name="line.5238"></a>
-<span class="sourceLineNo">5239</span>      region.put(put);<a name="line.5239"></a>
-<span class="sourceLineNo">5240</span>      put = new Put(rowB);<a name="line.5240"></a>
-<span class="sourceLineNo">5241</span>      put.add(kv3);<a name="line.5241"></a>
-<span class="sourceLineNo">5242</span>      region.put(put);<a name="line.5242"></a>
-<span class="sourceLineNo">5243</span><a name="line.5243"></a>
-<span class="sourceLineNo">5244</span>      Scan scan = new Scan(rowC);<a name="line.5244"></a>
-<span class="sourceLineNo">5245</span>      scan.setMaxVersions(5);<a name="line.5245"></a>
-<span class="sourceLineNo">5246</span>      scan.setReversed(true);<a name="line.5246"></a>
-<span class="sourceLineNo">5247</span>      InternalScanner scanner = region.getScanner(scan);<a name="line.5247"></a>
-<span class="sourceLineNo">5248</span>      List&lt;Cell&gt; currRow = new ArrayList&lt;Cell&gt;();<a name="line.5248"></a>
-<span class="sourceLineNo">5249</span>      boolean hasNext = scanner.next(currRow);<a name="line.5249"></a>
-<span class="sourceLineNo">5250</span>      assertEquals(2, currRow.size());<a name="line.5250"></a>
-<span class="sourceLineNo">5251</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5251"></a>
-<span class="sourceLineNo">5252</span>          .get(0).getRowLength(), rowC, 0, rowC.length));<a name="line.5252"></a>
-<span class="sourceLineNo">5253</span>      assertTrue(hasNext);<a name="line.5253"></a>
-<span class="sourceLineNo">5254</span>      currRow.clear();<a name="line.5254"></a>
-<span class="sourceLineNo">5255</span>      hasNext = scanner.next(currRow);<a name="line.5255"></a>
-<span class="sourceLineNo">5256</span>      assertEquals(1, currRow.size());<a name="line.5256"></a>
-<span class="sourceLineNo">5257</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5257"></a>
-<span class="sourceLineNo">5258</span>          .get(0).getRowLength(), rowB, 0, rowB.length));<a name="line.5258"></a>
-<span class="sourceLineNo">5259</span>      assertTrue(hasNext);<a name="line.5259"></a>
-<span class="sourceLineNo">5260</span>      currRow.clear();<a name="line.5260"></a>
-<span class="sourceLineNo">5261</span>      hasNext = scanner.next(currRow);<a name="line.5261"></a>
-<span class="sourceLineNo">5262</span>      assertEquals(1, currRow.size());<a name="line.5262"></a>
-<span class="sourceLineNo">5263</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5263"></a>
-<span class="sourceLineNo">5264</span>          .get(0).getRowLength(), rowA, 0, rowA.length));<a name="line.5264"></a>
-<span class="sourceLineNo">5265</span>      assertFalse(hasNext);<a name="line.5265"></a>
-<span class="sourceLineNo">5266</span>      scanner.close();<a name="line.5266"></a>
-<span class="sourceLineNo">5267</span>    } finally {<a name="line.5267"></a>
-<span class="sourceLineNo">5268</span>      HBaseTestingUtility.closeRegionAndWAL(this.region);<a name="line.5268"></a>
-<span class="sourceLineNo">5269</span>      this.region = null;<a name="line.5269"></a>
-<span class="sourceLineNo">5270</span>    }<a name="line.5270"></a>
-<span class="sourceLineNo">5271</span>  }<a name="line.5271"></a>
-<span class="sourceLineNo">5272</span><a name="line.5272"></a>
-<span class="sourceLineNo">5273</span>  @Test (timeout=60000)<a name="line.5273"></a>
-<span class="sourceLineNo">5274</span>  public void testReverseScanner_FromMemStore_SingleCF_LargerKey()<a name="line.5274"></a>
-<span class="sourceLineNo">5275</span>      throws IOException {<a name="line.5275"></a>
-<span class="sourceLineNo">5276</span>    byte[] rowC = Bytes.toBytes("rowC");<a name="line.5276"></a>
-<span class="sourceLineNo">5277</span>    byte[] rowA = Bytes.toBytes("rowA");<a name="line.5277"></a>
-<span class="sourceLineNo">5278</span>    byte[] rowB = Bytes.toBytes("rowB");<a name="line.5278"></a>
-<span class="sourceLineNo">5279</span>    byte[] rowD = Bytes.toBytes("rowD");<a name="line.5279"></a>
-<span class="sourceLineNo">5280</span>    byte[] cf = Bytes.toBytes("CF");<a name="line.5280"></a>
-<span class="sourceLineNo">5281</span>    byte[][] families = { cf };<a name="line.5281"></a>
-<span class="sourceLineNo">5282</span>    byte[] col = Bytes.toBytes("C");<a name="line.5282"></a>
-<span class="sourceLineNo">5283</span>    long ts = 1;<a name="line.5283"></a>
-<span class="sourceLineNo">5284</span>    String method = this.getName();<a name="line.5284"></a>
-<span class="sourceLineNo">5285</span>    this.region = initHRegion(tableName, method, families);<a name="line.5285"></a>
-<span class="sourceLineNo">5286</span>    try {<a name="line.5286"></a>
-<span class="sourceLineNo">5287</span>      KeyValue kv1 = new KeyValue(rowC, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5287"></a>
-<span class="sourceLineNo">5288</span>      KeyValue kv11 = new KeyValue(rowC, cf, col, ts + 1, KeyValue.Type.Put,<a name="line.5288"></a>
-<span class="sourceLineNo">5289</span>          null);<a name="line.5289"></a>
-<span class="sourceLineNo">5290</span>      KeyValue kv2 = new KeyValue(rowA, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5290"></a>
-<span class="sourceLineNo">5291</span>      KeyValue kv3 = new KeyValue(rowB, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5291"></a>
-<span class="sourceLineNo">5292</span>      Put put = null;<a name="line.5292"></a>
-<span class="sourceLineNo">5293</span>      put = new Put(rowC);<a name="line.5293"></a>
-<span class="sourceLineNo">5294</span>      put.add(kv1);<a name="line.5294"></a>
-<span class="sourceLineNo">5295</span>      put.add(kv11);<a name="line.5295"></a>
-<span class="sourceLineNo">5296</span>      region.put(put);<a name="line.5296"></a>
-<span class="sourceLineNo">5297</span>      put = new Put(rowA);<a name="line.5297"></a>
-<span class="sourceLineNo">5298</span>      put.add(kv2);<a name="line.5298"></a>
-<span class="sourceLineNo">5299</span>      region.put(put);<a name="line.5299"></a>
-<span class="sourceLineNo">5300</span>      put = new Put(rowB);<a name="line.5300"></a>
-<span class="sourceLineNo">5301</span>      put.add(kv3);<a name="line.5301"></a>
-<span class="sourceLineNo">5302</span>      region.put(put);<a name="line.5302"></a>
-<span class="sourceLineNo">5303</span><a name="line.5303"></a>
-<span class="sourceLineNo">5304</span>      Scan scan = new Scan(rowD);<a name="line.5304"></a>
-<span class="sourceLineNo">5305</span>      List&lt;Cell&gt; currRow = new ArrayList&lt;Cell&gt;();<a name="line.5305"></a>
-<span class="sourceLineNo">5306</span>      scan.setReversed(true);<a name="line.5306"></a>
-<span class="sourceLineNo">5307</span>      scan.setMaxVersions(5);<a name="line.5307"></a>
-<span class="sourceLineNo">5308</span>      InternalScanner scanner = region.getScanner(scan);<a name="line.5308"></a>
-<span class="sourceLineNo">5309</span>      boolean hasNext = scanner.next(currRow);<a name="line.5309"></a>
-<span class="sourceLineNo">5310</span>      assertEquals(2, currRow.size());<a name="line.5310"></a>
-<span class="sourceLineNo">5311</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5311"></a>
-<span class="sourceLineNo">5312</span>          .get(0).getRowLength(), rowC, 0, rowC.length));<a name="line.5312"></a>
-<span class="sourceLineNo">5313</span>      assertTrue(hasNext);<a name="line.5313"></a>
-<span class="sourceLineNo">5314</span>      currRow.clear();<a name="line.5314"></a>
-<span class="sourceLineNo">5315</span>      hasNext = scanner.next(currRow);<a name="line.5315"></a>
-<span class="sourceLineNo">5316</span>      assertEquals(1, currRow.size());<a name="line.5316"></a>
-<span class="sourceLineNo">5317</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5317"></a>
-<span class="sourceLineNo">5318</span>          .get(0).getRowLength(), rowB, 0, rowB.length));<a name="line.5318"></a>
-<span class="sourceLineNo">5319</span>      assertTrue(hasNext);<a name="line.5319"></a>
-<span class="sourceLineNo">5320</span>      currRow.clear();<a name="line.5320"></a>
-<span class="sourceLineNo">5321</span>      hasNext = scanner.next(currRow);<a name="line.5321"></a>
-<span class="sourceLineNo">5322</span>      assertEquals(1, currRow.size());<a name="line.5322"></a>
-<span class="sourceLineNo">5323</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5323"></a>
-<span class="sourceLineNo">5324</span>          .get(0).getRowLength(), rowA, 0, rowA.length));<a name="line.5324"></a>
-<span class="sourceLineNo">5325</span>      assertFalse(hasNext);<a name="line.5325"></a>
-<span class="sourceLineNo">5326</span>      scanner.close();<a name="line.5326"></a>
-<span class="sourceLineNo">5327</span>    } finally {<a name="line.5327"></a>
-<span class="sourceLineNo">5328</span>      HBaseTestingUtility.closeRegionAndWAL(this.region);<a name="line.5328"></a>
-<span class="sourceLineNo">5329</span>      this.region = null;<a name="line.5329"></a>
-<span class="sourceLineNo">5330</span>    }<a name="line.5330"></a>
-<span class="sourceLineNo">5331</span>  }<a name="line.5331"></a>
-<span class="sourceLineNo">5332</span><a name="line.5332"></a>
-<span class="sourceLineNo">5333</span>  @Test (timeout=60000)<a name="line.5333"></a>
-<span class="sourceLineNo">5334</span>  public void testReverseScanner_FromMemStore_SingleCF_FullScan()<a name="line.5334"></a>
-<span class="sourceLineNo">5335</span>      throws IOException {<a name="line.5335"></a>
-<span class="sourceLineNo">5336</span>    byte[] rowC = Bytes.toBytes("rowC");<a name="line.5336"></a>
-<span class="sourceLineNo">5337</span>    byte[] rowA = Bytes.toBytes("rowA");<a name="line.5337"></a>
-<span class="sourceLineNo">5338</span>    byte[] rowB = Bytes.toBytes("rowB");<a name="line.5338"></a>
-<span class="sourceLineNo">5339</span>    byte[] cf = Bytes.toBytes("CF");<a name="line.5339"></a>
-<span class="sourceLineNo">5340</span>    byte[][] families = { cf };<a name="line.5340"></a>
-<span class="sourceLineNo">5341</span>    byte[] col = Bytes.toBytes("C");<a name="line.5341"></a>
-<span class="sourceLineNo">5342</span>    long ts = 1;<a name="line.5342"></a>
-<span class="sourceLineNo">5343</span>    String method = this.getName();<a name="line.5343"></a>
-<span class="sourceLineNo">5344</span>    this.region = initHRegion(tableName, method, families);<a name="line.5344"></a>
-<span class="sourceLineNo">5345</span>    try {<a name="line.5345"></a>
-<span class="sourceLineNo">5346</span>      KeyValue kv1 = new KeyValue(rowC, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5346"></a>
-<span class="sourceLineNo">5347</span>      KeyValue kv11 = new KeyValue(rowC, cf, col, ts + 1, KeyValue.Type.Put,<a name="line.5347"></a>
-<span class="sourceLineNo">5348</span>          null);<a name="line.5348"></a>
-<span class="sourceLineNo">5349</span>      KeyValue kv2 = new KeyValue(rowA, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5349"></a>
-<span class="sourceLineNo">5350</span>      KeyValue kv3 = new KeyValue(rowB, cf, col, ts, KeyValue.Type.Put, null);<a name="line.5350"></a>
-<span class="sourceLineNo">5351</span>      Put put = null;<a name="line.5351"></a>
-<span class="sourceLineNo">5352</span>      put = new Put(rowC);<a name="line.5352"></a>
-<span class="sourceLineNo">5353</span>      put.add(kv1);<a name="line.5353"></a>
-<span class="sourceLineNo">5354</span>      put.add(kv11);<a name="line.5354"></a>
-<span class="sourceLineNo">5355</span>      region.put(put);<a name="line.5355"></a>
-<span class="sourceLineNo">5356</span>      put = new Put(rowA);<a name="line.5356"></a>
-<span class="sourceLineNo">5357</span>      put.add(kv2);<a name="line.5357"></a>
-<span class="sourceLineNo">5358</span>      region.put(put);<a name="line.5358"></a>
-<span class="sourceLineNo">5359</span>      put = new Put(rowB);<a name="line.5359"></a>
-<span class="sourceLineNo">5360</span>      put.add(kv3);<a name="line.5360"></a>
-<span class="sourceLineNo">5361</span>      region.put(put);<a name="line.5361"></a>
-<span class="sourceLineNo">5362</span>      Scan scan = new Scan();<a name="line.5362"></a>
-<span class="sourceLineNo">5363</span>      List&lt;Cell&gt; currRow = new ArrayList&lt;Cell&gt;();<a name="line.5363"></a>
-<span class="sourceLineNo">5364</span>      scan.setReversed(true);<a name="line.5364"></a>
-<span class="sourceLineNo">5365</span>      InternalScanner scanner = region.getScanner(scan);<a name="line.5365"></a>
-<span class="sourceLineNo">5366</span>      boolean hasNext = scanner.next(currRow);<a name="line.5366"></a>
-<span class="sourceLineNo">5367</span>      assertEquals(1, currRow.size());<a name="line.5367"></a>
-<span class="sourceLineNo">5368</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5368"></a>
-<span class="sourceLineNo">5369</span>          .get(0).getRowLength(), rowC, 0, rowC.length));<a name="line.5369"></a>
-<span class="sourceLineNo">5370</span>      assertTrue(hasNext);<a name="line.5370"></a>
-<span class="sourceLineNo">5371</span>      currRow.clear();<a name="line.5371"></a>
-<span class="sourceLineNo">5372</span>      hasNext = scanner.next(currRow);<a name="line.5372"></a>
-<span class="sourceLineNo">5373</span>      assertEquals(1, currRow.size());<a name="line.5373"></a>
-<span class="sourceLineNo">5374</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5374"></a>
-<span class="sourceLineNo">5375</span>          .get(0).getRowLength(), rowB, 0, rowB.length));<a name="line.5375"></a>
-<span class="sourceLineNo">5376</span>      assertTrue(hasNext);<a name="line.5376"></a>
-<span class="sourceLineNo">5377</span>      currRow.clear();<a name="line.5377"></a>
-<span class="sourceLineNo">5378</span>      hasNext = scanner.next(currRow);<a name="line.5378"></a>
-<span class="sourceLineNo">5379</span>      assertEquals(1, currRow.size());<a name="line.5379"></a>
-<span class="sourceLineNo">5380</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5380"></a>
-<span class="sourceLineNo">5381</span>          .get(0).getRowLength(), rowA, 0, rowA.length));<a name="line.5381"></a>
-<span class="sourceLineNo">5382</span>      assertFalse(hasNext);<a name="line.5382"></a>
-<span class="sourceLineNo">5383</span>      scanner.close();<a name="line.5383"></a>
-<span class="sourceLineNo">5384</span>    } finally {<a name="line.5384"></a>
-<span class="sourceLineNo">5385</span>      HBaseTestingUtility.closeRegionAndWAL(this.region);<a name="line.5385"></a>
-<span class="sourceLineNo">5386</span>      this.region = null;<a name="line.5386"></a>
-<span class="sourceLineNo">5387</span>    }<a name="line.5387"></a>
-<span class="sourceLineNo">5388</span>  }<a name="line.5388"></a>
-<span class="sourceLineNo">5389</span><a name="line.5389"></a>
-<span class="sourceLineNo">5390</span>  @Test (timeout=60000)<a name="line.5390"></a>
-<span class="sourceLineNo">5391</span>  public void testReverseScanner_moreRowsMayExistAfter() throws IOException {<a name="line.5391"></a>
-<span class="sourceLineNo">5392</span>    // case for "INCLUDE_AND_SEEK_NEXT_ROW &amp; SEEK_NEXT_ROW" endless loop<a name="line.5392"></a>
-<span class="sourceLineNo">5393</span>    byte[] rowA = Bytes.toBytes("rowA");<a name="line.5393"></a>
-<span class="sourceLineNo">5394</span>    byte[] rowB = Bytes.toBytes("rowB");<a name="line.5394"></a>
-<span class="sourceLineNo">5395</span>    byte[] rowC = Bytes.toBytes("rowC");<a name="line.5395"></a>
-<span class="sourceLineNo">5396</span>    byte[] rowD = Bytes.toBytes("rowD");<a name="line.5396"></a>
-<span class="sourceLineNo">5397</span>    byte[] rowE = Bytes.toBytes("rowE");<a name="line.5397"></a>
-<span class="sourceLineNo">5398</span>    byte[] cf = Bytes.toBytes("CF");<a name="line.5398"></a>
-<span class="sourceLineNo">5399</span>    byte[][] families = { cf };<a name="line.5399"></a>
-<span class="sourceLineNo">5400</span>    byte[] col1 = Bytes.toBytes("col1");<a name="line.5400"></a>
-<span class="sourceLineNo">5401</span>    byte[] col2 = Bytes.toBytes("col2");<a name="line.5401"></a>
-<span class="sourceLineNo">5402</span>    long ts = 1;<a name="line.5402"></a>
-<span class="sourceLineNo">5403</span>    String method = this.getName();<a name="line.5403"></a>
-<span class="sourceLineNo">5404</span>    this.region = initHRegion(tableName, method, families);<a name="line.5404"></a>
-<span class="sourceLineNo">5405</span>    try {<a name="line.5405"></a>
-<span class="sourceLineNo">5406</span>      KeyValue kv1 = new KeyValue(rowA, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5406"></a>
-<span class="sourceLineNo">5407</span>      KeyValue kv2 = new KeyValue(rowB, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5407"></a>
-<span class="sourceLineNo">5408</span>      KeyValue kv3 = new KeyValue(rowC, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5408"></a>
-<span class="sourceLineNo">5409</span>      KeyValue kv4_1 = new KeyValue(rowD, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5409"></a>
-<span class="sourceLineNo">5410</span>      KeyValue kv4_2 = new KeyValue(rowD, cf, col2, ts, KeyValue.Type.Put, null);<a name="line.5410"></a>
-<span class="sourceLineNo">5411</span>      KeyValue kv5 = new KeyValue(rowE, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5411"></a>
-<span class="sourceLineNo">5412</span>      Put put = null;<a name="line.5412"></a>
-<span class="sourceLineNo">5413</span>      put = new Put(rowA);<a name="line.5413"></a>
-<span class="sourceLineNo">5414</span>      put.add(kv1);<a name="line.5414"></a>
-<span class="sourceLineNo">5415</span>      region.put(put);<a name="line.5415"></a>
-<span class="sourceLineNo">5416</span>      put = new Put(rowB);<a name="line.5416"></a>
-<span class="sourceLineNo">5417</span>      put.add(kv2);<a name="line.5417"></a>
-<span class="sourceLineNo">5418</span>      region.put(put);<a name="line.5418"></a>
-<span class="sourceLineNo">5419</span>      put = new Put(rowC);<a name="line.5419"></a>
-<span class="sourceLineNo">5420</span>      put.add(kv3);<a name="line.5420"></a>
-<span class="sourceLineNo">5421</span>      region.put(put);<a name="line.5421"></a>
-<span class="sourceLineNo">5422</span>      put = new Put(rowD);<a name="line.5422"></a>
-<span class="sourceLineNo">5423</span>      put.add(kv4_1);<a name="line.5423"></a>
-<span class="sourceLineNo">5424</span>      region.put(put);<a name="line.5424"></a>
-<span class="sourceLineNo">5425</span>      put = new Put(rowD);<a name="line.5425"></a>
-<span class="sourceLineNo">5426</span>      put.add(kv4_2);<a name="line.5426"></a>
-<span class="sourceLineNo">5427</span>      region.put(put);<a name="line.5427"></a>
-<span class="sourceLineNo">5428</span>      put = new Put(rowE);<a name="line.5428"></a>
-<span class="sourceLineNo">5429</span>      put.add(kv5);<a name="line.5429"></a>
-<span class="sourceLineNo">5430</span>      region.put(put);<a name="line.5430"></a>
-<span class="sourceLineNo">5431</span>      region.flush(true);<a name="line.5431"></a>
-<span class="sourceLineNo">5432</span>      Scan scan = new Scan(rowD, rowA);<a name="line.5432"></a>
-<span class="sourceLineNo">5433</span>      scan.addColumn(families[0], col1);<a name="line.5433"></a>
-<span class="sourceLineNo">5434</span>      scan.setReversed(true);<a name="line.5434"></a>
-<span class="sourceLineNo">5435</span>      List&lt;Cell&gt; currRow = new ArrayList&lt;Cell&gt;();<a name="line.5435"></a>
-<span class="sourceLineNo">5436</span>      InternalScanner scanner = region.getScanner(scan);<a name="line.5436"></a>
-<span class="sourceLineNo">5437</span>      boolean hasNext = scanner.next(currRow);<a name="line.5437"></a>
-<span class="sourceLineNo">5438</span>      assertEquals(1, currRow.size());<a name="line.5438"></a>
-<span class="sourceLineNo">5439</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5439"></a>
-<span class="sourceLineNo">5440</span>          .get(0).getRowLength(), rowD, 0, rowD.length));<a name="line.5440"></a>
-<span class="sourceLineNo">5441</span>      assertTrue(hasNext);<a name="line.5441"></a>
-<span class="sourceLineNo">5442</span>      currRow.clear();<a name="line.5442"></a>
-<span class="sourceLineNo">5443</span>      hasNext = scanner.next(currRow);<a name="line.5443"></a>
-<span class="sourceLineNo">5444</span>      assertEquals(1, currRow.size());<a name="line.5444"></a>
-<span class="sourceLineNo">5445</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5445"></a>
-<span class="sourceLineNo">5446</span>          .get(0).getRowLength(), rowC, 0, rowC.length));<a name="line.5446"></a>
-<span class="sourceLineNo">5447</span>      assertTrue(hasNext);<a name="line.5447"></a>
-<span class="sourceLineNo">5448</span>      currRow.clear();<a name="line.5448"></a>
-<span class="sourceLineNo">5449</span>      hasNext = scanner.next(currRow);<a name="line.5449"></a>
-<span class="sourceLineNo">5450</span>      assertEquals(1, currRow.size());<a name="line.5450"></a>
-<span class="sourceLineNo">5451</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5451"></a>
-<span class="sourceLineNo">5452</span>          .get(0).getRowLength(), rowB, 0, rowB.length));<a name="line.5452"></a>
-<span class="sourceLineNo">5453</span>      assertFalse(hasNext);<a name="line.5453"></a>
-<span class="sourceLineNo">5454</span>      scanner.close();<a name="line.5454"></a>
-<span class="sourceLineNo">5455</span><a name="line.5455"></a>
-<span class="sourceLineNo">5456</span>      scan = new Scan(rowD, rowA);<a name="line.5456"></a>
-<span class="sourceLineNo">5457</span>      scan.addColumn(families[0], col2);<a name="line.5457"></a>
-<span class="sourceLineNo">5458</span>      scan.setReversed(true);<a name="line.5458"></a>
-<span class="sourceLineNo">5459</span>      currRow.clear();<a name="line.5459"></a>
-<span class="sourceLineNo">5460</span>      scanner = region.getScanner(scan);<a name="line.5460"></a>
-<span class="sourceLineNo">5461</span>      hasNext = scanner.next(currRow);<a name="line.5461"></a>
-<span class="sourceLineNo">5462</span>      assertEquals(1, currRow.size());<a name="line.5462"></a>
-<span class="sourceLineNo">5463</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5463"></a>
-<span class="sourceLineNo">5464</span>          .get(0).getRowLength(), rowD, 0, rowD.length));<a name="line.5464"></a>
-<span class="sourceLineNo">5465</span>      scanner.close();<a name="line.5465"></a>
-<span class="sourceLineNo">5466</span>    } finally {<a name="line.5466"></a>
-<span class="sourceLineNo">5467</span>      HBaseTestingUtility.closeRegionAndWAL(this.region);<a name="line.5467"></a>
-<span class="sourceLineNo">5468</span>      this.region = null;<a name="line.5468"></a>
-<span class="sourceLineNo">5469</span>    }<a name="line.5469"></a>
-<span class="sourceLineNo">5470</span>  }<a name="line.5470"></a>
-<span class="sourceLineNo">5471</span><a name="line.5471"></a>
-<span class="sourceLineNo">5472</span>  @Test (timeout=60000)<a name="line.5472"></a>
-<span class="sourceLineNo">5473</span>  public void testReverseScanner_smaller_blocksize() throws IOException {<a name="line.5473"></a>
-<span class="sourceLineNo">5474</span>    // case to ensure no conflict with HFile index optimization<a name="line.5474"></a>
-<span class="sourceLineNo">5475</span>    byte[] rowA = Bytes.toBytes("rowA");<a name="line.5475"></a>
-<span class="sourceLineNo">5476</span>    byte[] rowB = Bytes.toBytes("rowB");<a name="line.5476"></a>
-<span class="sourceLineNo">5477</span>    byte[] rowC = Bytes.toBytes("rowC");<a name="line.5477"></a>
-<span class="sourceLineNo">5478</span>    byte[] rowD = Bytes.toBytes("rowD");<a name="line.5478"></a>
-<span class="sourceLineNo">5479</span>    byte[] rowE = Bytes.toBytes("rowE");<a name="line.5479"></a>
-<span class="sourceLineNo">5480</span>    byte[] cf = Bytes.toBytes("CF");<a name="line.5480"></a>
-<span class="sourceLineNo">5481</span>    byte[][] families = { cf };<a name="line.5481"></a>
-<span class="sourceLineNo">5482</span>    byte[] col1 = Bytes.toBytes("col1");<a name="line.5482"></a>
-<span class="sourceLineNo">5483</span>    byte[] col2 = Bytes.toBytes("col2");<a name="line.5483"></a>
-<span class="sourceLineNo">5484</span>    long ts = 1;<a name="line.5484"></a>
-<span class="sourceLineNo">5485</span>    String method = this.getName();<a name="line.5485"></a>
-<span class="sourceLineNo">5486</span>    HBaseConfiguration config = new HBaseConfiguration();<a name="line.5486"></a>
-<span class="sourceLineNo">5487</span>    config.setInt("test.block.size", 1);<a name="line.5487"></a>
-<span class="sourceLineNo">5488</span>    this.region = initHRegion(tableName, method, config, families);<a name="line.5488"></a>
-<span class="sourceLineNo">5489</span>    try {<a name="line.5489"></a>
-<span class="sourceLineNo">5490</span>      KeyValue kv1 = new KeyValue(rowA, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5490"></a>
-<span class="sourceLineNo">5491</span>      KeyValue kv2 = new KeyValue(rowB, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5491"></a>
-<span class="sourceLineNo">5492</span>      KeyValue kv3 = new KeyValue(rowC, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5492"></a>
-<span class="sourceLineNo">5493</span>      KeyValue kv4_1 = new KeyValue(rowD, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5493"></a>
-<span class="sourceLineNo">5494</span>      KeyValue kv4_2 = new KeyValue(rowD, cf, col2, ts, KeyValue.Type.Put, null);<a name="line.5494"></a>
-<span class="sourceLineNo">5495</span>      KeyValue kv5 = new KeyValue(rowE, cf, col1, ts, KeyValue.Type.Put, null);<a name="line.5495"></a>
-<span class="sourceLineNo">5496</span>      Put put = null;<a name="line.5496"></a>
-<span class="sourceLineNo">5497</span>      put = new Put(rowA);<a name="line.5497"></a>
-<span class="sourceLineNo">5498</span>      put.add(kv1);<a name="line.5498"></a>
-<span class="sourceLineNo">5499</span>      region.put(put);<a name="line.5499"></a>
-<span class="sourceLineNo">5500</span>      put = new Put(rowB);<a name="line.5500"></a>
-<span class="sourceLineNo">5501</span>      put.add(kv2);<a name="line.5501"></a>
-<span class="sourceLineNo">5502</span>      region.put(put);<a name="line.5502"></a>
-<span class="sourceLineNo">5503</span>      put = new Put(rowC);<a name="line.5503"></a>
-<span class="sourceLineNo">5504</span>      put.add(kv3);<a name="line.5504"></a>
-<span class="sourceLineNo">5505</span>      region.put(put);<a name="line.5505"></a>
-<span class="sourceLineNo">5506</span>      put = new Put(rowD);<a name="line.5506"></a>
-<span class="sourceLineNo">5507</span>      put.add(kv4_1);<a name="line.5507"></a>
-<span class="sourceLineNo">5508</span>      region.put(put);<a name="line.5508"></a>
-<span class="sourceLineNo">5509</span>      put = new Put(rowD);<a name="line.5509"></a>
-<span class="sourceLineNo">5510</span>      put.add(kv4_2);<a name="line.5510"></a>
-<span class="sourceLineNo">5511</span>      region.put(put);<a name="line.5511"></a>
-<span class="sourceLineNo">5512</span>      put = new Put(rowE);<a name="line.5512"></a>
-<span class="sourceLineNo">5513</span>      put.add(kv5);<a name="line.5513"></a>
-<span class="sourceLineNo">5514</span>      region.put(put);<a name="line.5514"></a>
-<span class="sourceLineNo">5515</span>      region.flush(true);<a name="line.5515"></a>
-<span class="sourceLineNo">5516</span>      Scan scan = new Scan(rowD, rowA);<a name="line.5516"></a>
-<span class="sourceLineNo">5517</span>      scan.addColumn(families[0], col1);<a name="line.5517"></a>
-<span class="sourceLineNo">5518</span>      scan.setReversed(true);<a name="line.5518"></a>
-<span class="sourceLineNo">5519</span>      List&lt;Cell&gt; currRow = new ArrayList&lt;Cell&gt;();<a name="line.5519"></a>
-<span class="sourceLineNo">5520</span>      InternalScanner scanner = region.getScanner(scan);<a name="line.5520"></a>
-<span class="sourceLineNo">5521</span>      boolean hasNext = scanner.next(currRow);<a name="line.5521"></a>
-<span class="sourceLineNo">5522</span>      assertEquals(1, currRow.size());<a name="line.5522"></a>
-<span class="sourceLineNo">5523</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5523"></a>
-<span class="sourceLineNo">5524</span>          .get(0).getRowLength(), rowD, 0, rowD.length));<a name="line.5524"></a>
-<span class="sourceLineNo">5525</span>      assertTrue(hasNext);<a name="line.5525"></a>
-<span class="sourceLineNo">5526</span>      currRow.clear();<a name="line.5526"></a>
-<span class="sourceLineNo">5527</span>      hasNext = scanner.next(currRow);<a name="line.5527"></a>
-<span class="sourceLineNo">5528</span>      assertEquals(1, currRow.size());<a name="line.5528"></a>
-<span class="sourceLineNo">5529</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5529"></a>
-<span class="sourceLineNo">5530</span>          .get(0).getRowLength(), rowC, 0, rowC.length));<a name="line.5530"></a>
-<span class="sourceLineNo">5531</span>      assertTrue(hasNext);<a name="line.5531"></a>
-<span class="sourceLineNo">5532</span>      currRow.clear();<a name="line.5532"></a>
-<span class="sourceLineNo">5533</span>      hasNext = scanner.next(currRow);<a name="line.5533"></a>
-<span class="sourceLineNo">5534</span>      assertEquals(1, currRow.size());<a name="line.5534"></a>
-<span class="sourceLineNo">5535</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5535"></a>
-<span class="sourceLineNo">5536</span>          .get(0).getRowLength(), rowB, 0, rowB.length));<a name="line.5536"></a>
-<span class="sourceLineNo">5537</span>      assertFalse(hasNext);<a name="line.5537"></a>
-<span class="sourceLineNo">5538</span>      scanner.close();<a name="line.5538"></a>
-<span class="sourceLineNo">5539</span><a name="line.5539"></a>
-<span class="sourceLineNo">5540</span>      scan = new Scan(rowD, rowA);<a name="line.5540"></a>
-<span class="sourceLineNo">5541</span>      scan.addColumn(families[0], col2);<a name="line.5541"></a>
-<span class="sourceLineNo">5542</span>      scan.setReversed(true);<a name="line.5542"></a>
-<span class="sourceLineNo">5543</span>      currRow.clear();<a name="line.5543"></a>
-<span class="sourceLineNo">5544</span>      scanner = region.getScanner(scan);<a name="line.5544"></a>
-<span class="sourceLineNo">5545</span>      hasNext = scanner.next(currRow);<a name="line.5545"></a>
-<span class="sourceLineNo">5546</span>      assertEquals(1, currRow.size());<a name="line.5546"></a>
-<span class="sourceLineNo">5547</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5547"></a>
-<span class="sourceLineNo">5548</span>          .get(0).getRowLength(), rowD, 0, rowD.length));<a name="line.5548"></a>
-<span class="sourceLineNo">5549</span>      scanner.close();<a name="line.5549"></a>
-<span class="sourceLineNo">5550</span>    } finally {<a name="line.5550"></a>
-<span class="sourceLineNo">5551</span>      HBaseTestingUtility.closeRegionAndWAL(this.region);<a name="line.5551"></a>
-<span class="sourceLineNo">5552</span>      this.region = null;<a name="line.5552"></a>
-<span class="sourceLineNo">5553</span>    }<a name="line.5553"></a>
-<span class="sourceLineNo">5554</span>  }<a name="line.5554"></a>
-<span class="sourceLineNo">5555</span><a name="line.5555"></a>
-<span class="sourceLineNo">5556</span>  @Test (timeout=60000)<a name="line.5556"></a>
-<span class="sourceLineNo">5557</span>  public void testReverseScanner_FromMemStoreAndHFiles_MultiCFs1()<a name="line.5557"></a>
-<span class="sourceLineNo">5558</span>      throws IOException {<a name="line.5558"></a>
-<span class="sourceLineNo">5559</span>    byte[] row0 = Bytes.toBytes("row0"); // 1 kv<a name="line.5559"></a>
-<span class="sourceLineNo">5560</span>    byte[] row1 = Bytes.toBytes("row1"); // 2 kv<a name="line.5560"></a>
-<span class="sourceLineNo">5561</span>    byte[] row2 = Bytes.toBytes("row2"); // 4 kv<a name="line.5561"></a>
-<span class="sourceLineNo">5562</span>    byte[] row3 = Bytes.toBytes("row3"); // 2 kv<a name="line.5562"></a>
-<span class="sourceLineNo">5563</span>    byte[] row4 = Bytes.toBytes("row4"); // 5 kv<a name="line.5563"></a>
-<span class="sourceLineNo">5564</span>    byte[] row5 = Bytes.toBytes("row5"); // 2 kv<a name="line.5564"></a>
-<span class="sourceLineNo">5565</span>    byte[] cf1 = Bytes.toBytes("CF1");<a name="line.5565"></a>
-<span class="sourceLineNo">5566</span>    byte[] cf2 = Bytes.toBytes("CF2");<a name="line.5566"></a>
-<span class="sourceLineNo">5567</span>    byte[] cf3 = Bytes.toBytes("CF3");<a name="line.5567"></a>
-<span class="sourceLineNo">5568</span>    byte[][] families = { cf1, cf2, cf3 };<a name="line.5568"></a>
-<span class="sourceLineNo">5569</span>    byte[] col = Bytes.toBytes("C");<a name="line.5569"></a>
-<span class="sourceLineNo">5570</span>    long ts = 1;<a name="line.5570"></a>
-<span class="sourceLineNo">5571</span>    String method = this.getName();<a name="line.5571"></a>
-<span class="sourceLineNo">5572</span>    HBaseConfiguration conf = new HBaseConfiguration();<a name="line.5572"></a>
-<span class="sourceLineNo">5573</span>    // disable compactions in this test.<a name="line.5573"></a>
-<span class="sourceLineNo">5574</span>    conf.setInt("hbase.hstore.compactionThreshold", 10000);<a name="line.5574"></a>
-<span class="sourceLineNo">5575</span>    this.region = initHRegion(tableName, method, conf, families);<a name="line.5575"></a>
-<span class="sourceLineNo">5576</span>    try {<a name="line.5576"></a>
-<span class="sourceLineNo">5577</span>      // kv naming style: kv(row number) totalKvCountInThisRow seq no<a name="line.5577"></a>
-<span class="sourceLineNo">5578</span>      KeyValue kv0_1_1 = new KeyValue(row0, cf1, col, ts, KeyValue.Type.Put,<a name="line.5578"></a>
-<span class="sourceLineNo">5579</span>          null);<a name="line.5579"></a>
-<span class="sourceLineNo">5580</span>      KeyValue kv1_2_1 = new KeyValue(row1, cf2, col, ts, KeyValue.Type.Put,<a name="line.5580"></a>
-<span class="sourceLineNo">5581</span>          null);<a name="line.5581"></a>
-<span class="sourceLineNo">5582</span>      KeyValue kv1_2_2 = new KeyValue(row1, cf1, col, ts + 1,<a name="line.5582"></a>
-<span class="sourceLineNo">5583</span>          KeyValue.Type.Put, null);<a name="line.5583"></a>
-<span class="sourceLineNo">5584</span>      KeyValue kv2_4_1 = new KeyValue(row2, cf2, col, ts, KeyValue.Type.Put,<a name="line.5584"></a>
-<span class="sourceLineNo">5585</span>          null);<a name="line.5585"></a>
-<span class="sourceLineNo">5586</span>      KeyValue kv2_4_2 = new KeyValue(row2, cf1, col, ts, KeyValue.Type.Put,<a name="line.5586"></a>
-<span class="sourceLineNo">5587</span>          null);<a name="line.5587"></a>
-<span class="sourceLineNo">5588</span>      KeyValue kv2_4_3 = new KeyValue(row2, cf3, col, ts, KeyValue.Type.Put,<a name="line.5588"></a>
-<span class="sourceLineNo">5589</span>          null);<a name="line.5589"></a>
-<span class="sourceLineNo">5590</span>      KeyValue kv2_4_4 = new KeyValue(row2, cf1, col, ts + 4,<a name="line.5590"></a>
-<span class="sourceLineNo">5591</span>          KeyValue.Type.Put, null);<a name="line.5591"></a>
-<span class="sourceLineNo">5592</span>      KeyValue kv3_2_1 = new KeyValue(row3, cf2, col, ts, KeyValue.Type.Put,<a name="line.5592"></a>
-<span class="sourceLineNo">5593</span>          null);<a name="line.5593"></a>
-<span class="sourceLineNo">5594</span>      KeyValue kv3_2_2 = new KeyValue(row3, cf1, col, ts + 4,<a name="line.5594"></a>
-<span class="sourceLineNo">5595</span>          KeyValue.Type.Put, null);<a name="line.5595"></a>
-<span class="sourceLineNo">5596</span>      KeyValue kv4_5_1 = new KeyValue(row4, cf1, col, ts, KeyValue.Type.Put,<a name="line.5596"></a>
-<span class="sourceLineNo">5597</span>          null);<a name="line.5597"></a>
-<span class="sourceLineNo">5598</span>      KeyValue kv4_5_2 = new KeyValue(row4, cf3, col, ts, KeyValue.Type.Put,<a name="line.5598"></a>
-<span class="sourceLineNo">5599</span>          null);<a name="line.5599"></a>
-<span class="sourceLineNo">5600</span>      KeyValue kv4_5_3 = new KeyValue(row4, cf3, col, ts + 5,<a name="line.5600"></a>
-<span class="sourceLineNo">5601</span>          KeyValue.Type.Put, null);<a name="line.5601"></a>
-<span class="sourceLineNo">5602</span>      KeyValue kv4_5_4 = new KeyValue(row4, cf2, col, ts, KeyValue.Type.Put,<a name="line.5602"></a>
-<span class="sourceLineNo">5603</span>          null);<a name="line.5603"></a>
-<span class="sourceLineNo">5604</span>      KeyValue kv4_5_5 = new KeyValue(row4, cf1, col, ts + 3,<a name="line.5604"></a>
-<span class="sourceLineNo">5605</span>          KeyValue.Type.Put, null);<a name="line.5605"></a>
-<span class="sourceLineNo">5606</span>      KeyValue kv5_2_1 = new KeyValue(row5, cf2, col, ts, KeyValue.Type.Put,<a name="line.5606"></a>
-<span class="sourceLineNo">5607</span>          null);<a name="line.5607"></a>
-<span class="sourceLineNo">5608</span>      KeyValue kv5_2_2 = new KeyValue(row5, cf3, col, ts, KeyValue.Type.Put,<a name="line.5608"></a>
-<span class="sourceLineNo">5609</span>          null);<a name="line.5609"></a>
-<span class="sourceLineNo">5610</span>      // hfiles(cf1/cf2) :"row1"(1 kv) / "row2"(1 kv) / "row4"(2 kv)<a name="line.5610"></a>
-<span class="sourceLineNo">5611</span>      Put put = null;<a name="line.5611"></a>
-<span class="sourceLineNo">5612</span>      put = new Put(row1);<a name="line.5612"></a>
-<span class="sourceLineNo">5613</span>      put.add(kv1_2_1);<a name="line.5613"></a>
-<span class="sourceLineNo">5614</span>      region.put(put);<a name="line.5614"></a>
-<span class="sourceLineNo">5615</span>      put = new Put(row2);<a name="line.5615"></a>
-<span class="sourceLineNo">5616</span>      put.add(kv2_4_1);<a name="line.5616"></a>
-<span class="sourceLineNo">5617</span>      region.put(put);<a name="line.5617"></a>
-<span class="sourceLineNo">5618</span>      put = new Put(row4);<a name="line.5618"></a>
-<span class="sourceLineNo">5619</span>      put.add(kv4_5_4);<a name="line.5619"></a>
-<span class="sourceLineNo">5620</span>      put.add(kv4_5_5);<a name="line.5620"></a>
-<span class="sourceLineNo">5621</span>      region.put(put);<a name="line.5621"></a>
-<span class="sourceLineNo">5622</span>      region.flush(true);<a name="line.5622"></a>
-<span class="sourceLineNo">5623</span>      // hfiles(cf1/cf3) : "row1" (1 kvs) / "row2" (1 kv) / "row4" (2 kv)<a name="line.5623"></a>
-<span class="sourceLineNo">5624</span>      put = new Put(row4);<a name="line.5624"></a>
-<span class="sourceLineNo">5625</span>      put.add(kv4_5_1);<a name="line.5625"></a>
-<span class="sourceLineNo">5626</span>      put.add(kv4_5_3);<a name="line.5626"></a>
-<span class="sourceLineNo">5627</span>      region.put(put);<a name="line.5627"></a>
-<span class="sourceLineNo">5628</span>      put = new Put(row1);<a name="line.5628"></a>
-<span class="sourceLineNo">5629</span>      put.add(kv1_2_2);<a name="line.5629"></a>
-<span class="sourceLineNo">5630</span>      region.put(put);<a name="line.5630"></a>
-<span class="sourceLineNo">5631</span>      put = new Put(row2);<a name="line.5631"></a>
-<span class="sourceLineNo">5632</span>      put.add(kv2_4_4);<a name="line.5632"></a>
-<span class="sourceLineNo">5633</span>      region.put(put);<a name="line.5633"></a>
-<span class="sourceLineNo">5634</span>      region.flush(true);<a name="line.5634"></a>
-<span class="sourceLineNo">5635</span>      // hfiles(cf1/cf3) : "row2"(2 kv) / "row3"(1 kvs) / "row4" (1 kv)<a name="line.5635"></a>
-<span class="sourceLineNo">5636</span>      put = new Put(row4);<a name="line.5636"></a>
-<span class="sourceLineNo">5637</span>      put.add(kv4_5_2);<a name="line.5637"></a>
-<span class="sourceLineNo">5638</span>      region.put(put);<a name="line.5638"></a>
-<span class="sourceLineNo">5639</span>      put = new Put(row2);<a name="line.5639"></a>
-<span class="sourceLineNo">5640</span>      put.add(kv2_4_2);<a name="line.5640"></a>
-<span class="sourceLineNo">5641</span>      put.add(kv2_4_3);<a name="line.5641"></a>
-<span class="sourceLineNo">5642</span>      region.put(put);<a name="line.5642"></a>
-<span class="sourceLineNo">5643</span>      put = new Put(row3);<a name="line.5643"></a>
-<span class="sourceLineNo">5644</span>      put.add(kv3_2_2);<a name="line.5644"></a>
-<span class="sourceLineNo">5645</span>      region.put(put);<a name="line.5645"></a>
-<span class="sourceLineNo">5646</span>      region.flush(true);<a name="line.5646"></a>
-<span class="sourceLineNo">5647</span>      // memstore(cf1/cf2/cf3) : "row0" (1 kvs) / "row3" ( 1 kv) / "row5" (max)<a name="line.5647"></a>
-<span class="sourceLineNo">5648</span>      // ( 2 kv)<a name="line.5648"></a>
-<span class="sourceLineNo">5649</span>      put = new Put(row0);<a name="line.5649"></a>
-<span class="sourceLineNo">5650</span>      put.add(kv0_1_1);<a name="line.5650"></a>
-<span class="sourceLineNo">5651</span>      region.put(put);<a name="line.5651"></a>
-<span class="sourceLineNo">5652</span>      put = new Put(row3);<a name="line.5652"></a>
-<span class="sourceLineNo">5653</span>      put.add(kv3_2_1);<a name="line.5653"></a>
-<span class="sourceLineNo">5654</span>      region.put(put);<a name="line.5654"></a>
-<span class="sourceLineNo">5655</span>      put = new Put(row5);<a name="line.5655"></a>
-<span class="sourceLineNo">5656</span>      put.add(kv5_2_1);<a name="line.5656"></a>
-<span class="sourceLineNo">5657</span>      put.add(kv5_2_2);<a name="line.5657"></a>
-<span class="sourceLineNo">5658</span>      region.put(put);<a name="line.5658"></a>
-<span class="sourceLineNo">5659</span>      // scan range = ["row4", min), skip the max "row5"<a name="line.5659"></a>
-<span class="sourceLineNo">5660</span>      Scan scan = new Scan(row4);<a name="line.5660"></a>
-<span class="sourceLineNo">5661</span>      scan.setMaxVersions(5);<a name="line.5661"></a>
-<span class="sourceLineNo">5662</span>      scan.setBatch(3);<a name="line.5662"></a>
-<span class="sourceLineNo">5663</span>      scan.setReversed(true);<a name="line.5663"></a>
-<span class="sourceLineNo">5664</span>      InternalScanner scanner = region.getScanner(scan);<a name="line.5664"></a>
-<span class="sourceLineNo">5665</span>      List&lt;Cell&gt; currRow = new ArrayList&lt;Cell&gt;();<a name="line.5665"></a>
-<span class="sourceLineNo">5666</span>      boolean hasNext = false;<a name="line.5666"></a>
-<span class="sourceLineNo">5667</span>      // 1. scan out "row4" (5 kvs), "row5" can't be scanned out since not<a name="line.5667"></a>
-<span class="sourceLineNo">5668</span>      // included in scan range<a name="line.5668"></a>
-<span class="sourceLineNo">5669</span>      // "row4" takes 2 next() calls since batch=3<a name="line.5669"></a>
-<span class="sourceLineNo">5670</span>      hasNext = scanner.next(currRow);<a name="line.5670"></a>
-<span class="sourceLineNo">5671</span>      assertEquals(3, currRow.size());<a name="line.5671"></a>
-<span class="sourceLineNo">5672</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5672"></a>
-<span class="sourceLineNo">5673</span>          .get(0).getRowLength(), row4, 0, row4.length));<a name="line.5673"></a>
-<span class="sourceLineNo">5674</span>      assertTrue(hasNext);<a name="line.5674"></a>
-<span class="sourceLineNo">5675</span>      currRow.clear();<a name="line.5675"></a>
-<span class="sourceLineNo">5676</span>      hasNext = scanner.next(currRow);<a name="line.5676"></a>
-<span class="sourceLineNo">5677</span>      assertEquals(2, currRow.size());<a name="line.5677"></a>
-<span class="sourceLineNo">5678</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow.get(0).getRowLength(), row4, 0,<a name="line.5678"></a>
-<span class="sourceLineNo">5679</span>        row4.length));<a name="line.5679"></a>
-<span class="sourceLineNo">5680</span>      assertTrue(hasNext);<a name="line.5680"></a>
-<span class="sourceLineNo">5681</span>      // 2. scan out "row3" (2 kv)<a name="line.5681"></a>
-<span class="sourceLineNo">5682</span>      currRow.clear();<a name="line.5682"></a>
-<span class="sourceLineNo">5683</span>      hasNext = scanner.next(currRow);<a name="line.5683"></a>
-<span class="sourceLineNo">5684</span>      assertEquals(2, currRow.size());<a name="line.5684"></a>
-<span class="sourceLineNo">5685</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5685"></a>
-<span class="sourceLineNo">5686</span>          .get(0).getRowLength(), row3, 0, row3.length));<a name="line.5686"></a>
-<span class="sourceLineNo">5687</span>      assertTrue(hasNext);<a name="line.5687"></a>
-<span class="sourceLineNo">5688</span>      // 3. scan out "row2" (4 kvs)<a name="line.5688"></a>
-<span class="sourceLineNo">5689</span>      // "row2" takes 2 next() calls since batch=3<a name="line.5689"></a>
-<span class="sourceLineNo">5690</span>      currRow.clear();<a name="line.5690"></a>
-<span class="sourceLineNo">5691</span>      hasNext = scanner.next(currRow);<a name="line.5691"></a>
-<span class="sourceLineNo">5692</span>      assertEquals(3, currRow.size());<a name="line.5692"></a>
-<span class="sourceLineNo">5693</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5693"></a>
-<span class="sourceLineNo">5694</span>          .get(0).getRowLength(), row2, 0, row2.length));<a name="line.5694"></a>
-<span class="sourceLineNo">5695</span>      assertTrue(hasNext);<a name="line.5695"></a>
-<span class="sourceLineNo">5696</span>      currRow.clear();<a name="line.5696"></a>
-<span class="sourceLineNo">5697</span>      hasNext = scanner.next(currRow);<a name="line.5697"></a>
-<span class="sourceLineNo">5698</span>      assertEquals(1, currRow.size());<a name="line.5698"></a>
-<span class="sourceLineNo">5699</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5699"></a>
-<span class="sourceLineNo">5700</span>          .get(0).getRowLength(), row2, 0, row2.length));<a name="line.5700"></a>
-<span class="sourceLineNo">5701</span>      assertTrue(hasNext);<a name="line.5701"></a>
-<span class="sourceLineNo">5702</span>      // 4. scan out "row1" (2 kv)<a name="line.5702"></a>
-<span class="sourceLineNo">5703</span>      currRow.clear();<a name="line.5703"></a>
-<span class="sourceLineNo">5704</span>      hasNext = scanner.next(currRow);<a name="line.5704"></a>
-<span class="sourceLineNo">5705</span>      assertEquals(2, currRow.size());<a name="line.5705"></a>
-<span class="sourceLineNo">5706</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5706"></a>
-<span class="sourceLineNo">5707</span>          .get(0).getRowLength(), row1, 0, row1.length));<a name="line.5707"></a>
-<span class="sourceLineNo">5708</span>      assertTrue(hasNext);<a name="line.5708"></a>
-<span class="sourceLineNo">5709</span>      // 5. scan out "row0" (1 kv)<a name="line.5709"></a>
-<span class="sourceLineNo">5710</span>      currRow.clear();<a name="line.5710"></a>
-<span class="sourceLineNo">5711</span>      hasNext = scanner.next(currRow);<a name="line.5711"></a>
-<span class="sourceLineNo">5712</span>      assertEquals(1, currRow.size());<a name="line.5712"></a>
-<span class="sourceLineNo">5713</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5713"></a>
-<span class="sourceLineNo">5714</span>          .get(0).getRowLength(), row0, 0, row0.length));<a name="line.5714"></a>
-<span class="sourceLineNo">5715</span>      assertFalse(hasNext);<a name="line.5715"></a>
-<span class="sourceLineNo">5716</span><a name="line.5716"></a>
-<span class="sourceLineNo">5717</span>      scanner.close();<a name="line.5717"></a>
-<span class="sourceLineNo">5718</span>    } finally {<a name="line.5718"></a>
-<span class="sourceLineNo">5719</span>      HBaseTestingUtility.closeRegionAndWAL(this.region);<a name="line.5719"></a>
-<span class="sourceLineNo">5720</span>      this.region = null;<a name="line.5720"></a>
-<span class="sourceLineNo">5721</span>    }<a name="line.5721"></a>
-<span class="sourceLineNo">5722</span>  }<a name="line.5722"></a>
-<span class="sourceLineNo">5723</span><a name="line.5723"></a>
-<span class="sourceLineNo">5724</span>  @Test (timeout=60000)<a name="line.5724"></a>
-<span class="sourceLineNo">5725</span>  public void testReverseScanner_FromMemStoreAndHFiles_MultiCFs2()<a name="line.5725"></a>
-<span class="sourceLineNo">5726</span>      throws IOException {<a name="line.5726"></a>
-<span class="sourceLineNo">5727</span>    byte[] row1 = Bytes.toBytes("row1");<a name="line.5727"></a>
-<span class="sourceLineNo">5728</span>    byte[] row2 = Bytes.toBytes("row2");<a name="line.5728"></a>
-<span class="sourceLineNo">5729</span>    byte[] row3 = Bytes.toBytes("row3");<a name="line.5729"></a>
-<span class="sourceLineNo">5730</span>    byte[] row4 = Bytes.toBytes("row4");<a name="line.5730"></a>
-<span class="sourceLineNo">5731</span>    byte[] cf1 = Bytes.toBytes("CF1");<a name="line.5731"></a>
-<span class="sourceLineNo">5732</span>    byte[] cf2 = Bytes.toBytes("CF2");<a name="line.5732"></a>
-<span class="sourceLineNo">5733</span>    byte[] cf3 = Bytes.toBytes("CF3");<a name="line.5733"></a>
-<span class="sourceLineNo">5734</span>    byte[] cf4 = Bytes.toBytes("CF4");<a name="line.5734"></a>
-<span class="sourceLineNo">5735</span>    byte[][] families = { cf1, cf2, cf3, cf4 };<a name="line.5735"></a>
-<span class="sourceLineNo">5736</span>    byte[] col = Bytes.toBytes("C");<a name="line.5736"></a>
-<span class="sourceLineNo">5737</span>    long ts = 1;<a name="line.5737"></a>
-<span class="sourceLineNo">5738</span>    String method = this.getName();<a name="line.5738"></a>
-<span class="sourceLineNo">5739</span>    HBaseConfiguration conf = new HBaseConfiguration();<a name="line.5739"></a>
-<span class="sourceLineNo">5740</span>    // disable compactions in this test.<a name="line.5740"></a>
-<span class="sourceLineNo">5741</span>    conf.setInt("hbase.hstore.compactionThreshold", 10000);<a name="line.5741"></a>
-<span class="sourceLineNo">5742</span>    this.region = initHRegion(tableName, method, conf, families);<a name="line.5742"></a>
-<span class="sourceLineNo">5743</span>    try {<a name="line.5743"></a>
-<span class="sourceLineNo">5744</span>      KeyValue kv1 = new KeyValue(row1, cf1, col, ts, KeyValue.Type.Put, null);<a name="line.5744"></a>
-<span class="sourceLineNo">5745</span>      KeyValue kv2 = new KeyValue(row2, cf2, col, ts, KeyValue.Type.Put, null);<a name="line.5745"></a>
-<span class="sourceLineNo">5746</span>      KeyValue kv3 = new KeyValue(row3, cf3, col, ts, KeyValue.Type.Put, null);<a name="line.5746"></a>
-<span class="sourceLineNo">5747</span>      KeyValue kv4 = new KeyValue(row4, cf4, col, ts, KeyValue.Type.Put, null);<a name="line.5747"></a>
-<span class="sourceLineNo">5748</span>      // storefile1<a name="line.5748"></a>
-<span class="sourceLineNo">5749</span>      Put put = new Put(row1);<a name="line.5749"></a>
-<span class="sourceLineNo">5750</span>      put.add(kv1);<a name="line.5750"></a>
-<span class="sourceLineNo">5751</span>      region.put(put);<a name="line.5751"></a>
-<span class="sourceLineNo">5752</span>      region.flush(true);<a name="line.5752"></a>
-<span class="sourceLineNo">5753</span>      // storefile2<a name="line.5753"></a>
-<span class="sourceLineNo">5754</span>      put = new Put(row2);<a name="line.5754"></a>
-<span class="sourceLineNo">5755</span>      put.add(kv2);<a name="line.5755"></a>
-<span class="sourceLineNo">5756</span>      region.put(put);<a name="line.5756"></a>
-<span class="sourceLineNo">5757</span>      region.flush(true);<a name="line.5757"></a>
-<span class="sourceLineNo">5758</span>      // storefile3<a name="line.5758"></a>
-<span class="sourceLineNo">5759</span>      put = new Put(row3);<a name="line.5759"></a>
-<span class="sourceLineNo">5760</span>      put.add(kv3);<a name="line.5760"></a>
-<span class="sourceLineNo">5761</span>      region.put(put);<a name="line.5761"></a>
-<span class="sourceLineNo">5762</span>      region.flush(true);<a name="line.5762"></a>
-<span class="sourceLineNo">5763</span>      // memstore<a name="line.5763"></a>
-<span class="sourceLineNo">5764</span>      put = new Put(row4);<a name="line.5764"></a>
-<span class="sourceLineNo">5765</span>      put.add(kv4);<a name="line.5765"></a>
-<span class="sourceLineNo">5766</span>      region.put(put);<a name="line.5766"></a>
-<span class="sourceLineNo">5767</span>      // scan range = ["row4", min)<a name="line.5767"></a>
-<span class="sourceLineNo">5768</span>      Scan scan = new Scan(row4);<a name="line.5768"></a>
-<span class="sourceLineNo">5769</span>      scan.setReversed(true);<a name="line.5769"></a>
-<span class="sourceLineNo">5770</span>      scan.setBatch(10);<a name="line.5770"></a>
-<span class="sourceLineNo">5771</span>      InternalScanner scanner = region.getScanner(scan);<a name="line.5771"></a>
-<span class="sourceLineNo">5772</span>      List&lt;Cell&gt; currRow = new ArrayList&lt;Cell&gt;();<a name="line.5772"></a>
-<span class="sourceLineNo">5773</span>      boolean hasNext = scanner.next(currRow);<a name="line.5773"></a>
-<span class="sourceLineNo">5774</span>      assertEquals(1, currRow.size());<a name="line.5774"></a>
-<span class="sourceLineNo">5775</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5775"></a>
-<span class="sourceLineNo">5776</span>          .get(0).getRowLength(), row4, 0, row4.length));<a name="line.5776"></a>
-<span class="sourceLineNo">5777</span>      assertTrue(hasNext);<a name="line.5777"></a>
-<span class="sourceLineNo">5778</span>      currRow.clear();<a name="line.5778"></a>
-<span class="sourceLineNo">5779</span>      hasNext = scanner.next(currRow);<a name="line.5779"></a>
-<span class="sourceLineNo">5780</span>      assertEquals(1, currRow.size());<a name="line.5780"></a>
-<span class="sourceLineNo">5781</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5781"></a>
-<span class="sourceLineNo">5782</span>          .get(0).getRowLength(), row3, 0, row3.length));<a name="line.5782"></a>
-<span class="sourceLineNo">5783</span>      assertTrue(hasNext);<a name="line.5783"></a>
-<span class="sourceLineNo">5784</span>      currRow.clear();<a name="line.5784"></a>
-<span class="sourceLineNo">5785</span>      hasNext = scanner.next(currRow);<a name="line.5785"></a>
-<span class="sourceLineNo">5786</span>      assertEquals(1, currRow.size());<a name="line.5786"></a>
-<span class="sourceLineNo">5787</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5787"></a>
-<span class="sourceLineNo">5788</span>          .get(0).getRowLength(), row2, 0, row2.length));<a name="line.5788"></a>
-<span class="sourceLineNo">5789</span>      assertTrue(hasNext);<a name="line.5789"></a>
-<span class="sourceLineNo">5790</span>      currRow.clear();<a name="line.5790"></a>
-<span class="sourceLineNo">5791</span>      hasNext = scanner.next(currRow);<a name="line.5791"></a>
-<span class="sourceLineNo">5792</span>      assertEquals(1, currRow.size());<a name="line.5792"></a>
-<span class="sourceLineNo">5793</span>      assertTrue(Bytes.equals(currRow.get(0).getRowArray(), currRow.get(0).getRowOffset(), currRow<a name="line.5793"></a>
-<span class="sourceLineNo">5794</span>          .get(0).getRowLength(), row1, 0, row1.length));<a name="line.5794"></a>
-<span class="sourceLineNo">5795</span>      assertFalse(hasNext);<a name="line.5795"></a>
-<span class="sourceLineNo">5796</span>    } finally {<a name="line.5796"></a>
-<span class="sourceLineNo">5797</span>      HBaseTestingUtility.closeRegionAndWAL(this.region);<a name="line.5797"></a>
-<span class="sourceLineNo">5798</span>      this.region = null;<a name="line.5798"></a>
-<span class="sourceLineNo">5799</span>    }<a name="line.5799"></a>
-<span class="sourceLineNo">5800</span>  }<a name="line.5800"></a>
-<span class="sourceLineNo">5801</span><a name="line.5801"></a>
-<span class="sourceLineNo">5802</span>  /**<a name="line.5802"></a>
-<span class="sourceLineNo">5803</span>   * Test for HBASE-14497: Reverse Scan threw StackOverflow caused by readPt checking<a name="line.5803"></a>
-<span class="sourceLineNo">5804</span>   */<a name="line.5804"></a>
-<span class="sourceLineNo">5805</span>  @Test (timeout = 60000)<a name="line.5805"></a>
-<span class="sourceLineNo">5806</span>  public void testReverseScanner_StackOverflow() throws IOException {<a name="line.5806"></a>
-<span class="sourceLineNo">5807</span>    byte[] cf1 = Bytes.toBytes("CF1");<a name="line.5807"></a>
-<span class="sourceLineNo">5808</span>    byte[][] families = {cf1};<a name="line.5808"></a>
-<span class="sourceLineNo">5809</span>    byte[] col = Bytes.toBytes("C");<a name="line.5809"></a>
-<span class="sourceLineNo">5810</span>    String method = this.getName();<a name="line.5810"></a>
-<span class="sourceLineNo">5811</span>    HBaseConfiguration conf = new HBaseConfiguration();<a name="line.5811"></a>
-<span class="sourceLineNo">5812</span>    this.region = initHRegion(tableName, method, conf, families);<a name="line.5812"></a>
-<span class="sourceLineNo">5813</span>    try {<a name="line.5813"></a>
-<span class="sourceLineNo">5814</span>      // setup with one storefile and one memstore, to create scanner and get an earlier readPt<a name="line.5814"></a>
-<span class="sourceLineNo">5815</span>      Put put = new Put(Bytes.toBytes("19998"));<a name="line.5815"></a>
-<span class="sourceLineNo">5816</span>      put.addColumn(cf1, col, Bytes.toBytes("val"));<a name="line.5816"></a>
-<span class="sourceLineNo">5817</span>      region.put(put);<a name="line.5817"></a>
-<span class="sourceLineNo">5818</span>      region.flushcache(true, true);<a name="line.5818"></a>
-<span class="sourceLineNo">5819</span>      Put put2 = new Put(Bytes.toBytes("19997"));<a name="line.5819"></a>
-<span class="sourceLineNo">5820</span>      put2.addColumn(cf1, col, Bytes.toBytes("val"));<a name="line.5820"></a>
-<span class="sourceLineNo">5821</span>      region.put(put2);<a name="line.5821"></a>
-<span class="sourceLineNo">5822</span><a name="line.5822"></a>
-<span class="sourceLineNo">5823</span>      Scan scan = new Scan(Bytes.toBytes("19998"));<a name="line.5823"></a>
-<span class="sourceLineNo">5824</span>      scan.setReversed(true);<a name="line.5824"></a>
-<span class="sourceLineNo">5825</span>      InternalScanner scanner = region.getScanner(scan);<a name="line.5825"></a>
-<span class="sourceLineNo">5826</span><a name="line.5826"></a>
-<span class="sourceLineNo">5827</span>      // create one storefile contains many rows will be skipped<a name="line.5827"></a>
-<span class="sourceLineNo">5828</span>      // to check StoreFileScanner.seekToPreviousRow<a name="line.5828"></a>
-<span class="sourceLineNo">5829</span>      for (int i = 10000; i &lt; 20000; i++) {<a name="line.5829"></a>
-<span class="sourceLineNo">5830</span>        Put p = new Put(Bytes.toBytes(""+i));<a name="line.5830"></a>
-<span class="sourceLineNo">5831</span>        p.addColumn(cf1, col, Bytes.toBytes("" + i));<a name="line.5831"></a>
-<span class="sourceLineNo">5832</span>        region.put(p);<a name="line.5832"></a>
-<span class="sourceLineNo">5833</span>      }<a name="line.5833"></a>
-<span class="sourceLineNo">5834</span>      region.flushcache(true, true);<a name="line.5834"></a>
-<span class="sourceLineNo">5835</span><a name="line.5835"></a>
-<span class="sourceLineNo">5836</span>      // create one memstore contains many rows will be skipped<a name="line.5836"></a>
-<span class="sourceLineNo">5837</span>      // to check MemStoreScanner.seekToPreviousRow<a name="line.5837"></a>
-<span class="sourceLineNo">5838</span>      for (int i = 10000; i &lt; 20000; i++) {<a name="line.5838"></a>
-<span class="sourceLineNo">5839</span>        Put p = new Put(Bytes.toBytes(""+i));<a name="line.5839"></a>
-<span class="sourceLineNo">5840</span>        p.addColumn(cf1, col, Bytes.toBytes("" + i));<a name="line.5840"></a>
-<span class="sourceLineNo">5841</span>        region.put(p);<a name="line.5841"></a>
-<span class="sourceLineNo">5842</span>      }<a name="line.5842"></a>
-<span class="sourceLineNo">5843</span><a name="line.5843"></a>
-<span class="sourceLineNo">5844</span>      List&lt;Cell&gt; currRow = new ArrayList&lt;&gt;();<a name="line.5844"></a>
-<span class="sourceLineNo">5845</span>      boolean hasNext;<a name="line.5845"></a>
-<span class="sourceLineNo">5846</span>      do {<a name="line.5846"></a>
-<span class="sourceLineNo">5847</span>        hasNext = scanner.next(currRow);<a name="line.5847"></a>
-<span class="sourceLineNo">5848</span>      } while (hasNext);<a name="line.5848"></a>
-<span class="sourceLineNo">5849</span>      assertEquals(2, currRow.size());<a name="line.5849"></a>
-<span class="sourceLineNo">5850</span>      assertEquals("19998", Bytes.toString(currRow.get(0).getRowArray(),<a name="line.5850"></a>
-<span class="sourceLineNo">5851</span>        currRow.get(0).getRowOffset(), currRow.get(0).getRowLength()));<a name="line.5851"></a>
-<span class="sourceLineNo">5852</span>      assertEquals("19997", Bytes.toString(currRow.get(1).getRowArray(),<a name="line.5852"></a>
-<span class="sourceLineNo">5853</span>        currRow.get(1).getRowOffset(), currRow.get(1).getRowLength()));<a name="line.5853"></a>
-<span class="sourceLineNo">5854</span>    } finally {<a name="line.5854"></a>
-<span class="sourceLineNo">5855</span>      HBaseTestingUtility.closeRegionAndWAL(this.region);<a name="line.5855"></a>
-<span class="sourceLineNo">5856</span>      this.region = null;<a name="line.5856"></a>
-<span class="sourceLineNo">5857</span>    }<a name="line.5857"></a>
-<span class="sourceLineNo">5858</span>  }<a name="line.5858"></a>
-<span class="sourceLineNo">5859</span><a name="line.5859"></a>
-<span class="sourceLineNo">5860</span>  @Test (timeout=60000)<a name="line.5860"></a>
-<span class="sourceLineNo">5861</span>  public void testSplitRegionWithReverseScan() throws IOException {<a name="line.5861"></a>
-<span class="sourceLineNo">5862</span>    TableName tableName = TableName.valueOf("testSplitRegionWithReverseScan");<a name="line.5862"></a>
-<span class="sourceLineNo">5863</span>    byte [] qualifier = Bytes.toBytes("qualifier");<a name="line.5863"></a>
-<span class="sourceLineNo">5864</span>    Configuration hc = initSplit();<a name="line.5864"></a>
-<span class="sourceLineNo">5865</span>    int numRows = 3;<a name="line.5865"></a>
-<span class="sourceLineNo">5866</span>    byte [][] families = {fam1};<a name="line.5866"></a>
-<span class="sourceLineNo">5867</span><a name="line.5867"></a>
-<span class="sourceLineNo">5868</span>    //Setting up region<a name="line.5868"></a>
-<span class="sourceLineNo">5869</span>    String method = this.getName();<a name="line.5869"></a>
-<span class="sourceLineNo">5870</span>    this.region = initHRegion(tableName, method, hc, families);<a name="line.5870"></a>
-<span class="sourceLineNo">5871</span><a name="line.5871"></a>
-<span class="sourceLineNo">5872</span>    //Put data in region<a name="line.5872"></a>
-<span class="sourceLineNo">5873</span>    int startRow = 100;<a name="line.5873"></a>
-<span class="sourceLineNo">5874</span>    putData(startRow, numRows, qualifier, families);<a name="line.5874"></a>
-<span class="sourceLineNo">5875</span>    int splitRow = startRow + numRows;<a name="line.5875"></a>
-<span class="sourceLineNo">5876</span>    putData(splitRow, numRows, qualifier, families);<a name="line.5876"></a>
-<span class="sourceLineNo">5877</span>    region.flush(true);<a name="line.5877"></a>
-<span class="sourceLineNo">5878</span><a name="line.5878"></a>
-<span class="sourceLineNo">5879</span>    HRegion [] regions = null;<a name="line.5879"></a>
-<span class="sourceLineNo">5880</span>    try {<a name="line.5880"></a>
-<span class="sourceLineNo">5881</span>      regions = splitRegion(region, Bytes.toBytes("" + splitRow));<a name="line.5881"></a>
-<span class="sourceLineNo">5882</span>      //Opening the regions returned.<a name="line.5882"></a>
-<span class="sourceLineNo">5883</span>      for (int i = 0; i &lt; regions.length; i++) {<a name="line.5883"></a>
-<span class="sourceLineNo">5884</span>        regions[i] = HRegion.openHRegion(regions[i], null);<a name="line.5884"></a>
-<span class="sourceLineNo">5885</span>      }<a name="line.5885"></a>
-<span class="sourceLineNo">5886</span>      //Verifying tha

<TRUNCATED>

Mime
View raw message