hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [02/51] [partial] hbase-site git commit: Published site at .
Date Sun, 29 Oct 2017 15:17:03 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/1d9053bc/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HMobStore.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HMobStore.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HMobStore.html
index 45854b6..ae5e4b0 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HMobStore.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/HMobStore.html
@@ -152,8 +152,8 @@
 <span class="sourceLineNo">144</span>   * the mob files should be performed after the seek in HBase is done.<a name="line.144"></a>
 <span class="sourceLineNo">145</span>   */<a name="line.145"></a>
 <span class="sourceLineNo">146</span>  @Override<a name="line.146"></a>
-<span class="sourceLineNo">147</span>  protected KeyValueScanner createScanner(Scan scan, final NavigableSet&lt;byte[]&gt; targetCols,<a name="line.147"></a>
-<span class="sourceLineNo">148</span>      long readPt) throws IOException {<a name="line.148"></a>
+<span class="sourceLineNo">147</span>  protected KeyValueScanner createScanner(Scan scan, ScanInfo scanInfo,<a name="line.147"></a>
+<span class="sourceLineNo">148</span>      NavigableSet&lt;byte[]&gt; targetCols, long readPt) throws IOException {<a name="line.148"></a>
 <span class="sourceLineNo">149</span>    if (MobUtils.isRefOnlyScan(scan)) {<a name="line.149"></a>
 <span class="sourceLineNo">150</span>      Filter refOnlyFilter = new MobReferenceOnlyFilter();<a name="line.150"></a>
 <span class="sourceLineNo">151</span>      Filter filter = scan.getFilter();<a name="line.151"></a>
@@ -163,378 +163,377 @@
 <span class="sourceLineNo">155</span>        scan.setFilter(refOnlyFilter);<a name="line.155"></a>
 <span class="sourceLineNo">156</span>      }<a name="line.156"></a>
 <span class="sourceLineNo">157</span>    }<a name="line.157"></a>
-<span class="sourceLineNo">158</span>    return scan.isReversed()<a name="line.158"></a>
-<span class="sourceLineNo">159</span>        ? new ReversedMobStoreScanner(this, getScanInfo(), scan, targetCols, readPt)<a name="line.159"></a>
-<span class="sourceLineNo">160</span>        : new MobStoreScanner(this, getScanInfo(), scan, targetCols, readPt);<a name="line.160"></a>
-<span class="sourceLineNo">161</span>  }<a name="line.161"></a>
-<span class="sourceLineNo">162</span><a name="line.162"></a>
-<span class="sourceLineNo">163</span>  /**<a name="line.163"></a>
-<span class="sourceLineNo">164</span>   * Creates the mob store engine.<a name="line.164"></a>
-<span class="sourceLineNo">165</span>   */<a name="line.165"></a>
-<span class="sourceLineNo">166</span>  @Override<a name="line.166"></a>
-<span class="sourceLineNo">167</span>  protected StoreEngine&lt;?, ?, ?, ?&gt; createStoreEngine(HStore store, Configuration conf,<a name="line.167"></a>
-<span class="sourceLineNo">168</span>      CellComparator cellComparator) throws IOException {<a name="line.168"></a>
-<span class="sourceLineNo">169</span>    MobStoreEngine engine = new MobStoreEngine();<a name="line.169"></a>
-<span class="sourceLineNo">170</span>    engine.createComponents(conf, store, cellComparator);<a name="line.170"></a>
-<span class="sourceLineNo">171</span>    return engine;<a name="line.171"></a>
-<span class="sourceLineNo">172</span>  }<a name="line.172"></a>
-<span class="sourceLineNo">173</span><a name="line.173"></a>
-<span class="sourceLineNo">174</span>  /**<a name="line.174"></a>
-<span class="sourceLineNo">175</span>   * Gets the temp directory.<a name="line.175"></a>
-<span class="sourceLineNo">176</span>   * @return The temp directory.<a name="line.176"></a>
-<span class="sourceLineNo">177</span>   */<a name="line.177"></a>
-<span class="sourceLineNo">178</span>  private Path getTempDir() {<a name="line.178"></a>
-<span class="sourceLineNo">179</span>    return new Path(homePath, MobConstants.TEMP_DIR_NAME);<a name="line.179"></a>
-<span class="sourceLineNo">180</span>  }<a name="line.180"></a>
-<span class="sourceLineNo">181</span><a name="line.181"></a>
-<span class="sourceLineNo">182</span>  /**<a name="line.182"></a>
-<span class="sourceLineNo">183</span>   * Creates the writer for the mob file in temp directory.<a name="line.183"></a>
-<span class="sourceLineNo">184</span>   * @param date The latest date of written cells.<a name="line.184"></a>
-<span class="sourceLineNo">185</span>   * @param maxKeyCount The key count.<a name="line.185"></a>
-<span class="sourceLineNo">186</span>   * @param compression The compression algorithm.<a name="line.186"></a>
-<span class="sourceLineNo">187</span>   * @param startKey The start key.<a name="line.187"></a>
-<span class="sourceLineNo">188</span>   * @param isCompaction If the writer is used in compaction.<a name="line.188"></a>
-<span class="sourceLineNo">189</span>   * @return The writer for the mob file.<a name="line.189"></a>
-<span class="sourceLineNo">190</span>   * @throws IOException<a name="line.190"></a>
-<span class="sourceLineNo">191</span>   */<a name="line.191"></a>
-<span class="sourceLineNo">192</span>  public StoreFileWriter createWriterInTmp(Date date, long maxKeyCount,<a name="line.192"></a>
-<span class="sourceLineNo">193</span>      Compression.Algorithm compression, byte[] startKey,<a name="line.193"></a>
-<span class="sourceLineNo">194</span>      boolean isCompaction) throws IOException {<a name="line.194"></a>
-<span class="sourceLineNo">195</span>    if (startKey == null) {<a name="line.195"></a>
-<span class="sourceLineNo">196</span>      startKey = HConstants.EMPTY_START_ROW;<a name="line.196"></a>
-<span class="sourceLineNo">197</span>    }<a name="line.197"></a>
-<span class="sourceLineNo">198</span>    Path path = getTempDir();<a name="line.198"></a>
-<span class="sourceLineNo">199</span>    return createWriterInTmp(MobUtils.formatDate(date), path, maxKeyCount, compression, startKey,<a name="line.199"></a>
-<span class="sourceLineNo">200</span>      isCompaction);<a name="line.200"></a>
-<span class="sourceLineNo">201</span>  }<a name="line.201"></a>
-<span class="sourceLineNo">202</span><a name="line.202"></a>
-<span class="sourceLineNo">203</span>  /**<a name="line.203"></a>
-<span class="sourceLineNo">204</span>   * Creates the writer for the del file in temp directory.<a name="line.204"></a>
-<span class="sourceLineNo">205</span>   * The del file keeps tracking the delete markers. Its name has a suffix _del,<a name="line.205"></a>
-<span class="sourceLineNo">206</span>   * the format is [0-9a-f]+(_del)?.<a name="line.206"></a>
-<span class="sourceLineNo">207</span>   * @param date The latest date of written cells.<a name="line.207"></a>
-<span class="sourceLineNo">208</span>   * @param maxKeyCount The key count.<a name="line.208"></a>
-<span class="sourceLineNo">209</span>   * @param compression The compression algorithm.<a name="line.209"></a>
-<span class="sourceLineNo">210</span>   * @param startKey The start key.<a name="line.210"></a>
-<span class="sourceLineNo">211</span>   * @return The writer for the del file.<a name="line.211"></a>
-<span class="sourceLineNo">212</span>   * @throws IOException<a name="line.212"></a>
-<span class="sourceLineNo">213</span>   */<a name="line.213"></a>
-<span class="sourceLineNo">214</span>  public StoreFileWriter createDelFileWriterInTmp(Date date, long maxKeyCount,<a name="line.214"></a>
-<span class="sourceLineNo">215</span>      Compression.Algorithm compression, byte[] startKey) throws IOException {<a name="line.215"></a>
-<span class="sourceLineNo">216</span>    if (startKey == null) {<a name="line.216"></a>
-<span class="sourceLineNo">217</span>      startKey = HConstants.EMPTY_START_ROW;<a name="line.217"></a>
-<span class="sourceLineNo">218</span>    }<a name="line.218"></a>
-<span class="sourceLineNo">219</span>    Path path = getTempDir();<a name="line.219"></a>
-<span class="sourceLineNo">220</span>    String suffix = UUID<a name="line.220"></a>
-<span class="sourceLineNo">221</span>        .randomUUID().toString().replaceAll("-", "") + "_del";<a name="line.221"></a>
-<span class="sourceLineNo">222</span>    MobFileName mobFileName = MobFileName.create(startKey, MobUtils.formatDate(date), suffix);<a name="line.222"></a>
-<span class="sourceLineNo">223</span>    return createWriterInTmp(mobFileName, path, maxKeyCount, compression, true);<a name="line.223"></a>
-<span class="sourceLineNo">224</span>  }<a name="line.224"></a>
-<span class="sourceLineNo">225</span><a name="line.225"></a>
-<span class="sourceLineNo">226</span>  /**<a name="line.226"></a>
-<span class="sourceLineNo">227</span>   * Creates the writer for the mob file in temp directory.<a name="line.227"></a>
-<span class="sourceLineNo">228</span>   * @param date The date string, its format is yyyymmmdd.<a name="line.228"></a>
-<span class="sourceLineNo">229</span>   * @param basePath The basic path for a temp directory.<a name="line.229"></a>
-<span class="sourceLineNo">230</span>   * @param maxKeyCount The key count.<a name="line.230"></a>
-<span class="sourceLineNo">231</span>   * @param compression The compression algorithm.<a name="line.231"></a>
-<span class="sourceLineNo">232</span>   * @param startKey The start key.<a name="line.232"></a>
-<span class="sourceLineNo">233</span>   * @param isCompaction If the writer is used in compaction.<a name="line.233"></a>
-<span class="sourceLineNo">234</span>   * @return The writer for the mob file.<a name="line.234"></a>
-<span class="sourceLineNo">235</span>   * @throws IOException<a name="line.235"></a>
-<span class="sourceLineNo">236</span>   */<a name="line.236"></a>
-<span class="sourceLineNo">237</span>  public StoreFileWriter createWriterInTmp(String date, Path basePath, long maxKeyCount,<a name="line.237"></a>
-<span class="sourceLineNo">238</span>      Compression.Algorithm compression, byte[] startKey,<a name="line.238"></a>
-<span class="sourceLineNo">239</span>      boolean isCompaction) throws IOException {<a name="line.239"></a>
-<span class="sourceLineNo">240</span>    MobFileName mobFileName = MobFileName.create(startKey, date, UUID.randomUUID()<a name="line.240"></a>
-<span class="sourceLineNo">241</span>        .toString().replaceAll("-", ""));<a name="line.241"></a>
-<span class="sourceLineNo">242</span>    return createWriterInTmp(mobFileName, basePath, maxKeyCount, compression, isCompaction);<a name="line.242"></a>
-<span class="sourceLineNo">243</span>  }<a name="line.243"></a>
-<span class="sourceLineNo">244</span><a name="line.244"></a>
-<span class="sourceLineNo">245</span>  /**<a name="line.245"></a>
-<span class="sourceLineNo">246</span>   * Creates the writer for the mob file in temp directory.<a name="line.246"></a>
-<span class="sourceLineNo">247</span>   * @param mobFileName The mob file name.<a name="line.247"></a>
-<span class="sourceLineNo">248</span>   * @param basePath The basic path for a temp directory.<a name="line.248"></a>
-<span class="sourceLineNo">249</span>   * @param maxKeyCount The key count.<a name="line.249"></a>
-<span class="sourceLineNo">250</span>   * @param compression The compression algorithm.<a name="line.250"></a>
-<span class="sourceLineNo">251</span>   * @param isCompaction If the writer is used in compaction.<a name="line.251"></a>
-<span class="sourceLineNo">252</span>   * @return The writer for the mob file.<a name="line.252"></a>
-<span class="sourceLineNo">253</span>   * @throws IOException<a name="line.253"></a>
-<span class="sourceLineNo">254</span>   */<a name="line.254"></a>
-<span class="sourceLineNo">255</span>  public StoreFileWriter createWriterInTmp(MobFileName mobFileName, Path basePath,<a name="line.255"></a>
-<span class="sourceLineNo">256</span>      long maxKeyCount, Compression.Algorithm compression,<a name="line.256"></a>
-<span class="sourceLineNo">257</span>      boolean isCompaction) throws IOException {<a name="line.257"></a>
-<span class="sourceLineNo">258</span>    return MobUtils.createWriter(conf, region.getFilesystem(), family,<a name="line.258"></a>
-<span class="sourceLineNo">259</span>      new Path(basePath, mobFileName.getFileName()), maxKeyCount, compression, mobCacheConfig,<a name="line.259"></a>
-<span class="sourceLineNo">260</span>      cryptoContext, checksumType, bytesPerChecksum, blocksize, BloomType.NONE, isCompaction);<a name="line.260"></a>
-<span class="sourceLineNo">261</span>  }<a name="line.261"></a>
-<span class="sourceLineNo">262</span><a name="line.262"></a>
-<span class="sourceLineNo">263</span>  /**<a name="line.263"></a>
-<span class="sourceLineNo">264</span>   * Commits the mob file.<a name="line.264"></a>
-<span class="sourceLineNo">265</span>   * @param sourceFile The source file.<a name="line.265"></a>
-<span class="sourceLineNo">266</span>   * @param targetPath The directory path where the source file is renamed to.<a name="line.266"></a>
-<span class="sourceLineNo">267</span>   * @throws IOException<a name="line.267"></a>
-<span class="sourceLineNo">268</span>   */<a name="line.268"></a>
-<span class="sourceLineNo">269</span>  public void commitFile(final Path sourceFile, Path targetPath) throws IOException {<a name="line.269"></a>
-<span class="sourceLineNo">270</span>    if (sourceFile == null) {<a name="line.270"></a>
-<span class="sourceLineNo">271</span>      return;<a name="line.271"></a>
-<span class="sourceLineNo">272</span>    }<a name="line.272"></a>
-<span class="sourceLineNo">273</span>    Path dstPath = new Path(targetPath, sourceFile.getName());<a name="line.273"></a>
-<span class="sourceLineNo">274</span>    validateMobFile(sourceFile);<a name="line.274"></a>
-<span class="sourceLineNo">275</span>    String msg = "Renaming flushed file from " + sourceFile + " to " + dstPath;<a name="line.275"></a>
-<span class="sourceLineNo">276</span>    LOG.info(msg);<a name="line.276"></a>
-<span class="sourceLineNo">277</span>    Path parent = dstPath.getParent();<a name="line.277"></a>
-<span class="sourceLineNo">278</span>    if (!region.getFilesystem().exists(parent)) {<a name="line.278"></a>
-<span class="sourceLineNo">279</span>      region.getFilesystem().mkdirs(parent);<a name="line.279"></a>
-<span class="sourceLineNo">280</span>    }<a name="line.280"></a>
-<span class="sourceLineNo">281</span>    if (!region.getFilesystem().rename(sourceFile, dstPath)) {<a name="line.281"></a>
-<span class="sourceLineNo">282</span>      throw new IOException("Failed rename of " + sourceFile + " to " + dstPath);<a name="line.282"></a>
-<span class="sourceLineNo">283</span>    }<a name="line.283"></a>
-<span class="sourceLineNo">284</span>  }<a name="line.284"></a>
-<span class="sourceLineNo">285</span><a name="line.285"></a>
-<span class="sourceLineNo">286</span>  /**<a name="line.286"></a>
-<span class="sourceLineNo">287</span>   * Validates a mob file by opening and closing it.<a name="line.287"></a>
-<span class="sourceLineNo">288</span>   *<a name="line.288"></a>
-<span class="sourceLineNo">289</span>   * @param path the path to the mob file<a name="line.289"></a>
-<span class="sourceLineNo">290</span>   */<a name="line.290"></a>
-<span class="sourceLineNo">291</span>  private void validateMobFile(Path path) throws IOException {<a name="line.291"></a>
-<span class="sourceLineNo">292</span>    HStoreFile storeFile = null;<a name="line.292"></a>
-<span class="sourceLineNo">293</span>    try {<a name="line.293"></a>
-<span class="sourceLineNo">294</span>      storeFile = new HStoreFile(region.getFilesystem(), path, conf, this.mobCacheConfig,<a name="line.294"></a>
-<span class="sourceLineNo">295</span>          BloomType.NONE, isPrimaryReplicaStore());<a name="line.295"></a>
-<span class="sourceLineNo">296</span>      storeFile.initReader();<a name="line.296"></a>
-<span class="sourceLineNo">297</span>    } catch (IOException e) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>      LOG.error("Fail to open mob file[" + path + "], keep it in temp directory.", e);<a name="line.298"></a>
-<span class="sourceLineNo">299</span>      throw e;<a name="line.299"></a>
-<span class="sourceLineNo">300</span>    } finally {<a name="line.300"></a>
-<span class="sourceLineNo">301</span>      if (storeFile != null) {<a name="line.301"></a>
-<span class="sourceLineNo">302</span>        storeFile.closeStoreFile(false);<a name="line.302"></a>
-<span class="sourceLineNo">303</span>      }<a name="line.303"></a>
-<span class="sourceLineNo">304</span>    }<a name="line.304"></a>
-<span class="sourceLineNo">305</span>  }<a name="line.305"></a>
-<span class="sourceLineNo">306</span><a name="line.306"></a>
-<span class="sourceLineNo">307</span>  /**<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   * Reads the cell from the mob file, and the read point does not count.<a name="line.308"></a>
-<span class="sourceLineNo">309</span>   * This is used for DefaultMobStoreCompactor where we can read empty value for the missing cell.<a name="line.309"></a>
-<span class="sourceLineNo">310</span>   * @param reference The cell found in the HBase, its value is a path to a mob file.<a name="line.310"></a>
-<span class="sourceLineNo">311</span>   * @param cacheBlocks Whether the scanner should cache blocks.<a name="line.311"></a>
-<span class="sourceLineNo">312</span>   * @return The cell found in the mob file.<a name="line.312"></a>
-<span class="sourceLineNo">313</span>   * @throws IOException<a name="line.313"></a>
-<span class="sourceLineNo">314</span>   */<a name="line.314"></a>
-<span class="sourceLineNo">315</span>  public Cell resolve(Cell reference, boolean cacheBlocks) throws IOException {<a name="line.315"></a>
-<span class="sourceLineNo">316</span>    return resolve(reference, cacheBlocks, -1, true);<a name="line.316"></a>
-<span class="sourceLineNo">317</span>  }<a name="line.317"></a>
-<span class="sourceLineNo">318</span><a name="line.318"></a>
-<span class="sourceLineNo">319</span>  /**<a name="line.319"></a>
-<span class="sourceLineNo">320</span>   * Reads the cell from the mob file.<a name="line.320"></a>
-<span class="sourceLineNo">321</span>   * @param reference The cell found in the HBase, its value is a path to a mob file.<a name="line.321"></a>
-<span class="sourceLineNo">322</span>   * @param cacheBlocks Whether the scanner should cache blocks.<a name="line.322"></a>
-<span class="sourceLineNo">323</span>   * @param readPt the read point.<a name="line.323"></a>
-<span class="sourceLineNo">324</span>   * @param readEmptyValueOnMobCellMiss Whether return null value when the mob file is<a name="line.324"></a>
-<span class="sourceLineNo">325</span>   *        missing or corrupt.<a name="line.325"></a>
-<span class="sourceLineNo">326</span>   * @return The cell found in the mob file.<a name="line.326"></a>
-<span class="sourceLineNo">327</span>   * @throws IOException<a name="line.327"></a>
-<span class="sourceLineNo">328</span>   */<a name="line.328"></a>
-<span class="sourceLineNo">329</span>  public Cell resolve(Cell reference, boolean cacheBlocks, long readPt,<a name="line.329"></a>
-<span class="sourceLineNo">330</span>    boolean readEmptyValueOnMobCellMiss) throws IOException {<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    Cell result = null;<a name="line.331"></a>
-<span class="sourceLineNo">332</span>    if (MobUtils.hasValidMobRefCellValue(reference)) {<a name="line.332"></a>
-<span class="sourceLineNo">333</span>      String fileName = MobUtils.getMobFileName(reference);<a name="line.333"></a>
-<span class="sourceLineNo">334</span>      Tag tableNameTag = MobUtils.getTableNameTag(reference);<a name="line.334"></a>
-<span class="sourceLineNo">335</span>      if (tableNameTag != null) {<a name="line.335"></a>
-<span class="sourceLineNo">336</span>        String tableNameString = TagUtil.getValueAsString(tableNameTag);<a name="line.336"></a>
-<span class="sourceLineNo">337</span>        List&lt;Path&gt; locations = map.get(tableNameString);<a name="line.337"></a>
-<span class="sourceLineNo">338</span>        if (locations == null) {<a name="line.338"></a>
-<span class="sourceLineNo">339</span>          IdLock.Entry lockEntry = keyLock.getLockEntry(tableNameString.hashCode());<a name="line.339"></a>
-<span class="sourceLineNo">340</span>          try {<a name="line.340"></a>
-<span class="sourceLineNo">341</span>            locations = map.get(tableNameString);<a name="line.341"></a>
-<span class="sourceLineNo">342</span>            if (locations == null) {<a name="line.342"></a>
-<span class="sourceLineNo">343</span>              locations = new ArrayList&lt;&gt;(2);<a name="line.343"></a>
-<span class="sourceLineNo">344</span>              TableName tn = TableName.valueOf(tableNameString);<a name="line.344"></a>
-<span class="sourceLineNo">345</span>              locations.add(MobUtils.getMobFamilyPath(conf, tn, family.getNameAsString()));<a name="line.345"></a>
-<span class="sourceLineNo">346</span>              locations.add(HFileArchiveUtil.getStoreArchivePath(conf, tn, MobUtils<a name="line.346"></a>
-<span class="sourceLineNo">347</span>                  .getMobRegionInfo(tn).getEncodedName(), family.getNameAsString()));<a name="line.347"></a>
-<span class="sourceLineNo">348</span>              map.put(tableNameString, locations);<a name="line.348"></a>
-<span class="sourceLineNo">349</span>            }<a name="line.349"></a>
-<span class="sourceLineNo">350</span>          } finally {<a name="line.350"></a>
-<span class="sourceLineNo">351</span>            keyLock.releaseLockEntry(lockEntry);<a name="line.351"></a>
-<span class="sourceLineNo">352</span>          }<a name="line.352"></a>
-<span class="sourceLineNo">353</span>        }<a name="line.353"></a>
-<span class="sourceLineNo">354</span>        result = readCell(locations, fileName, reference, cacheBlocks, readPt,<a name="line.354"></a>
-<span class="sourceLineNo">355</span>          readEmptyValueOnMobCellMiss);<a name="line.355"></a>
-<span class="sourceLineNo">356</span>      }<a name="line.356"></a>
-<span class="sourceLineNo">357</span>    }<a name="line.357"></a>
-<span class="sourceLineNo">358</span>    if (result == null) {<a name="line.358"></a>
-<span class="sourceLineNo">359</span>      LOG.warn("The Cell result is null, assemble a new Cell with the same row,family,"<a name="line.359"></a>
-<span class="sourceLineNo">360</span>          + "qualifier,timestamp,type and tags but with an empty value to return.");<a name="line.360"></a>
-<span class="sourceLineNo">361</span>      result = ExtendedCellBuilderFactory.create(CellBuilderType.DEEP_COPY)<a name="line.361"></a>
-<span class="sourceLineNo">362</span>              .setRow(reference.getRowArray(), reference.getRowOffset(), reference.getRowLength())<a name="line.362"></a>
-<span class="sourceLineNo">363</span>              .setFamily(reference.getFamilyArray(), reference.getFamilyOffset(), reference.getFamilyLength())<a name="line.363"></a>
-<span class="sourceLineNo">364</span>              .setQualifier(reference.getQualifierArray(), reference.getQualifierOffset(), reference.getQualifierLength())<a name="line.364"></a>
-<span class="sourceLineNo">365</span>              .setTimestamp(reference.getTimestamp())<a name="line.365"></a>
-<span class="sourceLineNo">366</span>              .setType(reference.getTypeByte())<a name="line.366"></a>
-<span class="sourceLineNo">367</span>              .setValue(HConstants.EMPTY_BYTE_ARRAY)<a name="line.367"></a>
-<span class="sourceLineNo">368</span>              .setTags(reference.getTagsArray(), reference.getTagsOffset(), reference.getTagsLength())<a name="line.368"></a>
-<span class="sourceLineNo">369</span>              .build();<a name="line.369"></a>
-<span class="sourceLineNo">370</span>    }<a name="line.370"></a>
-<span class="sourceLineNo">371</span>    return result;<a name="line.371"></a>
-<span class="sourceLineNo">372</span>  }<a name="line.372"></a>
-<span class="sourceLineNo">373</span><a name="line.373"></a>
-<span class="sourceLineNo">374</span>  /**<a name="line.374"></a>
-<span class="sourceLineNo">375</span>   * Reads the cell from a mob file.<a name="line.375"></a>
-<span class="sourceLineNo">376</span>   * The mob file might be located in different directories.<a name="line.376"></a>
-<span class="sourceLineNo">377</span>   * 1. The working directory.<a name="line.377"></a>
-<span class="sourceLineNo">378</span>   * 2. The archive directory.<a name="line.378"></a>
-<span class="sourceLineNo">379</span>   * Reads the cell from the files located in both of the above directories.<a name="line.379"></a>
-<span class="sourceLineNo">380</span>   * @param locations The possible locations where the mob files are saved.<a name="line.380"></a>
-<span class="sourceLineNo">381</span>   * @param fileName The file to be read.<a name="line.381"></a>
-<span class="sourceLineNo">382</span>   * @param search The cell to be searched.<a name="line.382"></a>
-<span class="sourceLineNo">383</span>   * @param cacheMobBlocks Whether the scanner should cache blocks.<a name="line.383"></a>
-<span class="sourceLineNo">384</span>   * @param readPt the read point.<a name="line.384"></a>
-<span class="sourceLineNo">385</span>   * @param readEmptyValueOnMobCellMiss Whether return null value when the mob file is<a name="line.385"></a>
-<span class="sourceLineNo">386</span>   *        missing or corrupt.<a name="line.386"></a>
-<span class="sourceLineNo">387</span>   * @return The found cell. Null if there's no such a cell.<a name="line.387"></a>
-<span class="sourceLineNo">388</span>   * @throws IOException<a name="line.388"></a>
-<span class="sourceLineNo">389</span>   */<a name="line.389"></a>
-<span class="sourceLineNo">390</span>  private Cell readCell(List&lt;Path&gt; locations, String fileName, Cell search, boolean cacheMobBlocks,<a name="line.390"></a>
-<span class="sourceLineNo">391</span>    long readPt, boolean readEmptyValueOnMobCellMiss) throws IOException {<a name="line.391"></a>
-<span class="sourceLineNo">392</span>    FileSystem fs = getFileSystem();<a name="line.392"></a>
-<span class="sourceLineNo">393</span>    Throwable throwable = null;<a name="line.393"></a>
-<span class="sourceLineNo">394</span>    for (Path location : locations) {<a name="line.394"></a>
-<span class="sourceLineNo">395</span>      MobFile file = null;<a name="line.395"></a>
-<span class="sourceLineNo">396</span>      Path path = new Path(location, fileName);<a name="line.396"></a>
-<span class="sourceLineNo">397</span>      try {<a name="line.397"></a>
-<span class="sourceLineNo">398</span>        file = mobCacheConfig.getMobFileCache().openFile(fs, path, mobCacheConfig);<a name="line.398"></a>
-<span class="sourceLineNo">399</span>        return readPt != -1 ? file.readCell(search, cacheMobBlocks, readPt) : file.readCell(search,<a name="line.399"></a>
-<span class="sourceLineNo">400</span>          cacheMobBlocks);<a name="line.400"></a>
-<span class="sourceLineNo">401</span>      } catch (IOException e) {<a name="line.401"></a>
-<span class="sourceLineNo">402</span>        mobCacheConfig.getMobFileCache().evictFile(fileName);<a name="line.402"></a>
-<span class="sourceLineNo">403</span>        throwable = e;<a name="line.403"></a>
-<span class="sourceLineNo">404</span>        if ((e instanceof FileNotFoundException) ||<a name="line.404"></a>
-<span class="sourceLineNo">405</span>            (e.getCause() instanceof FileNotFoundException)) {<a name="line.405"></a>
-<span class="sourceLineNo">406</span>          LOG.debug("Fail to read the cell, the mob file " + path + " doesn't exist", e);<a name="line.406"></a>
-<span class="sourceLineNo">407</span>        } else if (e instanceof CorruptHFileException) {<a name="line.407"></a>
-<span class="sourceLineNo">408</span>          LOG.error("The mob file " + path + " is corrupt", e);<a name="line.408"></a>
-<span class="sourceLineNo">409</span>          break;<a name="line.409"></a>
-<span class="sourceLineNo">410</span>        } else {<a name="line.410"></a>
-<span class="sourceLineNo">411</span>          throw e;<a name="line.411"></a>
-<span class="sourceLineNo">412</span>        }<a name="line.412"></a>
-<span class="sourceLineNo">413</span>      } catch (NullPointerException e) { // HDFS 1.x - DFSInputStream.getBlockAt()<a name="line.413"></a>
-<span class="sourceLineNo">414</span>        mobCacheConfig.getMobFileCache().evictFile(fileName);<a name="line.414"></a>
-<span class="sourceLineNo">415</span>        LOG.debug("Fail to read the cell", e);<a name="line.415"></a>
-<span class="sourceLineNo">416</span>        throwable = e;<a name="line.416"></a>
-<span class="sourceLineNo">417</span>      } catch (AssertionError e) { // assert in HDFS 1.x - DFSInputStream.getBlockAt()<a name="line.417"></a>
-<span class="sourceLineNo">418</span>        mobCacheConfig.getMobFileCache().evictFile(fileName);<a name="line.418"></a>
-<span class="sourceLineNo">419</span>        LOG.debug("Fail to read the cell", e);<a name="line.419"></a>
-<span class="sourceLineNo">420</span>        throwable = e;<a name="line.420"></a>
-<span class="sourceLineNo">421</span>      } finally {<a name="line.421"></a>
-<span class="sourceLineNo">422</span>        if (file != null) {<a name="line.422"></a>
-<span class="sourceLineNo">423</span>          mobCacheConfig.getMobFileCache().closeFile(file);<a name="line.423"></a>
-<span class="sourceLineNo">424</span>        }<a name="line.424"></a>
-<span class="sourceLineNo">425</span>      }<a name="line.425"></a>
-<span class="sourceLineNo">426</span>    }<a name="line.426"></a>
-<span class="sourceLineNo">427</span>    LOG.error("The mob file " + fileName + " could not be found in the locations " + locations<a name="line.427"></a>
-<span class="sourceLineNo">428</span>      + " or it is corrupt");<a name="line.428"></a>
-<span class="sourceLineNo">429</span>    if (readEmptyValueOnMobCellMiss) {<a name="line.429"></a>
-<span class="sourceLineNo">430</span>      return null;<a name="line.430"></a>
-<span class="sourceLineNo">431</span>    } else if ((throwable instanceof FileNotFoundException)<a name="line.431"></a>
-<span class="sourceLineNo">432</span>        || (throwable.getCause() instanceof FileNotFoundException)) {<a name="line.432"></a>
-<span class="sourceLineNo">433</span>      // The region is re-opened when FileNotFoundException is thrown.<a name="line.433"></a>
-<span class="sourceLineNo">434</span>      // This is not necessary when MOB files cannot be found, because the store files<a name="line.434"></a>
-<span class="sourceLineNo">435</span>      // in a region only contain the references to MOB files and a re-open on a region<a name="line.435"></a>
-<span class="sourceLineNo">436</span>      // doesn't help fix the lost MOB files.<a name="line.436"></a>
-<span class="sourceLineNo">437</span>      throw new DoNotRetryIOException(throwable);<a name="line.437"></a>
-<span class="sourceLineNo">438</span>    } else if (throwable instanceof IOException) {<a name="line.438"></a>
-<span class="sourceLineNo">439</span>      throw (IOException) throwable;<a name="line.439"></a>
-<span class="sourceLineNo">440</span>    } else {<a name="line.440"></a>
-<span class="sourceLineNo">441</span>      throw new IOException(throwable);<a name="line.441"></a>
-<span class="sourceLineNo">442</span>    }<a name="line.442"></a>
-<span class="sourceLineNo">443</span>  }<a name="line.443"></a>
-<span class="sourceLineNo">444</span><a name="line.444"></a>
-<span class="sourceLineNo">445</span>  /**<a name="line.445"></a>
-<span class="sourceLineNo">446</span>   * Gets the mob file path.<a name="line.446"></a>
-<span class="sourceLineNo">447</span>   * @return The mob file path.<a name="line.447"></a>
-<span class="sourceLineNo">448</span>   */<a name="line.448"></a>
-<span class="sourceLineNo">449</span>  public Path getPath() {<a name="line.449"></a>
-<span class="sourceLineNo">450</span>    return mobFamilyPath;<a name="line.450"></a>
-<span class="sourceLineNo">451</span>  }<a name="line.451"></a>
-<span class="sourceLineNo">452</span><a name="line.452"></a>
-<span class="sourceLineNo">453</span>  public void updateCellsCountCompactedToMob(long count) {<a name="line.453"></a>
-<span class="sourceLineNo">454</span>    cellsCountCompactedToMob += count;<a name="line.454"></a>
-<span class="sourceLineNo">455</span>  }<a name="line.455"></a>
-<span class="sourceLineNo">456</span><a name="line.456"></a>
-<span class="sourceLineNo">457</span>  public long getCellsCountCompactedToMob() {<a name="line.457"></a>
-<span class="sourceLineNo">458</span>    return cellsCountCompactedToMob;<a name="line.458"></a>
-<span class="sourceLineNo">459</span>  }<a name="line.459"></a>
-<span class="sourceLineNo">460</span><a name="line.460"></a>
-<span class="sourceLineNo">461</span>  public void updateCellsCountCompactedFromMob(long count) {<a name="line.461"></a>
-<span class="sourceLineNo">462</span>    cellsCountCompactedFromMob += count;<a name="line.462"></a>
-<span class="sourceLineNo">463</span>  }<a name="line.463"></a>
-<span class="sourceLineNo">464</span><a name="line.464"></a>
-<span class="sourceLineNo">465</span>  public long getCellsCountCompactedFromMob() {<a name="line.465"></a>
-<span class="sourceLineNo">466</span>    return cellsCountCompactedFromMob;<a name="line.466"></a>
-<span class="sourceLineNo">467</span>  }<a name="line.467"></a>
-<span class="sourceLineNo">468</span><a name="line.468"></a>
-<span class="sourceLineNo">469</span>  public void updateCellsSizeCompactedToMob(long size) {<a name="line.469"></a>
-<span class="sourceLineNo">470</span>    cellsSizeCompactedToMob += size;<a name="line.470"></a>
-<span class="sourceLineNo">471</span>  }<a name="line.471"></a>
-<span class="sourceLineNo">472</span><a name="line.472"></a>
-<span class="sourceLineNo">473</span>  public long getCellsSizeCompactedToMob() {<a name="line.473"></a>
-<span class="sourceLineNo">474</span>    return cellsSizeCompactedToMob;<a name="line.474"></a>
-<span class="sourceLineNo">475</span>  }<a name="line.475"></a>
-<span class="sourceLineNo">476</span><a name="line.476"></a>
-<span class="sourceLineNo">477</span>  public void updateCellsSizeCompactedFromMob(long size) {<a name="line.477"></a>
-<span class="sourceLineNo">478</span>    cellsSizeCompactedFromMob += size;<a name="line.478"></a>
-<span class="sourceLineNo">479</span>  }<a name="line.479"></a>
-<span class="sourceLineNo">480</span><a name="line.480"></a>
-<span class="sourceLineNo">481</span>  public long getCellsSizeCompactedFromMob() {<a name="line.481"></a>
-<span class="sourceLineNo">482</span>    return cellsSizeCompactedFromMob;<a name="line.482"></a>
-<span class="sourceLineNo">483</span>  }<a name="line.483"></a>
-<span class="sourceLineNo">484</span><a name="line.484"></a>
-<span class="sourceLineNo">485</span>  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "VO_VOLATILE_INCREMENT")<a name="line.485"></a>
-<span class="sourceLineNo">486</span>  public void updateMobFlushCount() {<a name="line.486"></a>
-<span class="sourceLineNo">487</span>    mobFlushCount++;<a name="line.487"></a>
-<span class="sourceLineNo">488</span>  }<a name="line.488"></a>
-<span class="sourceLineNo">489</span><a name="line.489"></a>
-<span class="sourceLineNo">490</span>  public long getMobFlushCount() {<a name="line.490"></a>
-<span class="sourceLineNo">491</span>    return mobFlushCount;<a name="line.491"></a>
-<span class="sourceLineNo">492</span>  }<a name="line.492"></a>
-<span class="sourceLineNo">493</span><a name="line.493"></a>
-<span class="sourceLineNo">494</span>  public void updateMobFlushedCellsCount(long count) {<a name="line.494"></a>
-<span class="sourceLineNo">495</span>    mobFlushedCellsCount += count;<a name="line.495"></a>
-<span class="sourceLineNo">496</span>  }<a name="line.496"></a>
-<span class="sourceLineNo">497</span><a name="line.497"></a>
-<span class="sourceLineNo">498</span>  public long getMobFlushedCellsCount() {<a name="line.498"></a>
-<span class="sourceLineNo">499</span>    return mobFlushedCellsCount;<a name="line.499"></a>
-<span class="sourceLineNo">500</span>  }<a name="line.500"></a>
-<span class="sourceLineNo">501</span><a name="line.501"></a>
-<span class="sourceLineNo">502</span>  public void updateMobFlushedCellsSize(long size) {<a name="line.502"></a>
-<span class="sourceLineNo">503</span>    mobFlushedCellsSize += size;<a name="line.503"></a>
-<span class="sourceLineNo">504</span>  }<a name="line.504"></a>
-<span class="sourceLineNo">505</span><a name="line.505"></a>
-<span class="sourceLineNo">506</span>  public long getMobFlushedCellsSize() {<a name="line.506"></a>
-<span class="sourceLineNo">507</span>    return mobFlushedCellsSize;<a name="line.507"></a>
-<span class="sourceLineNo">508</span>  }<a name="line.508"></a>
-<span class="sourceLineNo">509</span><a name="line.509"></a>
-<span class="sourceLineNo">510</span>  public void updateMobScanCellsCount(long count) {<a name="line.510"></a>
-<span class="sourceLineNo">511</span>    mobScanCellsCount += count;<a name="line.511"></a>
-<span class="sourceLineNo">512</span>  }<a name="line.512"></a>
-<span class="sourceLineNo">513</span><a name="line.513"></a>
-<span class="sourceLineNo">514</span>  public long getMobScanCellsCount() {<a name="line.514"></a>
-<span class="sourceLineNo">515</span>    return mobScanCellsCount;<a name="line.515"></a>
-<span class="sourceLineNo">516</span>  }<a name="line.516"></a>
-<span class="sourceLineNo">517</span><a name="line.517"></a>
-<span class="sourceLineNo">518</span>  public void updateMobScanCellsSize(long size) {<a name="line.518"></a>
-<span class="sourceLineNo">519</span>    mobScanCellsSize += size;<a name="line.519"></a>
-<span class="sourceLineNo">520</span>  }<a name="line.520"></a>
-<span class="sourceLineNo">521</span><a name="line.521"></a>
-<span class="sourceLineNo">522</span>  public long getMobScanCellsSize() {<a name="line.522"></a>
-<span class="sourceLineNo">523</span>    return mobScanCellsSize;<a name="line.523"></a>
-<span class="sourceLineNo">524</span>  }<a name="line.524"></a>
-<span class="sourceLineNo">525</span><a name="line.525"></a>
-<span class="sourceLineNo">526</span>  public byte[] getRefCellTags() {<a name="line.526"></a>
-<span class="sourceLineNo">527</span>    return this.refCellTags;<a name="line.527"></a>
-<span class="sourceLineNo">528</span>  }<a name="line.528"></a>
-<span class="sourceLineNo">529</span>}<a name="line.529"></a>
+<span class="sourceLineNo">158</span>    return scan.isReversed() ? new ReversedMobStoreScanner(this, scanInfo, scan, targetCols, readPt)<a name="line.158"></a>
+<span class="sourceLineNo">159</span>        : new MobStoreScanner(this, scanInfo, scan, targetCols, readPt);<a name="line.159"></a>
+<span class="sourceLineNo">160</span>  }<a name="line.160"></a>
+<span class="sourceLineNo">161</span><a name="line.161"></a>
+<span class="sourceLineNo">162</span>  /**<a name="line.162"></a>
+<span class="sourceLineNo">163</span>   * Creates the mob store engine.<a name="line.163"></a>
+<span class="sourceLineNo">164</span>   */<a name="line.164"></a>
+<span class="sourceLineNo">165</span>  @Override<a name="line.165"></a>
+<span class="sourceLineNo">166</span>  protected StoreEngine&lt;?, ?, ?, ?&gt; createStoreEngine(HStore store, Configuration conf,<a name="line.166"></a>
+<span class="sourceLineNo">167</span>      CellComparator cellComparator) throws IOException {<a name="line.167"></a>
+<span class="sourceLineNo">168</span>    MobStoreEngine engine = new MobStoreEngine();<a name="line.168"></a>
+<span class="sourceLineNo">169</span>    engine.createComponents(conf, store, cellComparator);<a name="line.169"></a>
+<span class="sourceLineNo">170</span>    return engine;<a name="line.170"></a>
+<span class="sourceLineNo">171</span>  }<a name="line.171"></a>
+<span class="sourceLineNo">172</span><a name="line.172"></a>
+<span class="sourceLineNo">173</span>  /**<a name="line.173"></a>
+<span class="sourceLineNo">174</span>   * Gets the temp directory.<a name="line.174"></a>
+<span class="sourceLineNo">175</span>   * @return The temp directory.<a name="line.175"></a>
+<span class="sourceLineNo">176</span>   */<a name="line.176"></a>
+<span class="sourceLineNo">177</span>  private Path getTempDir() {<a name="line.177"></a>
+<span class="sourceLineNo">178</span>    return new Path(homePath, MobConstants.TEMP_DIR_NAME);<a name="line.178"></a>
+<span class="sourceLineNo">179</span>  }<a name="line.179"></a>
+<span class="sourceLineNo">180</span><a name="line.180"></a>
+<span class="sourceLineNo">181</span>  /**<a name="line.181"></a>
+<span class="sourceLineNo">182</span>   * Creates the writer for the mob file in temp directory.<a name="line.182"></a>
+<span class="sourceLineNo">183</span>   * @param date The latest date of written cells.<a name="line.183"></a>
+<span class="sourceLineNo">184</span>   * @param maxKeyCount The key count.<a name="line.184"></a>
+<span class="sourceLineNo">185</span>   * @param compression The compression algorithm.<a name="line.185"></a>
+<span class="sourceLineNo">186</span>   * @param startKey The start key.<a name="line.186"></a>
+<span class="sourceLineNo">187</span>   * @param isCompaction If the writer is used in compaction.<a name="line.187"></a>
+<span class="sourceLineNo">188</span>   * @return The writer for the mob file.<a name="line.188"></a>
+<span class="sourceLineNo">189</span>   * @throws IOException<a name="line.189"></a>
+<span class="sourceLineNo">190</span>   */<a name="line.190"></a>
+<span class="sourceLineNo">191</span>  public StoreFileWriter createWriterInTmp(Date date, long maxKeyCount,<a name="line.191"></a>
+<span class="sourceLineNo">192</span>      Compression.Algorithm compression, byte[] startKey,<a name="line.192"></a>
+<span class="sourceLineNo">193</span>      boolean isCompaction) throws IOException {<a name="line.193"></a>
+<span class="sourceLineNo">194</span>    if (startKey == null) {<a name="line.194"></a>
+<span class="sourceLineNo">195</span>      startKey = HConstants.EMPTY_START_ROW;<a name="line.195"></a>
+<span class="sourceLineNo">196</span>    }<a name="line.196"></a>
+<span class="sourceLineNo">197</span>    Path path = getTempDir();<a name="line.197"></a>
+<span class="sourceLineNo">198</span>    return createWriterInTmp(MobUtils.formatDate(date), path, maxKeyCount, compression, startKey,<a name="line.198"></a>
+<span class="sourceLineNo">199</span>      isCompaction);<a name="line.199"></a>
+<span class="sourceLineNo">200</span>  }<a name="line.200"></a>
+<span class="sourceLineNo">201</span><a name="line.201"></a>
+<span class="sourceLineNo">202</span>  /**<a name="line.202"></a>
+<span class="sourceLineNo">203</span>   * Creates the writer for the del file in temp directory.<a name="line.203"></a>
+<span class="sourceLineNo">204</span>   * The del file keeps tracking the delete markers. Its name has a suffix _del,<a name="line.204"></a>
+<span class="sourceLineNo">205</span>   * the format is [0-9a-f]+(_del)?.<a name="line.205"></a>
+<span class="sourceLineNo">206</span>   * @param date The latest date of written cells.<a name="line.206"></a>
+<span class="sourceLineNo">207</span>   * @param maxKeyCount The key count.<a name="line.207"></a>
+<span class="sourceLineNo">208</span>   * @param compression The compression algorithm.<a name="line.208"></a>
+<span class="sourceLineNo">209</span>   * @param startKey The start key.<a name="line.209"></a>
+<span class="sourceLineNo">210</span>   * @return The writer for the del file.<a name="line.210"></a>
+<span class="sourceLineNo">211</span>   * @throws IOException<a name="line.211"></a>
+<span class="sourceLineNo">212</span>   */<a name="line.212"></a>
+<span class="sourceLineNo">213</span>  public StoreFileWriter createDelFileWriterInTmp(Date date, long maxKeyCount,<a name="line.213"></a>
+<span class="sourceLineNo">214</span>      Compression.Algorithm compression, byte[] startKey) throws IOException {<a name="line.214"></a>
+<span class="sourceLineNo">215</span>    if (startKey == null) {<a name="line.215"></a>
+<span class="sourceLineNo">216</span>      startKey = HConstants.EMPTY_START_ROW;<a name="line.216"></a>
+<span class="sourceLineNo">217</span>    }<a name="line.217"></a>
+<span class="sourceLineNo">218</span>    Path path = getTempDir();<a name="line.218"></a>
+<span class="sourceLineNo">219</span>    String suffix = UUID<a name="line.219"></a>
+<span class="sourceLineNo">220</span>        .randomUUID().toString().replaceAll("-", "") + "_del";<a name="line.220"></a>
+<span class="sourceLineNo">221</span>    MobFileName mobFileName = MobFileName.create(startKey, MobUtils.formatDate(date), suffix);<a name="line.221"></a>
+<span class="sourceLineNo">222</span>    return createWriterInTmp(mobFileName, path, maxKeyCount, compression, true);<a name="line.222"></a>
+<span class="sourceLineNo">223</span>  }<a name="line.223"></a>
+<span class="sourceLineNo">224</span><a name="line.224"></a>
+<span class="sourceLineNo">225</span>  /**<a name="line.225"></a>
+<span class="sourceLineNo">226</span>   * Creates the writer for the mob file in temp directory.<a name="line.226"></a>
+<span class="sourceLineNo">227</span>   * @param date The date string, its format is yyyymmmdd.<a name="line.227"></a>
+<span class="sourceLineNo">228</span>   * @param basePath The basic path for a temp directory.<a name="line.228"></a>
+<span class="sourceLineNo">229</span>   * @param maxKeyCount The key count.<a name="line.229"></a>
+<span class="sourceLineNo">230</span>   * @param compression The compression algorithm.<a name="line.230"></a>
+<span class="sourceLineNo">231</span>   * @param startKey The start key.<a name="line.231"></a>
+<span class="sourceLineNo">232</span>   * @param isCompaction If the writer is used in compaction.<a name="line.232"></a>
+<span class="sourceLineNo">233</span>   * @return The writer for the mob file.<a name="line.233"></a>
+<span class="sourceLineNo">234</span>   * @throws IOException<a name="line.234"></a>
+<span class="sourceLineNo">235</span>   */<a name="line.235"></a>
+<span class="sourceLineNo">236</span>  public StoreFileWriter createWriterInTmp(String date, Path basePath, long maxKeyCount,<a name="line.236"></a>
+<span class="sourceLineNo">237</span>      Compression.Algorithm compression, byte[] startKey,<a name="line.237"></a>
+<span class="sourceLineNo">238</span>      boolean isCompaction) throws IOException {<a name="line.238"></a>
+<span class="sourceLineNo">239</span>    MobFileName mobFileName = MobFileName.create(startKey, date, UUID.randomUUID()<a name="line.239"></a>
+<span class="sourceLineNo">240</span>        .toString().replaceAll("-", ""));<a name="line.240"></a>
+<span class="sourceLineNo">241</span>    return createWriterInTmp(mobFileName, basePath, maxKeyCount, compression, isCompaction);<a name="line.241"></a>
+<span class="sourceLineNo">242</span>  }<a name="line.242"></a>
+<span class="sourceLineNo">243</span><a name="line.243"></a>
+<span class="sourceLineNo">244</span>  /**<a name="line.244"></a>
+<span class="sourceLineNo">245</span>   * Creates the writer for the mob file in temp directory.<a name="line.245"></a>
+<span class="sourceLineNo">246</span>   * @param mobFileName The mob file name.<a name="line.246"></a>
+<span class="sourceLineNo">247</span>   * @param basePath The basic path for a temp directory.<a name="line.247"></a>
+<span class="sourceLineNo">248</span>   * @param maxKeyCount The key count.<a name="line.248"></a>
+<span class="sourceLineNo">249</span>   * @param compression The compression algorithm.<a name="line.249"></a>
+<span class="sourceLineNo">250</span>   * @param isCompaction If the writer is used in compaction.<a name="line.250"></a>
+<span class="sourceLineNo">251</span>   * @return The writer for the mob file.<a name="line.251"></a>
+<span class="sourceLineNo">252</span>   * @throws IOException<a name="line.252"></a>
+<span class="sourceLineNo">253</span>   */<a name="line.253"></a>
+<span class="sourceLineNo">254</span>  public StoreFileWriter createWriterInTmp(MobFileName mobFileName, Path basePath,<a name="line.254"></a>
+<span class="sourceLineNo">255</span>      long maxKeyCount, Compression.Algorithm compression,<a name="line.255"></a>
+<span class="sourceLineNo">256</span>      boolean isCompaction) throws IOException {<a name="line.256"></a>
+<span class="sourceLineNo">257</span>    return MobUtils.createWriter(conf, region.getFilesystem(), family,<a name="line.257"></a>
+<span class="sourceLineNo">258</span>      new Path(basePath, mobFileName.getFileName()), maxKeyCount, compression, mobCacheConfig,<a name="line.258"></a>
+<span class="sourceLineNo">259</span>      cryptoContext, checksumType, bytesPerChecksum, blocksize, BloomType.NONE, isCompaction);<a name="line.259"></a>
+<span class="sourceLineNo">260</span>  }<a name="line.260"></a>
+<span class="sourceLineNo">261</span><a name="line.261"></a>
+<span class="sourceLineNo">262</span>  /**<a name="line.262"></a>
+<span class="sourceLineNo">263</span>   * Commits the mob file.<a name="line.263"></a>
+<span class="sourceLineNo">264</span>   * @param sourceFile The source file.<a name="line.264"></a>
+<span class="sourceLineNo">265</span>   * @param targetPath The directory path where the source file is renamed to.<a name="line.265"></a>
+<span class="sourceLineNo">266</span>   * @throws IOException<a name="line.266"></a>
+<span class="sourceLineNo">267</span>   */<a name="line.267"></a>
+<span class="sourceLineNo">268</span>  public void commitFile(final Path sourceFile, Path targetPath) throws IOException {<a name="line.268"></a>
+<span class="sourceLineNo">269</span>    if (sourceFile == null) {<a name="line.269"></a>
+<span class="sourceLineNo">270</span>      return;<a name="line.270"></a>
+<span class="sourceLineNo">271</span>    }<a name="line.271"></a>
+<span class="sourceLineNo">272</span>    Path dstPath = new Path(targetPath, sourceFile.getName());<a name="line.272"></a>
+<span class="sourceLineNo">273</span>    validateMobFile(sourceFile);<a name="line.273"></a>
+<span class="sourceLineNo">274</span>    String msg = "Renaming flushed file from " + sourceFile + " to " + dstPath;<a name="line.274"></a>
+<span class="sourceLineNo">275</span>    LOG.info(msg);<a name="line.275"></a>
+<span class="sourceLineNo">276</span>    Path parent = dstPath.getParent();<a name="line.276"></a>
+<span class="sourceLineNo">277</span>    if (!region.getFilesystem().exists(parent)) {<a name="line.277"></a>
+<span class="sourceLineNo">278</span>      region.getFilesystem().mkdirs(parent);<a name="line.278"></a>
+<span class="sourceLineNo">279</span>    }<a name="line.279"></a>
+<span class="sourceLineNo">280</span>    if (!region.getFilesystem().rename(sourceFile, dstPath)) {<a name="line.280"></a>
+<span class="sourceLineNo">281</span>      throw new IOException("Failed rename of " + sourceFile + " to " + dstPath);<a name="line.281"></a>
+<span class="sourceLineNo">282</span>    }<a name="line.282"></a>
+<span class="sourceLineNo">283</span>  }<a name="line.283"></a>
+<span class="sourceLineNo">284</span><a name="line.284"></a>
+<span class="sourceLineNo">285</span>  /**<a name="line.285"></a>
+<span class="sourceLineNo">286</span>   * Validates a mob file by opening and closing it.<a name="line.286"></a>
+<span class="sourceLineNo">287</span>   *<a name="line.287"></a>
+<span class="sourceLineNo">288</span>   * @param path the path to the mob file<a name="line.288"></a>
+<span class="sourceLineNo">289</span>   */<a name="line.289"></a>
+<span class="sourceLineNo">290</span>  private void validateMobFile(Path path) throws IOException {<a name="line.290"></a>
+<span class="sourceLineNo">291</span>    HStoreFile storeFile = null;<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    try {<a name="line.292"></a>
+<span class="sourceLineNo">293</span>      storeFile = new HStoreFile(region.getFilesystem(), path, conf, this.mobCacheConfig,<a name="line.293"></a>
+<span class="sourceLineNo">294</span>          BloomType.NONE, isPrimaryReplicaStore());<a name="line.294"></a>
+<span class="sourceLineNo">295</span>      storeFile.initReader();<a name="line.295"></a>
+<span class="sourceLineNo">296</span>    } catch (IOException e) {<a name="line.296"></a>
+<span class="sourceLineNo">297</span>      LOG.error("Fail to open mob file[" + path + "], keep it in temp directory.", e);<a name="line.297"></a>
+<span class="sourceLineNo">298</span>      throw e;<a name="line.298"></a>
+<span class="sourceLineNo">299</span>    } finally {<a name="line.299"></a>
+<span class="sourceLineNo">300</span>      if (storeFile != null) {<a name="line.300"></a>
+<span class="sourceLineNo">301</span>        storeFile.closeStoreFile(false);<a name="line.301"></a>
+<span class="sourceLineNo">302</span>      }<a name="line.302"></a>
+<span class="sourceLineNo">303</span>    }<a name="line.303"></a>
+<span class="sourceLineNo">304</span>  }<a name="line.304"></a>
+<span class="sourceLineNo">305</span><a name="line.305"></a>
+<span class="sourceLineNo">306</span>  /**<a name="line.306"></a>
+<span class="sourceLineNo">307</span>   * Reads the cell from the mob file, and the read point does not count.<a name="line.307"></a>
+<span class="sourceLineNo">308</span>   * This is used for DefaultMobStoreCompactor where we can read empty value for the missing cell.<a name="line.308"></a>
+<span class="sourceLineNo">309</span>   * @param reference The cell found in the HBase, its value is a path to a mob file.<a name="line.309"></a>
+<span class="sourceLineNo">310</span>   * @param cacheBlocks Whether the scanner should cache blocks.<a name="line.310"></a>
+<span class="sourceLineNo">311</span>   * @return The cell found in the mob file.<a name="line.311"></a>
+<span class="sourceLineNo">312</span>   * @throws IOException<a name="line.312"></a>
+<span class="sourceLineNo">313</span>   */<a name="line.313"></a>
+<span class="sourceLineNo">314</span>  public Cell resolve(Cell reference, boolean cacheBlocks) throws IOException {<a name="line.314"></a>
+<span class="sourceLineNo">315</span>    return resolve(reference, cacheBlocks, -1, true);<a name="line.315"></a>
+<span class="sourceLineNo">316</span>  }<a name="line.316"></a>
+<span class="sourceLineNo">317</span><a name="line.317"></a>
+<span class="sourceLineNo">318</span>  /**<a name="line.318"></a>
+<span class="sourceLineNo">319</span>   * Reads the cell from the mob file.<a name="line.319"></a>
+<span class="sourceLineNo">320</span>   * @param reference The cell found in the HBase, its value is a path to a mob file.<a name="line.320"></a>
+<span class="sourceLineNo">321</span>   * @param cacheBlocks Whether the scanner should cache blocks.<a name="line.321"></a>
+<span class="sourceLineNo">322</span>   * @param readPt the read point.<a name="line.322"></a>
+<span class="sourceLineNo">323</span>   * @param readEmptyValueOnMobCellMiss Whether return null value when the mob file is<a name="line.323"></a>
+<span class="sourceLineNo">324</span>   *        missing or corrupt.<a name="line.324"></a>
+<span class="sourceLineNo">325</span>   * @return The cell found in the mob file.<a name="line.325"></a>
+<span class="sourceLineNo">326</span>   * @throws IOException<a name="line.326"></a>
+<span class="sourceLineNo">327</span>   */<a name="line.327"></a>
+<span class="sourceLineNo">328</span>  public Cell resolve(Cell reference, boolean cacheBlocks, long readPt,<a name="line.328"></a>
+<span class="sourceLineNo">329</span>    boolean readEmptyValueOnMobCellMiss) throws IOException {<a name="line.329"></a>
+<span class="sourceLineNo">330</span>    Cell result = null;<a name="line.330"></a>
+<span class="sourceLineNo">331</span>    if (MobUtils.hasValidMobRefCellValue(reference)) {<a name="line.331"></a>
+<span class="sourceLineNo">332</span>      String fileName = MobUtils.getMobFileName(reference);<a name="line.332"></a>
+<span class="sourceLineNo">333</span>      Tag tableNameTag = MobUtils.getTableNameTag(reference);<a name="line.333"></a>
+<span class="sourceLineNo">334</span>      if (tableNameTag != null) {<a name="line.334"></a>
+<span class="sourceLineNo">335</span>        String tableNameString = TagUtil.getValueAsString(tableNameTag);<a name="line.335"></a>
+<span class="sourceLineNo">336</span>        List&lt;Path&gt; locations = map.get(tableNameString);<a name="line.336"></a>
+<span class="sourceLineNo">337</span>        if (locations == null) {<a name="line.337"></a>
+<span class="sourceLineNo">338</span>          IdLock.Entry lockEntry = keyLock.getLockEntry(tableNameString.hashCode());<a name="line.338"></a>
+<span class="sourceLineNo">339</span>          try {<a name="line.339"></a>
+<span class="sourceLineNo">340</span>            locations = map.get(tableNameString);<a name="line.340"></a>
+<span class="sourceLineNo">341</span>            if (locations == null) {<a name="line.341"></a>
+<span class="sourceLineNo">342</span>              locations = new ArrayList&lt;&gt;(2);<a name="line.342"></a>
+<span class="sourceLineNo">343</span>              TableName tn = TableName.valueOf(tableNameString);<a name="line.343"></a>
+<span class="sourceLineNo">344</span>              locations.add(MobUtils.getMobFamilyPath(conf, tn, family.getNameAsString()));<a name="line.344"></a>
+<span class="sourceLineNo">345</span>              locations.add(HFileArchiveUtil.getStoreArchivePath(conf, tn, MobUtils<a name="line.345"></a>
+<span class="sourceLineNo">346</span>                  .getMobRegionInfo(tn).getEncodedName(), family.getNameAsString()));<a name="line.346"></a>
+<span class="sourceLineNo">347</span>              map.put(tableNameString, locations);<a name="line.347"></a>
+<span class="sourceLineNo">348</span>            }<a name="line.348"></a>
+<span class="sourceLineNo">349</span>          } finally {<a name="line.349"></a>
+<span class="sourceLineNo">350</span>            keyLock.releaseLockEntry(lockEntry);<a name="line.350"></a>
+<span class="sourceLineNo">351</span>          }<a name="line.351"></a>
+<span class="sourceLineNo">352</span>        }<a name="line.352"></a>
+<span class="sourceLineNo">353</span>        result = readCell(locations, fileName, reference, cacheBlocks, readPt,<a name="line.353"></a>
+<span class="sourceLineNo">354</span>          readEmptyValueOnMobCellMiss);<a name="line.354"></a>
+<span class="sourceLineNo">355</span>      }<a name="line.355"></a>
+<span class="sourceLineNo">356</span>    }<a name="line.356"></a>
+<span class="sourceLineNo">357</span>    if (result == null) {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>      LOG.warn("The Cell result is null, assemble a new Cell with the same row,family,"<a name="line.358"></a>
+<span class="sourceLineNo">359</span>          + "qualifier,timestamp,type and tags but with an empty value to return.");<a name="line.359"></a>
+<span class="sourceLineNo">360</span>      result = ExtendedCellBuilderFactory.create(CellBuilderType.DEEP_COPY)<a name="line.360"></a>
+<span class="sourceLineNo">361</span>              .setRow(reference.getRowArray(), reference.getRowOffset(), reference.getRowLength())<a name="line.361"></a>
+<span class="sourceLineNo">362</span>              .setFamily(reference.getFamilyArray(), reference.getFamilyOffset(), reference.getFamilyLength())<a name="line.362"></a>
+<span class="sourceLineNo">363</span>              .setQualifier(reference.getQualifierArray(), reference.getQualifierOffset(), reference.getQualifierLength())<a name="line.363"></a>
+<span class="sourceLineNo">364</span>              .setTimestamp(reference.getTimestamp())<a name="line.364"></a>
+<span class="sourceLineNo">365</span>              .setType(reference.getTypeByte())<a name="line.365"></a>
+<span class="sourceLineNo">366</span>              .setValue(HConstants.EMPTY_BYTE_ARRAY)<a name="line.366"></a>
+<span class="sourceLineNo">367</span>              .setTags(reference.getTagsArray(), reference.getTagsOffset(), reference.getTagsLength())<a name="line.367"></a>
+<span class="sourceLineNo">368</span>              .build();<a name="line.368"></a>
+<span class="sourceLineNo">369</span>    }<a name="line.369"></a>
+<span class="sourceLineNo">370</span>    return result;<a name="line.370"></a>
+<span class="sourceLineNo">371</span>  }<a name="line.371"></a>
+<span class="sourceLineNo">372</span><a name="line.372"></a>
+<span class="sourceLineNo">373</span>  /**<a name="line.373"></a>
+<span class="sourceLineNo">374</span>   * Reads the cell from a mob file.<a name="line.374"></a>
+<span class="sourceLineNo">375</span>   * The mob file might be located in different directories.<a name="line.375"></a>
+<span class="sourceLineNo">376</span>   * 1. The working directory.<a name="line.376"></a>
+<span class="sourceLineNo">377</span>   * 2. The archive directory.<a name="line.377"></a>
+<span class="sourceLineNo">378</span>   * Reads the cell from the files located in both of the above directories.<a name="line.378"></a>
+<span class="sourceLineNo">379</span>   * @param locations The possible locations where the mob files are saved.<a name="line.379"></a>
+<span class="sourceLineNo">380</span>   * @param fileName The file to be read.<a name="line.380"></a>
+<span class="sourceLineNo">381</span>   * @param search The cell to be searched.<a name="line.381"></a>
+<span class="sourceLineNo">382</span>   * @param cacheMobBlocks Whether the scanner should cache blocks.<a name="line.382"></a>
+<span class="sourceLineNo">383</span>   * @param readPt the read point.<a name="line.383"></a>
+<span class="sourceLineNo">384</span>   * @param readEmptyValueOnMobCellMiss Whether return null value when the mob file is<a name="line.384"></a>
+<span class="sourceLineNo">385</span>   *        missing or corrupt.<a name="line.385"></a>
+<span class="sourceLineNo">386</span>   * @return The found cell. Null if there's no such a cell.<a name="line.386"></a>
+<span class="sourceLineNo">387</span>   * @throws IOException<a name="line.387"></a>
+<span class="sourceLineNo">388</span>   */<a name="line.388"></a>
+<span class="sourceLineNo">389</span>  private Cell readCell(List&lt;Path&gt; locations, String fileName, Cell search, boolean cacheMobBlocks,<a name="line.389"></a>
+<span class="sourceLineNo">390</span>    long readPt, boolean readEmptyValueOnMobCellMiss) throws IOException {<a name="line.390"></a>
+<span class="sourceLineNo">391</span>    FileSystem fs = getFileSystem();<a name="line.391"></a>
+<span class="sourceLineNo">392</span>    Throwable throwable = null;<a name="line.392"></a>
+<span class="sourceLineNo">393</span>    for (Path location : locations) {<a name="line.393"></a>
+<span class="sourceLineNo">394</span>      MobFile file = null;<a name="line.394"></a>
+<span class="sourceLineNo">395</span>      Path path = new Path(location, fileName);<a name="line.395"></a>
+<span class="sourceLineNo">396</span>      try {<a name="line.396"></a>
+<span class="sourceLineNo">397</span>        file = mobCacheConfig.getMobFileCache().openFile(fs, path, mobCacheConfig);<a name="line.397"></a>
+<span class="sourceLineNo">398</span>        return readPt != -1 ? file.readCell(search, cacheMobBlocks, readPt) : file.readCell(search,<a name="line.398"></a>
+<span class="sourceLineNo">399</span>          cacheMobBlocks);<a name="line.399"></a>
+<span class="sourceLineNo">400</span>      } catch (IOException e) {<a name="line.400"></a>
+<span class="sourceLineNo">401</span>        mobCacheConfig.getMobFileCache().evictFile(fileName);<a name="line.401"></a>
+<span class="sourceLineNo">402</span>        throwable = e;<a name="line.402"></a>
+<span class="sourceLineNo">403</span>        if ((e instanceof FileNotFoundException) ||<a name="line.403"></a>
+<span class="sourceLineNo">404</span>            (e.getCause() instanceof FileNotFoundException)) {<a name="line.404"></a>
+<span class="sourceLineNo">405</span>          LOG.debug("Fail to read the cell, the mob file " + path + " doesn't exist", e);<a name="line.405"></a>
+<span class="sourceLineNo">406</span>        } else if (e instanceof CorruptHFileException) {<a name="line.406"></a>
+<span class="sourceLineNo">407</span>          LOG.error("The mob file " + path + " is corrupt", e);<a name="line.407"></a>
+<span class="sourceLineNo">408</span>          break;<a name="line.408"></a>
+<span class="sourceLineNo">409</span>        } else {<a name="line.409"></a>
+<span class="sourceLineNo">410</span>          throw e;<a name="line.410"></a>
+<span class="sourceLineNo">411</span>        }<a name="line.411"></a>
+<span class="sourceLineNo">412</span>      } catch (NullPointerException e) { // HDFS 1.x - DFSInputStream.getBlockAt()<a name="line.412"></a>
+<span class="sourceLineNo">413</span>        mobCacheConfig.getMobFileCache().evictFile(fileName);<a name="line.413"></a>
+<span class="sourceLineNo">414</span>        LOG.debug("Fail to read the cell", e);<a name="line.414"></a>
+<span class="sourceLineNo">415</span>        throwable = e;<a name="line.415"></a>
+<span class="sourceLineNo">416</span>      } catch (AssertionError e) { // assert in HDFS 1.x - DFSInputStream.getBlockAt()<a name="line.416"></a>
+<span class="sourceLineNo">417</span>        mobCacheConfig.getMobFileCache().evictFile(fileName);<a name="line.417"></a>
+<span class="sourceLineNo">418</span>        LOG.debug("Fail to read the cell", e);<a name="line.418"></a>
+<span class="sourceLineNo">419</span>        throwable = e;<a name="line.419"></a>
+<span class="sourceLineNo">420</span>      } finally {<a name="line.420"></a>
+<span class="sourceLineNo">421</span>        if (file != null) {<a name="line.421"></a>
+<span class="sourceLineNo">422</span>          mobCacheConfig.getMobFileCache().closeFile(file);<a name="line.422"></a>
+<span class="sourceLineNo">423</span>        }<a name="line.423"></a>
+<span class="sourceLineNo">424</span>      }<a name="line.424"></a>
+<span class="sourceLineNo">425</span>    }<a name="line.425"></a>
+<span class="sourceLineNo">426</span>    LOG.error("The mob file " + fileName + " could not be found in the locations " + locations<a name="line.426"></a>
+<span class="sourceLineNo">427</span>      + " or it is corrupt");<a name="line.427"></a>
+<span class="sourceLineNo">428</span>    if (readEmptyValueOnMobCellMiss) {<a name="line.428"></a>
+<span class="sourceLineNo">429</span>      return null;<a name="line.429"></a>
+<span class="sourceLineNo">430</span>    } else if ((throwable instanceof FileNotFoundException)<a name="line.430"></a>
+<span class="sourceLineNo">431</span>        || (throwable.getCause() instanceof FileNotFoundException)) {<a name="line.431"></a>
+<span class="sourceLineNo">432</span>      // The region is re-opened when FileNotFoundException is thrown.<a name="line.432"></a>
+<span class="sourceLineNo">433</span>      // This is not necessary when MOB files cannot be found, because the store files<a name="line.433"></a>
+<span class="sourceLineNo">434</span>      // in a region only contain the references to MOB files and a re-open on a region<a name="line.434"></a>
+<span class="sourceLineNo">435</span>      // doesn't help fix the lost MOB files.<a name="line.435"></a>
+<span class="sourceLineNo">436</span>      throw new DoNotRetryIOException(throwable);<a name="line.436"></a>
+<span class="sourceLineNo">437</span>    } else if (throwable instanceof IOException) {<a name="line.437"></a>
+<span class="sourceLineNo">438</span>      throw (IOException) throwable;<a name="line.438"></a>
+<span class="sourceLineNo">439</span>    } else {<a name="line.439"></a>
+<span class="sourceLineNo">440</span>      throw new IOException(throwable);<a name="line.440"></a>
+<span class="sourceLineNo">441</span>    }<a name="line.441"></a>
+<span class="sourceLineNo">442</span>  }<a name="line.442"></a>
+<span class="sourceLineNo">443</span><a name="line.443"></a>
+<span class="sourceLineNo">444</span>  /**<a name="line.444"></a>
+<span class="sourceLineNo">445</span>   * Gets the mob file path.<a name="line.445"></a>
+<span class="sourceLineNo">446</span>   * @return The mob file path.<a name="line.446"></a>
+<span class="sourceLineNo">447</span>   */<a name="line.447"></a>
+<span class="sourceLineNo">448</span>  public Path getPath() {<a name="line.448"></a>
+<span class="sourceLineNo">449</span>    return mobFamilyPath;<a name="line.449"></a>
+<span class="sourceLineNo">450</span>  }<a name="line.450"></a>
+<span class="sourceLineNo">451</span><a name="line.451"></a>
+<span class="sourceLineNo">452</span>  public void updateCellsCountCompactedToMob(long count) {<a name="line.452"></a>
+<span class="sourceLineNo">453</span>    cellsCountCompactedToMob += count;<a name="line.453"></a>
+<span class="sourceLineNo">454</span>  }<a name="line.454"></a>
+<span class="sourceLineNo">455</span><a name="line.455"></a>
+<span class="sourceLineNo">456</span>  public long getCellsCountCompactedToMob() {<a name="line.456"></a>
+<span class="sourceLineNo">457</span>    return cellsCountCompactedToMob;<a name="line.457"></a>
+<span class="sourceLineNo">458</span>  }<a name="line.458"></a>
+<span class="sourceLineNo">459</span><a name="line.459"></a>
+<span class="sourceLineNo">460</span>  public void updateCellsCountCompactedFromMob(long count) {<a name="line.460"></a>
+<span class="sourceLineNo">461</span>    cellsCountCompactedFromMob += count;<a name="line.461"></a>
+<span class="sourceLineNo">462</span>  }<a name="line.462"></a>
+<span class="sourceLineNo">463</span><a name="line.463"></a>
+<span class="sourceLineNo">464</span>  public long getCellsCountCompactedFromMob() {<a name="line.464"></a>
+<span class="sourceLineNo">465</span>    return cellsCountCompactedFromMob;<a name="line.465"></a>
+<span class="sourceLineNo">466</span>  }<a name="line.466"></a>
+<span class="sourceLineNo">467</span><a name="line.467"></a>
+<span class="sourceLineNo">468</span>  public void updateCellsSizeCompactedToMob(long size) {<a name="line.468"></a>
+<span class="sourceLineNo">469</span>    cellsSizeCompactedToMob += size;<a name="line.469"></a>
+<span class="sourceLineNo">470</span>  }<a name="line.470"></a>
+<span class="sourceLineNo">471</span><a name="line.471"></a>
+<span class="sourceLineNo">472</span>  public long getCellsSizeCompactedToMob() {<a name="line.472"></a>
+<span class="sourceLineNo">473</span>    return cellsSizeCompactedToMob;<a name="line.473"></a>
+<span class="sourceLineNo">474</span>  }<a name="line.474"></a>
+<span class="sourceLineNo">475</span><a name="line.475"></a>
+<span class="sourceLineNo">476</span>  public void updateCellsSizeCompactedFromMob(long size) {<a name="line.476"></a>
+<span class="sourceLineNo">477</span>    cellsSizeCompactedFromMob += size;<a name="line.477"></a>
+<span class="sourceLineNo">478</span>  }<a name="line.478"></a>
+<span class="sourceLineNo">479</span><a name="line.479"></a>
+<span class="sourceLineNo">480</span>  public long getCellsSizeCompactedFromMob() {<a name="line.480"></a>
+<span class="sourceLineNo">481</span>    return cellsSizeCompactedFromMob;<a name="line.481"></a>
+<span class="sourceLineNo">482</span>  }<a name="line.482"></a>
+<span class="sourceLineNo">483</span><a name="line.483"></a>
+<span class="sourceLineNo">484</span>  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "VO_VOLATILE_INCREMENT")<a name="line.484"></a>
+<span class="sourceLineNo">485</span>  public void updateMobFlushCount() {<a name="line.485"></a>
+<span class="sourceLineNo">486</span>    mobFlushCount++;<a name="line.486"></a>
+<span class="sourceLineNo">487</span>  }<a name="line.487"></a>
+<span class="sourceLineNo">488</span><a name="line.488"></a>
+<span class="sourceLineNo">489</span>  public long getMobFlushCount() {<a name="line.489"></a>
+<span class="sourceLineNo">490</span>    return mobFlushCount;<a name="line.490"></a>
+<span class="sourceLineNo">491</span>  }<a name="line.491"></a>
+<span class="sourceLineNo">492</span><a name="line.492"></a>
+<span class="sourceLineNo">493</span>  public void updateMobFlushedCellsCount(long count) {<a name="line.493"></a>
+<span class="sourceLineNo">494</span>    mobFlushedCellsCount += count;<a name="line.494"></a>
+<span class="sourceLineNo">495</span>  }<a name="line.495"></a>
+<span class="sourceLineNo">496</span><a name="line.496"></a>
+<span class="sourceLineNo">497</span>  public long getMobFlushedCellsCount() {<a name="line.497"></a>
+<span class="sourceLineNo">498</span>    return mobFlushedCellsCount;<a name="line.498"></a>
+<span class="sourceLineNo">499</span>  }<a name="line.499"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>  public void updateMobFlushedCellsSize(long size) {<a name="line.501"></a>
+<span class="sourceLineNo">502</span>    mobFlushedCellsSize += size;<a name="line.502"></a>
+<span class="sourceLineNo">503</span>  }<a name="line.503"></a>
+<span class="sourceLineNo">504</span><a name="line.504"></a>
+<span class="sourceLineNo">505</span>  public long getMobFlushedCellsSize() {<a name="line.505"></a>
+<span class="sourceLineNo">506</span>    return mobFlushedCellsSize;<a name="line.506"></a>
+<span class="sourceLineNo">507</span>  }<a name="line.507"></a>
+<span class="sourceLineNo">508</span><a name="line.508"></a>
+<span class="sourceLineNo">509</span>  public void updateMobScanCellsCount(long count) {<a name="line.509"></a>
+<span class="sourceLineNo">510</span>    mobScanCellsCount += count;<a name="line.510"></a>
+<span class="sourceLineNo">511</span>  }<a name="line.511"></a>
+<span class="sourceLineNo">512</span><a name="line.512"></a>
+<span class="sourceLineNo">513</span>  public long getMobScanCellsCount() {<a name="line.513"></a>
+<span class="sourceLineNo">514</span>    return mobScanCellsCount;<a name="line.514"></a>
+<span class="sourceLineNo">515</span>  }<a name="line.515"></a>
+<span class="sourceLineNo">516</span><a name="line.516"></a>
+<span class="sourceLineNo">517</span>  public void updateMobScanCellsSize(long size) {<a name="line.517"></a>
+<span class="sourceLineNo">518</span>    mobScanCellsSize += size;<a name="line.518"></a>
+<span class="sourceLineNo">519</span>  }<a name="line.519"></a>
+<span class="sourceLineNo">520</span><a name="line.520"></a>
+<span class="sourceLineNo">521</span>  public long getMobScanCellsSize() {<a name="line.521"></a>
+<span class="sourceLineNo">522</span>    return mobScanCellsSize;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>  }<a name="line.523"></a>
+<span class="sourceLineNo">524</span><a name="line.524"></a>
+<span class="sourceLineNo">525</span>  public byte[] getRefCellTags() {<a name="line.525"></a>
+<span class="sourceLineNo">526</span>    return this.refCellTags;<a name="line.526"></a>
+<span class="sourceLineNo">527</span>  }<a name="line.527"></a>
+<span class="sourceLineNo">528</span>}<a name="line.528"></a>
 
 
 


Mime
View raw message