hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject [13/51] [partial] hbase git commit: Published site at 3bac31b2a49bca153df3b47a198667828b61f36e.
Date Sun, 29 Nov 2015 21:17:26 GMT
http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobCompactionStoreScanner.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobCompactionStoreScanner.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobCompactionStoreScanner.html
index 883469d..05a2d9b 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobCompactionStoreScanner.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobCompactionStoreScanner.html
@@ -33,7 +33,7 @@
 <span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.client.Scan;<a name="line.25"></a>
 <span class="sourceLineNo">026</span><a name="line.26"></a>
 <span class="sourceLineNo">027</span>/**<a name="line.27"></a>
-<span class="sourceLineNo">028</span> * Scanner scans the MOB Store. Coalesce KeyValue stream into List&lt;KeyValue&gt;<a name="line.28"></a>
+<span class="sourceLineNo">028</span> * Scanner scans the MOB Store. Coalesce KeyValue stream into {@code List&lt;KeyValue&gt;}<a name="line.28"></a>
 <span class="sourceLineNo">029</span> * for a single row. It's only used in the compaction of mob-enabled columns.<a name="line.29"></a>
 <span class="sourceLineNo">030</span> * It outputs the normal cells and delete markers when outputDeleteMarkers is set as true.<a name="line.30"></a>
 <span class="sourceLineNo">031</span> */<a name="line.31"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobStoreScanner.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobStoreScanner.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobStoreScanner.html
index 7604aea..da7e339 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobStoreScanner.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/MobStoreScanner.html
@@ -36,61 +36,60 @@
 <span class="sourceLineNo">028</span>import org.apache.hadoop.hbase.mob.MobUtils;<a name="line.28"></a>
 <span class="sourceLineNo">029</span><a name="line.29"></a>
 <span class="sourceLineNo">030</span>/**<a name="line.30"></a>
-<span class="sourceLineNo">031</span> * Scanner scans both the memstore and the MOB Store. Coalesce KeyValue stream into List&lt;KeyValue&gt;<a name="line.31"></a>
-<span class="sourceLineNo">032</span> * for a single row.<a name="line.32"></a>
-<span class="sourceLineNo">033</span> *<a name="line.33"></a>
-<span class="sourceLineNo">034</span> */<a name="line.34"></a>
-<span class="sourceLineNo">035</span>@InterfaceAudience.Private<a name="line.35"></a>
-<span class="sourceLineNo">036</span>public class MobStoreScanner extends StoreScanner {<a name="line.36"></a>
-<span class="sourceLineNo">037</span><a name="line.37"></a>
-<span class="sourceLineNo">038</span>  private boolean cacheMobBlocks = false;<a name="line.38"></a>
-<span class="sourceLineNo">039</span>  private boolean rawMobScan = false;<a name="line.39"></a>
-<span class="sourceLineNo">040</span>  private boolean readEmptyValueOnMobCellMiss = false;<a name="line.40"></a>
-<span class="sourceLineNo">041</span>  private final HMobStore mobStore;<a name="line.41"></a>
-<span class="sourceLineNo">042</span><a name="line.42"></a>
-<span class="sourceLineNo">043</span>  public MobStoreScanner(Store store, ScanInfo scanInfo, Scan scan,<a name="line.43"></a>
-<span class="sourceLineNo">044</span>      final NavigableSet&lt;byte[]&gt; columns, long readPt) throws IOException {<a name="line.44"></a>
-<span class="sourceLineNo">045</span>    super(store, scanInfo, scan, columns, readPt);<a name="line.45"></a>
-<span class="sourceLineNo">046</span>    cacheMobBlocks = MobUtils.isCacheMobBlocks(scan);<a name="line.46"></a>
-<span class="sourceLineNo">047</span>    rawMobScan = MobUtils.isRawMobScan(scan);<a name="line.47"></a>
-<span class="sourceLineNo">048</span>    readEmptyValueOnMobCellMiss = MobUtils.isReadEmptyValueOnMobCellMiss(scan);<a name="line.48"></a>
-<span class="sourceLineNo">049</span>    if (!(store instanceof HMobStore)) {<a name="line.49"></a>
-<span class="sourceLineNo">050</span>      throw new IllegalArgumentException("The store " + store + " is not a HMobStore");<a name="line.50"></a>
-<span class="sourceLineNo">051</span>    }<a name="line.51"></a>
-<span class="sourceLineNo">052</span>    mobStore = (HMobStore) store;<a name="line.52"></a>
-<span class="sourceLineNo">053</span>  }<a name="line.53"></a>
-<span class="sourceLineNo">054</span><a name="line.54"></a>
-<span class="sourceLineNo">055</span>  /**<a name="line.55"></a>
-<span class="sourceLineNo">056</span>   * Firstly reads the cells from the HBase. If the cell are a reference cell (which has the<a name="line.56"></a>
-<span class="sourceLineNo">057</span>   * reference tag), the scanner need seek this cell from the mob file, and use the cell found<a name="line.57"></a>
-<span class="sourceLineNo">058</span>   * from the mob file as the result.<a name="line.58"></a>
-<span class="sourceLineNo">059</span>   */<a name="line.59"></a>
-<span class="sourceLineNo">060</span>  @Override<a name="line.60"></a>
-<span class="sourceLineNo">061</span>  public boolean next(List&lt;Cell&gt; outResult, ScannerContext ctx) throws IOException {<a name="line.61"></a>
-<span class="sourceLineNo">062</span>    boolean result = super.next(outResult, ctx);<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    if (!rawMobScan) {<a name="line.63"></a>
-<span class="sourceLineNo">064</span>      // retrieve the mob data<a name="line.64"></a>
-<span class="sourceLineNo">065</span>      if (outResult.isEmpty()) {<a name="line.65"></a>
-<span class="sourceLineNo">066</span>        return result;<a name="line.66"></a>
-<span class="sourceLineNo">067</span>      }<a name="line.67"></a>
-<span class="sourceLineNo">068</span>      long mobKVCount = 0;<a name="line.68"></a>
-<span class="sourceLineNo">069</span>      long mobKVSize = 0;<a name="line.69"></a>
-<span class="sourceLineNo">070</span>      for (int i = 0; i &lt; outResult.size(); i++) {<a name="line.70"></a>
-<span class="sourceLineNo">071</span>        Cell cell = outResult.get(i);<a name="line.71"></a>
-<span class="sourceLineNo">072</span>        if (MobUtils.isMobReferenceCell(cell)) {<a name="line.72"></a>
-<span class="sourceLineNo">073</span>          Cell mobCell = mobStore<a name="line.73"></a>
-<span class="sourceLineNo">074</span>            .resolve(cell, cacheMobBlocks, readPt, readEmptyValueOnMobCellMiss);<a name="line.74"></a>
-<span class="sourceLineNo">075</span>          mobKVCount++;<a name="line.75"></a>
-<span class="sourceLineNo">076</span>          mobKVSize += mobCell.getValueLength();<a name="line.76"></a>
-<span class="sourceLineNo">077</span>          outResult.set(i, mobCell);<a name="line.77"></a>
-<span class="sourceLineNo">078</span>        }<a name="line.78"></a>
-<span class="sourceLineNo">079</span>      }<a name="line.79"></a>
-<span class="sourceLineNo">080</span>      mobStore.updateMobScanCellsCount(mobKVCount);<a name="line.80"></a>
-<span class="sourceLineNo">081</span>      mobStore.updateMobScanCellsSize(mobKVSize);<a name="line.81"></a>
-<span class="sourceLineNo">082</span>    }<a name="line.82"></a>
-<span class="sourceLineNo">083</span>    return result;<a name="line.83"></a>
-<span class="sourceLineNo">084</span>  }<a name="line.84"></a>
-<span class="sourceLineNo">085</span>}<a name="line.85"></a>
+<span class="sourceLineNo">031</span> * Scanner scans both the memstore and the MOB Store. Coalesce KeyValue stream into<a name="line.31"></a>
+<span class="sourceLineNo">032</span> * {@code List&lt;KeyValue&gt;} for a single row.<a name="line.32"></a>
+<span class="sourceLineNo">033</span> */<a name="line.33"></a>
+<span class="sourceLineNo">034</span>@InterfaceAudience.Private<a name="line.34"></a>
+<span class="sourceLineNo">035</span>public class MobStoreScanner extends StoreScanner {<a name="line.35"></a>
+<span class="sourceLineNo">036</span><a name="line.36"></a>
+<span class="sourceLineNo">037</span>  private boolean cacheMobBlocks = false;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>  private boolean rawMobScan = false;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>  private boolean readEmptyValueOnMobCellMiss = false;<a name="line.39"></a>
+<span class="sourceLineNo">040</span>  private final HMobStore mobStore;<a name="line.40"></a>
+<span class="sourceLineNo">041</span><a name="line.41"></a>
+<span class="sourceLineNo">042</span>  public MobStoreScanner(Store store, ScanInfo scanInfo, Scan scan,<a name="line.42"></a>
+<span class="sourceLineNo">043</span>      final NavigableSet&lt;byte[]&gt; columns, long readPt) throws IOException {<a name="line.43"></a>
+<span class="sourceLineNo">044</span>    super(store, scanInfo, scan, columns, readPt);<a name="line.44"></a>
+<span class="sourceLineNo">045</span>    cacheMobBlocks = MobUtils.isCacheMobBlocks(scan);<a name="line.45"></a>
+<span class="sourceLineNo">046</span>    rawMobScan = MobUtils.isRawMobScan(scan);<a name="line.46"></a>
+<span class="sourceLineNo">047</span>    readEmptyValueOnMobCellMiss = MobUtils.isReadEmptyValueOnMobCellMiss(scan);<a name="line.47"></a>
+<span class="sourceLineNo">048</span>    if (!(store instanceof HMobStore)) {<a name="line.48"></a>
+<span class="sourceLineNo">049</span>      throw new IllegalArgumentException("The store " + store + " is not a HMobStore");<a name="line.49"></a>
+<span class="sourceLineNo">050</span>    }<a name="line.50"></a>
+<span class="sourceLineNo">051</span>    mobStore = (HMobStore) store;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>  }<a name="line.52"></a>
+<span class="sourceLineNo">053</span><a name="line.53"></a>
+<span class="sourceLineNo">054</span>  /**<a name="line.54"></a>
+<span class="sourceLineNo">055</span>   * Firstly reads the cells from the HBase. If the cell are a reference cell (which has the<a name="line.55"></a>
+<span class="sourceLineNo">056</span>   * reference tag), the scanner need seek this cell from the mob file, and use the cell found<a name="line.56"></a>
+<span class="sourceLineNo">057</span>   * from the mob file as the result.<a name="line.57"></a>
+<span class="sourceLineNo">058</span>   */<a name="line.58"></a>
+<span class="sourceLineNo">059</span>  @Override<a name="line.59"></a>
+<span class="sourceLineNo">060</span>  public boolean next(List&lt;Cell&gt; outResult, ScannerContext ctx) throws IOException {<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    boolean result = super.next(outResult, ctx);<a name="line.61"></a>
+<span class="sourceLineNo">062</span>    if (!rawMobScan) {<a name="line.62"></a>
+<span class="sourceLineNo">063</span>      // retrieve the mob data<a name="line.63"></a>
+<span class="sourceLineNo">064</span>      if (outResult.isEmpty()) {<a name="line.64"></a>
+<span class="sourceLineNo">065</span>        return result;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>      }<a name="line.66"></a>
+<span class="sourceLineNo">067</span>      long mobKVCount = 0;<a name="line.67"></a>
+<span class="sourceLineNo">068</span>      long mobKVSize = 0;<a name="line.68"></a>
+<span class="sourceLineNo">069</span>      for (int i = 0; i &lt; outResult.size(); i++) {<a name="line.69"></a>
+<span class="sourceLineNo">070</span>        Cell cell = outResult.get(i);<a name="line.70"></a>
+<span class="sourceLineNo">071</span>        if (MobUtils.isMobReferenceCell(cell)) {<a name="line.71"></a>
+<span class="sourceLineNo">072</span>          Cell mobCell = mobStore<a name="line.72"></a>
+<span class="sourceLineNo">073</span>            .resolve(cell, cacheMobBlocks, readPt, readEmptyValueOnMobCellMiss);<a name="line.73"></a>
+<span class="sourceLineNo">074</span>          mobKVCount++;<a name="line.74"></a>
+<span class="sourceLineNo">075</span>          mobKVSize += mobCell.getValueLength();<a name="line.75"></a>
+<span class="sourceLineNo">076</span>          outResult.set(i, mobCell);<a name="line.76"></a>
+<span class="sourceLineNo">077</span>        }<a name="line.77"></a>
+<span class="sourceLineNo">078</span>      }<a name="line.78"></a>
+<span class="sourceLineNo">079</span>      mobStore.updateMobScanCellsCount(mobKVCount);<a name="line.79"></a>
+<span class="sourceLineNo">080</span>      mobStore.updateMobScanCellsSize(mobKVSize);<a name="line.80"></a>
+<span class="sourceLineNo">081</span>    }<a name="line.81"></a>
+<span class="sourceLineNo">082</span>    return result;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>  }<a name="line.83"></a>
+<span class="sourceLineNo">084</span>}<a name="line.84"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.Builder.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.Builder.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.Builder.html
index 9eeb296..50d6e4f 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.Builder.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.Builder.html
@@ -90,14 +90,14 @@
 <span class="sourceLineNo">082</span>   * some limits and then repeatedly invoke {@link InternalScanner#next(List)} or<a name="line.82"></a>
 <span class="sourceLineNo">083</span>   * {@link RegionScanner#next(List)} where each invocation respects these limits separately.<a name="line.83"></a>
 <span class="sourceLineNo">084</span>   * &lt;p&gt;<a name="line.84"></a>
-<span class="sourceLineNo">085</span>   * For example: &lt;code&gt;&lt;pre&gt;<a name="line.85"></a>
+<span class="sourceLineNo">085</span>   * For example: &lt;pre&gt; {@code<a name="line.85"></a>
 <span class="sourceLineNo">086</span>   * ScannerContext context = new ScannerContext.newBuilder().setBatchLimit(5).build();<a name="line.86"></a>
 <span class="sourceLineNo">087</span>   * RegionScanner scanner = ...<a name="line.87"></a>
 <span class="sourceLineNo">088</span>   * List&lt;Cell&gt; results = new ArrayList&lt;Cell&gt;();<a name="line.88"></a>
 <span class="sourceLineNo">089</span>   * while(scanner.next(results, context)) {<a name="line.89"></a>
 <span class="sourceLineNo">090</span>   *   // Do something with a batch of 5 cells<a name="line.90"></a>
 <span class="sourceLineNo">091</span>   * }<a name="line.91"></a>
-<span class="sourceLineNo">092</span>   * &lt;/pre&gt;&lt;/code&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
+<span class="sourceLineNo">092</span>   * }&lt;/pre&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
 <span class="sourceLineNo">093</span>   * limits for a particular RPC request and have those limits respected across multiple<a name="line.93"></a>
 <span class="sourceLineNo">094</span>   * invocations. This means that the progress made towards the limits in earlier calls will be<a name="line.94"></a>
 <span class="sourceLineNo">095</span>   * saved and considered in future invocations<a name="line.95"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitFields.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitFields.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitFields.html
index 9eeb296..50d6e4f 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitFields.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitFields.html
@@ -90,14 +90,14 @@
 <span class="sourceLineNo">082</span>   * some limits and then repeatedly invoke {@link InternalScanner#next(List)} or<a name="line.82"></a>
 <span class="sourceLineNo">083</span>   * {@link RegionScanner#next(List)} where each invocation respects these limits separately.<a name="line.83"></a>
 <span class="sourceLineNo">084</span>   * &lt;p&gt;<a name="line.84"></a>
-<span class="sourceLineNo">085</span>   * For example: &lt;code&gt;&lt;pre&gt;<a name="line.85"></a>
+<span class="sourceLineNo">085</span>   * For example: &lt;pre&gt; {@code<a name="line.85"></a>
 <span class="sourceLineNo">086</span>   * ScannerContext context = new ScannerContext.newBuilder().setBatchLimit(5).build();<a name="line.86"></a>
 <span class="sourceLineNo">087</span>   * RegionScanner scanner = ...<a name="line.87"></a>
 <span class="sourceLineNo">088</span>   * List&lt;Cell&gt; results = new ArrayList&lt;Cell&gt;();<a name="line.88"></a>
 <span class="sourceLineNo">089</span>   * while(scanner.next(results, context)) {<a name="line.89"></a>
 <span class="sourceLineNo">090</span>   *   // Do something with a batch of 5 cells<a name="line.90"></a>
 <span class="sourceLineNo">091</span>   * }<a name="line.91"></a>
-<span class="sourceLineNo">092</span>   * &lt;/pre&gt;&lt;/code&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
+<span class="sourceLineNo">092</span>   * }&lt;/pre&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
 <span class="sourceLineNo">093</span>   * limits for a particular RPC request and have those limits respected across multiple<a name="line.93"></a>
 <span class="sourceLineNo">094</span>   * invocations. This means that the progress made towards the limits in earlier calls will be<a name="line.94"></a>
 <span class="sourceLineNo">095</span>   * saved and considered in future invocations<a name="line.95"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitScope.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitScope.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitScope.html
index 9eeb296..50d6e4f 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitScope.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.LimitScope.html
@@ -90,14 +90,14 @@
 <span class="sourceLineNo">082</span>   * some limits and then repeatedly invoke {@link InternalScanner#next(List)} or<a name="line.82"></a>
 <span class="sourceLineNo">083</span>   * {@link RegionScanner#next(List)} where each invocation respects these limits separately.<a name="line.83"></a>
 <span class="sourceLineNo">084</span>   * &lt;p&gt;<a name="line.84"></a>
-<span class="sourceLineNo">085</span>   * For example: &lt;code&gt;&lt;pre&gt;<a name="line.85"></a>
+<span class="sourceLineNo">085</span>   * For example: &lt;pre&gt; {@code<a name="line.85"></a>
 <span class="sourceLineNo">086</span>   * ScannerContext context = new ScannerContext.newBuilder().setBatchLimit(5).build();<a name="line.86"></a>
 <span class="sourceLineNo">087</span>   * RegionScanner scanner = ...<a name="line.87"></a>
 <span class="sourceLineNo">088</span>   * List&lt;Cell&gt; results = new ArrayList&lt;Cell&gt;();<a name="line.88"></a>
 <span class="sourceLineNo">089</span>   * while(scanner.next(results, context)) {<a name="line.89"></a>
 <span class="sourceLineNo">090</span>   *   // Do something with a batch of 5 cells<a name="line.90"></a>
 <span class="sourceLineNo">091</span>   * }<a name="line.91"></a>
-<span class="sourceLineNo">092</span>   * &lt;/pre&gt;&lt;/code&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
+<span class="sourceLineNo">092</span>   * }&lt;/pre&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
 <span class="sourceLineNo">093</span>   * limits for a particular RPC request and have those limits respected across multiple<a name="line.93"></a>
 <span class="sourceLineNo">094</span>   * invocations. This means that the progress made towards the limits in earlier calls will be<a name="line.94"></a>
 <span class="sourceLineNo">095</span>   * saved and considered in future invocations<a name="line.95"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.NextState.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.NextState.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.NextState.html
index 9eeb296..50d6e4f 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.NextState.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.NextState.html
@@ -90,14 +90,14 @@
 <span class="sourceLineNo">082</span>   * some limits and then repeatedly invoke {@link InternalScanner#next(List)} or<a name="line.82"></a>
 <span class="sourceLineNo">083</span>   * {@link RegionScanner#next(List)} where each invocation respects these limits separately.<a name="line.83"></a>
 <span class="sourceLineNo">084</span>   * &lt;p&gt;<a name="line.84"></a>
-<span class="sourceLineNo">085</span>   * For example: &lt;code&gt;&lt;pre&gt;<a name="line.85"></a>
+<span class="sourceLineNo">085</span>   * For example: &lt;pre&gt; {@code<a name="line.85"></a>
 <span class="sourceLineNo">086</span>   * ScannerContext context = new ScannerContext.newBuilder().setBatchLimit(5).build();<a name="line.86"></a>
 <span class="sourceLineNo">087</span>   * RegionScanner scanner = ...<a name="line.87"></a>
 <span class="sourceLineNo">088</span>   * List&lt;Cell&gt; results = new ArrayList&lt;Cell&gt;();<a name="line.88"></a>
 <span class="sourceLineNo">089</span>   * while(scanner.next(results, context)) {<a name="line.89"></a>
 <span class="sourceLineNo">090</span>   *   // Do something with a batch of 5 cells<a name="line.90"></a>
 <span class="sourceLineNo">091</span>   * }<a name="line.91"></a>
-<span class="sourceLineNo">092</span>   * &lt;/pre&gt;&lt;/code&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
+<span class="sourceLineNo">092</span>   * }&lt;/pre&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
 <span class="sourceLineNo">093</span>   * limits for a particular RPC request and have those limits respected across multiple<a name="line.93"></a>
 <span class="sourceLineNo">094</span>   * invocations. This means that the progress made towards the limits in earlier calls will be<a name="line.94"></a>
 <span class="sourceLineNo">095</span>   * saved and considered in future invocations<a name="line.95"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.html
index 9eeb296..50d6e4f 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/ScannerContext.html
@@ -90,14 +90,14 @@
 <span class="sourceLineNo">082</span>   * some limits and then repeatedly invoke {@link InternalScanner#next(List)} or<a name="line.82"></a>
 <span class="sourceLineNo">083</span>   * {@link RegionScanner#next(List)} where each invocation respects these limits separately.<a name="line.83"></a>
 <span class="sourceLineNo">084</span>   * &lt;p&gt;<a name="line.84"></a>
-<span class="sourceLineNo">085</span>   * For example: &lt;code&gt;&lt;pre&gt;<a name="line.85"></a>
+<span class="sourceLineNo">085</span>   * For example: &lt;pre&gt; {@code<a name="line.85"></a>
 <span class="sourceLineNo">086</span>   * ScannerContext context = new ScannerContext.newBuilder().setBatchLimit(5).build();<a name="line.86"></a>
 <span class="sourceLineNo">087</span>   * RegionScanner scanner = ...<a name="line.87"></a>
 <span class="sourceLineNo">088</span>   * List&lt;Cell&gt; results = new ArrayList&lt;Cell&gt;();<a name="line.88"></a>
 <span class="sourceLineNo">089</span>   * while(scanner.next(results, context)) {<a name="line.89"></a>
 <span class="sourceLineNo">090</span>   *   // Do something with a batch of 5 cells<a name="line.90"></a>
 <span class="sourceLineNo">091</span>   * }<a name="line.91"></a>
-<span class="sourceLineNo">092</span>   * &lt;/pre&gt;&lt;/code&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
+<span class="sourceLineNo">092</span>   * }&lt;/pre&gt; However, in the case of RPCs, the server wants to be able to define a set of<a name="line.92"></a>
 <span class="sourceLineNo">093</span>   * limits for a particular RPC request and have those limits respected across multiple<a name="line.93"></a>
 <span class="sourceLineNo">094</span>   * invocations. This means that the progress made towards the limits in earlier calls will be<a name="line.94"></a>
 <span class="sourceLineNo">095</span>   * saved and considered in future invocations<a name="line.95"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetBulkTime.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetBulkTime.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetBulkTime.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetBulkTime.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetBulkTime.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetFileSize.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetFileSize.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetFileSize.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetFileSize.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetFileSize.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetPathName.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetPathName.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetPathName.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetPathName.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetPathName.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetSeqId.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetSeqId.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetSeqId.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetSeqId.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.GetSeqId.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Comparators.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Reader.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Reader.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Reader.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Reader.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Reader.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Writer.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Writer.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Writer.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Writer.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.Writer.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.WriterBuilder.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.WriterBuilder.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.WriterBuilder.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.WriterBuilder.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.WriterBuilder.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.html
index 2103a09..db23b30 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFile.html
@@ -369,7 +369,7 @@
 <span class="sourceLineNo">361</span>  /**<a name="line.361"></a>
 <span class="sourceLineNo">362</span>   * Check if this storefile was created by bulk load.<a name="line.362"></a>
 <span class="sourceLineNo">363</span>   * When a hfile is bulk loaded into HBase, we append<a name="line.363"></a>
-<span class="sourceLineNo">364</span>   * '_SeqId_&lt;id-when-loaded&gt;' to the hfile name, unless<a name="line.364"></a>
+<span class="sourceLineNo">364</span>   * {@code '_SeqId_&lt;id-when-loaded&gt;'} to the hfile name, unless<a name="line.364"></a>
 <span class="sourceLineNo">365</span>   * "hbase.mapreduce.bulkload.assign.sequenceNumbers" is<a name="line.365"></a>
 <span class="sourceLineNo">366</span>   * explicitly turned off.<a name="line.366"></a>
 <span class="sourceLineNo">367</span>   * If "hbase.mapreduce.bulkload.assign.sequenceNumbers"<a name="line.367"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFileInfo.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFileInfo.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFileInfo.html
index bbbd673..7720208 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFileInfo.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/StoreFileInfo.html
@@ -76,8 +76,8 @@
 <span class="sourceLineNo">068</span>    Pattern.compile("^(" + DELFILE_NAME_REGEX + ")");<a name="line.68"></a>
 <span class="sourceLineNo">069</span><a name="line.69"></a>
 <span class="sourceLineNo">070</span>  /**<a name="line.70"></a>
-<span class="sourceLineNo">071</span>   * Regex that will work for straight reference names (&lt;hfile&gt;.&lt;parentEncRegion&gt;)<a name="line.71"></a>
-<span class="sourceLineNo">072</span>   * and hfilelink reference names (&lt;table&gt;=&lt;region&gt;-&lt;hfile&gt;.&lt;parentEncRegion&gt;)<a name="line.72"></a>
+<span class="sourceLineNo">071</span>   * Regex that will work for straight reference names ({@code &lt;hfile&gt;.&lt;parentEncRegion&gt;})<a name="line.71"></a>
+<span class="sourceLineNo">072</span>   * and hfilelink reference names ({@code &lt;table&gt;=&lt;region&gt;-&lt;hfile&gt;.&lt;parentEncRegion&gt;})<a name="line.72"></a>
 <span class="sourceLineNo">073</span>   * If reference, then the regex has more than just one group.<a name="line.73"></a>
 <span class="sourceLineNo">074</span>   * Group 1, hfile/hfilelink pattern, is this file's id.<a name="line.74"></a>
 <span class="sourceLineNo">075</span>   * Group 2 '(.+)' is the reference's parent region name.<a name="line.75"></a>

http://git-wip-us.apache.org/repos/asf/hbase/blob/ef7355e1/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.PostOpenDeployTasksThread.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.PostOpenDeployTasksThread.html b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.PostOpenDeployTasksThread.html
index 1451e26..44320ff 100644
--- a/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.PostOpenDeployTasksThread.html
+++ b/devapidocs/src-html/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.PostOpenDeployTasksThread.html
@@ -39,196 +39,196 @@
 <span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.executor.EventType;<a name="line.31"></a>
 <span class="sourceLineNo">032</span>import org.apache.hadoop.hbase.protobuf.generated.RegionServerStatusProtos.RegionStateTransition.TransitionCode;<a name="line.32"></a>
 <span class="sourceLineNo">033</span>import org.apache.hadoop.hbase.regionserver.HRegion;<a name="line.33"></a>
-<span class="sourceLineNo">034</span>import org.apache.hadoop.hbase.regionserver.RegionServerAccounting;<a name="line.34"></a>
-<span class="sourceLineNo">035</span>import org.apache.hadoop.hbase.regionserver.RegionServerServices;<a name="line.35"></a>
-<span class="sourceLineNo">036</span>import org.apache.hadoop.hbase.regionserver.RegionServerServices.PostOpenDeployContext;<a name="line.36"></a>
-<span class="sourceLineNo">037</span>import org.apache.hadoop.hbase.util.CancelableProgressable;<a name="line.37"></a>
-<span class="sourceLineNo">038</span>/**<a name="line.38"></a>
-<span class="sourceLineNo">039</span> * Handles opening of a region on a region server.<a name="line.39"></a>
-<span class="sourceLineNo">040</span> * &lt;p&gt;<a name="line.40"></a>
-<span class="sourceLineNo">041</span> * This is executed after receiving an OPEN RPC from the master or client.<a name="line.41"></a>
-<span class="sourceLineNo">042</span> */<a name="line.42"></a>
-<span class="sourceLineNo">043</span>@InterfaceAudience.Private<a name="line.43"></a>
-<span class="sourceLineNo">044</span>public class OpenRegionHandler extends EventHandler {<a name="line.44"></a>
-<span class="sourceLineNo">045</span>  private static final Log LOG = LogFactory.getLog(OpenRegionHandler.class);<a name="line.45"></a>
-<span class="sourceLineNo">046</span><a name="line.46"></a>
-<span class="sourceLineNo">047</span>  protected final RegionServerServices rsServices;<a name="line.47"></a>
-<span class="sourceLineNo">048</span><a name="line.48"></a>
-<span class="sourceLineNo">049</span>  private final HRegionInfo regionInfo;<a name="line.49"></a>
-<span class="sourceLineNo">050</span>  private final HTableDescriptor htd;<a name="line.50"></a>
-<span class="sourceLineNo">051</span>  private final long masterSystemTime;<a name="line.51"></a>
-<span class="sourceLineNo">052</span><a name="line.52"></a>
-<span class="sourceLineNo">053</span>  public OpenRegionHandler(final Server server,<a name="line.53"></a>
-<span class="sourceLineNo">054</span>      final RegionServerServices rsServices, HRegionInfo regionInfo,<a name="line.54"></a>
-<span class="sourceLineNo">055</span>      HTableDescriptor htd, long masterSystemTime) {<a name="line.55"></a>
-<span class="sourceLineNo">056</span>    this(server, rsServices, regionInfo, htd, masterSystemTime, EventType.M_RS_OPEN_REGION);<a name="line.56"></a>
-<span class="sourceLineNo">057</span>  }<a name="line.57"></a>
-<span class="sourceLineNo">058</span><a name="line.58"></a>
-<span class="sourceLineNo">059</span>  protected OpenRegionHandler(final Server server,<a name="line.59"></a>
-<span class="sourceLineNo">060</span>      final RegionServerServices rsServices, final HRegionInfo regionInfo,<a name="line.60"></a>
-<span class="sourceLineNo">061</span>      final HTableDescriptor htd, long masterSystemTime, EventType eventType) {<a name="line.61"></a>
-<span class="sourceLineNo">062</span>    super(server, eventType);<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    this.rsServices = rsServices;<a name="line.63"></a>
-<span class="sourceLineNo">064</span>    this.regionInfo = regionInfo;<a name="line.64"></a>
-<span class="sourceLineNo">065</span>    this.htd = htd;<a name="line.65"></a>
-<span class="sourceLineNo">066</span>    this.masterSystemTime = masterSystemTime;<a name="line.66"></a>
-<span class="sourceLineNo">067</span>  }<a name="line.67"></a>
-<span class="sourceLineNo">068</span><a name="line.68"></a>
-<span class="sourceLineNo">069</span>  public HRegionInfo getRegionInfo() {<a name="line.69"></a>
-<span class="sourceLineNo">070</span>    return regionInfo;<a name="line.70"></a>
-<span class="sourceLineNo">071</span>  }<a name="line.71"></a>
-<span class="sourceLineNo">072</span><a name="line.72"></a>
-<span class="sourceLineNo">073</span>  @Override<a name="line.73"></a>
-<span class="sourceLineNo">074</span>  public void process() throws IOException {<a name="line.74"></a>
-<span class="sourceLineNo">075</span>    boolean openSuccessful = false;<a name="line.75"></a>
-<span class="sourceLineNo">076</span>    final String regionName = regionInfo.getRegionNameAsString();<a name="line.76"></a>
-<span class="sourceLineNo">077</span>    HRegion region = null;<a name="line.77"></a>
-<span class="sourceLineNo">078</span><a name="line.78"></a>
-<span class="sourceLineNo">079</span>    try {<a name="line.79"></a>
-<span class="sourceLineNo">080</span>      if (this.server.isStopped() || this.rsServices.isStopping()) {<a name="line.80"></a>
-<span class="sourceLineNo">081</span>        return;<a name="line.81"></a>
-<span class="sourceLineNo">082</span>      }<a name="line.82"></a>
-<span class="sourceLineNo">083</span>      final String encodedName = regionInfo.getEncodedName();<a name="line.83"></a>
-<span class="sourceLineNo">084</span><a name="line.84"></a>
-<span class="sourceLineNo">085</span>      // 2 different difficult situations can occur<a name="line.85"></a>
-<span class="sourceLineNo">086</span>      // 1) The opening was cancelled. This is an expected situation<a name="line.86"></a>
-<span class="sourceLineNo">087</span>      // 2) The region is now marked as online while we're suppose to open. This would be a bug.<a name="line.87"></a>
-<span class="sourceLineNo">088</span><a name="line.88"></a>
-<span class="sourceLineNo">089</span>      // Check that this region is not already online<a name="line.89"></a>
-<span class="sourceLineNo">090</span>      if (this.rsServices.getFromOnlineRegions(encodedName) != null) {<a name="line.90"></a>
-<span class="sourceLineNo">091</span>        LOG.error("Region " + encodedName +<a name="line.91"></a>
-<span class="sourceLineNo">092</span>            " was already online when we started processing the opening. " +<a name="line.92"></a>
-<span class="sourceLineNo">093</span>            "Marking this new attempt as failed");<a name="line.93"></a>
-<span class="sourceLineNo">094</span>        return;<a name="line.94"></a>
-<span class="sourceLineNo">095</span>      }<a name="line.95"></a>
-<span class="sourceLineNo">096</span><a name="line.96"></a>
-<span class="sourceLineNo">097</span>      // Check that we're still supposed to open the region.<a name="line.97"></a>
-<span class="sourceLineNo">098</span>      // If fails, just return.  Someone stole the region from under us.<a name="line.98"></a>
-<span class="sourceLineNo">099</span>      if (!isRegionStillOpening()){<a name="line.99"></a>
-<span class="sourceLineNo">100</span>        LOG.error("Region " + encodedName + " opening cancelled");<a name="line.100"></a>
-<span class="sourceLineNo">101</span>        return;<a name="line.101"></a>
-<span class="sourceLineNo">102</span>      }<a name="line.102"></a>
-<span class="sourceLineNo">103</span><a name="line.103"></a>
-<span class="sourceLineNo">104</span>      // Open region.  After a successful open, failures in subsequent<a name="line.104"></a>
-<span class="sourceLineNo">105</span>      // processing needs to do a close as part of cleanup.<a name="line.105"></a>
-<span class="sourceLineNo">106</span>      region = openRegion();<a name="line.106"></a>
-<span class="sourceLineNo">107</span>      if (region == null) {<a name="line.107"></a>
-<span class="sourceLineNo">108</span>        return;<a name="line.108"></a>
-<span class="sourceLineNo">109</span>      }<a name="line.109"></a>
-<span class="sourceLineNo">110</span><a name="line.110"></a>
-<span class="sourceLineNo">111</span>      if (!updateMeta(region, masterSystemTime) || this.server.isStopped() ||<a name="line.111"></a>
-<span class="sourceLineNo">112</span>          this.rsServices.isStopping()) {<a name="line.112"></a>
-<span class="sourceLineNo">113</span>        return;<a name="line.113"></a>
-<span class="sourceLineNo">114</span>      }<a name="line.114"></a>
-<span class="sourceLineNo">115</span><a name="line.115"></a>
-<span class="sourceLineNo">116</span>      if (!isRegionStillOpening()) {<a name="line.116"></a>
-<span class="sourceLineNo">117</span>        return;<a name="line.117"></a>
-<span class="sourceLineNo">118</span>      }<a name="line.118"></a>
-<span class="sourceLineNo">119</span><a name="line.119"></a>
-<span class="sourceLineNo">120</span>      // Successful region open, and add it to OnlineRegions<a name="line.120"></a>
-<span class="sourceLineNo">121</span>      this.rsServices.addToOnlineRegions(region);<a name="line.121"></a>
-<span class="sourceLineNo">122</span>      openSuccessful = true;<a name="line.122"></a>
-<span class="sourceLineNo">123</span><a name="line.123"></a>
-<span class="sourceLineNo">124</span>      // Done!  Successful region open<a name="line.124"></a>
-<span class="sourceLineNo">125</span>      LOG.debug("Opened " + regionName + " on " +<a name="line.125"></a>
-<span class="sourceLineNo">126</span>        this.server.getServerName());<a name="line.126"></a>
-<span class="sourceLineNo">127</span>    } finally {<a name="line.127"></a>
-<span class="sourceLineNo">128</span>      // Do all clean up here<a name="line.128"></a>
-<span class="sourceLineNo">129</span>      if (!openSuccessful) {<a name="line.129"></a>
-<span class="sourceLineNo">130</span>        doCleanUpOnFailedOpen(region);<a name="line.130"></a>
-<span class="sourceLineNo">131</span>      }<a name="line.131"></a>
-<span class="sourceLineNo">132</span>      final Boolean current = this.rsServices.getRegionsInTransitionInRS().<a name="line.132"></a>
-<span class="sourceLineNo">133</span>          remove(this.regionInfo.getEncodedNameAsBytes());<a name="line.133"></a>
-<span class="sourceLineNo">134</span><a name="line.134"></a>
-<span class="sourceLineNo">135</span>      // Let's check if we have met a race condition on open cancellation....<a name="line.135"></a>
-<span class="sourceLineNo">136</span>      // A better solution would be to not have any race condition.<a name="line.136"></a>
-<span class="sourceLineNo">137</span>      // this.rsServices.getRegionsInTransitionInRS().remove(<a name="line.137"></a>
-<span class="sourceLineNo">138</span>      //  this.regionInfo.getEncodedNameAsBytes(), Boolean.TRUE);<a name="line.138"></a>
-<span class="sourceLineNo">139</span>      // would help.<a name="line.139"></a>
-<span class="sourceLineNo">140</span>      if (openSuccessful) {<a name="line.140"></a>
-<span class="sourceLineNo">141</span>        if (current == null) { // Should NEVER happen, but let's be paranoid.<a name="line.141"></a>
-<span class="sourceLineNo">142</span>          LOG.error("Bad state: we've just opened a region that was NOT in transition. Region="<a name="line.142"></a>
-<span class="sourceLineNo">143</span>              + regionName);<a name="line.143"></a>
-<span class="sourceLineNo">144</span>        } else if (Boolean.FALSE.equals(current)) { // Can happen, if we're<a name="line.144"></a>
-<span class="sourceLineNo">145</span>                                                    // really unlucky.<a name="line.145"></a>
-<span class="sourceLineNo">146</span>          LOG.error("Race condition: we've finished to open a region, while a close was requested "<a name="line.146"></a>
-<span class="sourceLineNo">147</span>              + " on region=" + regionName + ". It can be a critical error, as a region that"<a name="line.147"></a>
-<span class="sourceLineNo">148</span>              + " should be closed is now opened. Closing it now");<a name="line.148"></a>
-<span class="sourceLineNo">149</span>          cleanupFailedOpen(region);<a name="line.149"></a>
-<span class="sourceLineNo">150</span>        }<a name="line.150"></a>
-<span class="sourceLineNo">151</span>      }<a name="line.151"></a>
-<span class="sourceLineNo">152</span>    }<a name="line.152"></a>
-<span class="sourceLineNo">153</span>  }<a name="line.153"></a>
-<span class="sourceLineNo">154</span><a name="line.154"></a>
-<span class="sourceLineNo">155</span>  private void doCleanUpOnFailedOpen(HRegion region)<a name="line.155"></a>
-<span class="sourceLineNo">156</span>      throws IOException {<a name="line.156"></a>
-<span class="sourceLineNo">157</span>    try {<a name="line.157"></a>
-<span class="sourceLineNo">158</span>      if (region != null) {<a name="line.158"></a>
-<span class="sourceLineNo">159</span>        cleanupFailedOpen(region);<a name="line.159"></a>
-<span class="sourceLineNo">160</span>      }<a name="line.160"></a>
-<span class="sourceLineNo">161</span>    } finally {<a name="line.161"></a>
-<span class="sourceLineNo">162</span>      rsServices.reportRegionStateTransition(TransitionCode.FAILED_OPEN, regionInfo);<a name="line.162"></a>
-<span class="sourceLineNo">163</span>    }<a name="line.163"></a>
-<span class="sourceLineNo">164</span>  }<a name="line.164"></a>
-<span class="sourceLineNo">165</span><a name="line.165"></a>
-<span class="sourceLineNo">166</span>  /**<a name="line.166"></a>
-<span class="sourceLineNo">167</span>   * Update ZK or META.  This can take a while if for example the<a name="line.167"></a>
-<span class="sourceLineNo">168</span>   * hbase:meta is not available -- if server hosting hbase:meta crashed and we are<a name="line.168"></a>
-<span class="sourceLineNo">169</span>   * waiting on it to come back -- so run in a thread and keep updating znode<a name="line.169"></a>
-<span class="sourceLineNo">170</span>   * state meantime so master doesn't timeout our region-in-transition.<a name="line.170"></a>
-<span class="sourceLineNo">171</span>   * Caller must cleanup region if this fails.<a name="line.171"></a>
-<span class="sourceLineNo">172</span>   */<a name="line.172"></a>
-<span class="sourceLineNo">173</span>  boolean updateMeta(final HRegion r, long masterSystemTime) {<a name="line.173"></a>
-<span class="sourceLineNo">174</span>    if (this.server.isStopped() || this.rsServices.isStopping()) {<a name="line.174"></a>
-<span class="sourceLineNo">175</span>      return false;<a name="line.175"></a>
-<span class="sourceLineNo">176</span>    }<a name="line.176"></a>
-<span class="sourceLineNo">177</span>    // Object we do wait/notify on.  Make it boolean.  If set, we're done.<a name="line.177"></a>
-<span class="sourceLineNo">178</span>    // Else, wait.<a name="line.178"></a>
-<span class="sourceLineNo">179</span>    final AtomicBoolean signaller = new AtomicBoolean(false);<a name="line.179"></a>
-<span class="sourceLineNo">180</span>    PostOpenDeployTasksThread t = new PostOpenDeployTasksThread(r,<a name="line.180"></a>
-<span class="sourceLineNo">181</span>      this.server, this.rsServices, signaller, masterSystemTime);<a name="line.181"></a>
-<span class="sourceLineNo">182</span>    t.start();<a name="line.182"></a>
-<span class="sourceLineNo">183</span>    // Post open deploy task:<a name="line.183"></a>
-<span class="sourceLineNo">184</span>    //   meta =&gt; update meta location in ZK<a name="line.184"></a>
-<span class="sourceLineNo">185</span>    //   other region =&gt; update meta<a name="line.185"></a>
-<span class="sourceLineNo">186</span>    while (!signaller.get() &amp;&amp; t.isAlive() &amp;&amp; !this.server.isStopped() &amp;&amp;<a name="line.186"></a>
-<span class="sourceLineNo">187</span>        !this.rsServices.isStopping() &amp;&amp; isRegionStillOpening()) {<a name="line.187"></a>
-<span class="sourceLineNo">188</span>      synchronized (signaller) {<a name="line.188"></a>
-<span class="sourceLineNo">189</span>        try {<a name="line.189"></a>
-<span class="sourceLineNo">190</span>          // Wait for 10 seconds, so that server shutdown<a name="line.190"></a>
-<span class="sourceLineNo">191</span>          // won't take too long if this thread happens to run.<a name="line.191"></a>
-<span class="sourceLineNo">192</span>          if (!signaller.get()) signaller.wait(10000);<a name="line.192"></a>
-<span class="sourceLineNo">193</span>        } catch (InterruptedException e) {<a name="line.193"></a>
-<span class="sourceLineNo">194</span>          // Go to the loop check.<a name="line.194"></a>
-<span class="sourceLineNo">195</span>        }<a name="line.195"></a>
-<span class="sourceLineNo">196</span>      }<a name="line.196"></a>
-<span class="sourceLineNo">197</span>    }<a name="line.197"></a>
-<span class="sourceLineNo">198</span>    // Is thread still alive?  We may have left above loop because server is<a name="line.198"></a>
-<span class="sourceLineNo">199</span>    // stopping or we timed out the edit.  Is so, interrupt it.<a name="line.199"></a>
-<span class="sourceLineNo">200</span>    if (t.isAlive()) {<a name="line.200"></a>
-<span class="sourceLineNo">201</span>      if (!signaller.get()) {<a name="line.201"></a>
-<span class="sourceLineNo">202</span>        // Thread still running; interrupt<a name="line.202"></a>
-<span class="sourceLineNo">203</span>        LOG.debug("Interrupting thread " + t);<a name="line.203"></a>
-<span class="sourceLineNo">204</span>        t.interrupt();<a name="line.204"></a>
-<span class="sourceLineNo">205</span>      }<a name="line.205"></a>
-<span class="sourceLineNo">206</span>      try {<a name="line.206"></a>
-<span class="sourceLineNo">207</span>        t.join();<a name="line.207"></a>
-<span class="sourceLineNo">208</span>      } catch (InterruptedException ie) {<a name="line.208"></a>
-<span class="sourceLineNo">209</span>        LOG.warn("Interrupted joining " +<a name="line.209"></a>
-<span class="sourceLineNo">210</span>          r.getRegionInfo().getRegionNameAsString(), ie);<a name="line.210"></a>
-<span class="sourceLineNo">211</span>        Thread.currentThread().interrupt();<a name="line.211"></a>
-<span class="sourceLineNo">212</span>      }<a name="line.212"></a>
-<span class="sourceLineNo">213</span>    }<a name="line.213"></a>
-<span class="sourceLineNo">214</span><a name="line.214"></a>
-<span class="sourceLineNo">215</span>    // Was there an exception opening the region?  This should trigger on<a name="line.215"></a>
-<span class="sourceLineNo">216</span>    // InterruptedException too.  If so, we failed.<a name="line.216"></a>
-<span class="sourceLineNo">217</span>    return (!Thread.interrupted() &amp;&amp; t.getException() == null);<a name="line.217"></a>
-<span class="sourceLineNo">218</span>  }<a name="line.218"></a>
-<span class="sourceLineNo">219</span><a name="line.219"></a>
-<span class="sourceLineNo">220</span>  /**<a name="line.220"></a>
-<span class="sourceLineNo">221</span>   * Thread to run region post open tasks. Call {@link #getException()} after<a name="line.221"></a>
-<span class="sourceLineNo">222</span>   * the thread finishes to check for exceptions running<a name="line.222"></a>
-<span class="sourceLineNo">223</span>   * {@link RegionServerServices#postOpenDeployTasks(HRegion)<a name="line.223"></a>
+<span class="sourceLineNo">034</span>import org.apache.hadoop.hbase.regionserver.Region;<a name="line.34"></a>
+<span class="sourceLineNo">035</span>import org.apache.hadoop.hbase.regionserver.RegionServerAccounting;<a name="line.35"></a>
+<span class="sourceLineNo">036</span>import org.apache.hadoop.hbase.regionserver.RegionServerServices;<a name="line.36"></a>
+<span class="sourceLineNo">037</span>import org.apache.hadoop.hbase.regionserver.RegionServerServices.PostOpenDeployContext;<a name="line.37"></a>
+<span class="sourceLineNo">038</span>import org.apache.hadoop.hbase.util.CancelableProgressable;<a name="line.38"></a>
+<span class="sourceLineNo">039</span>/**<a name="line.39"></a>
+<span class="sourceLineNo">040</span> * Handles opening of a region on a region server.<a name="line.40"></a>
+<span class="sourceLineNo">041</span> * &lt;p&gt;<a name="line.41"></a>
+<span class="sourceLineNo">042</span> * This is executed after receiving an OPEN RPC from the master or client.<a name="line.42"></a>
+<span class="sourceLineNo">043</span> */<a name="line.43"></a>
+<span class="sourceLineNo">044</span>@InterfaceAudience.Private<a name="line.44"></a>
+<span class="sourceLineNo">045</span>public class OpenRegionHandler extends EventHandler {<a name="line.45"></a>
+<span class="sourceLineNo">046</span>  private static final Log LOG = LogFactory.getLog(OpenRegionHandler.class);<a name="line.46"></a>
+<span class="sourceLineNo">047</span><a name="line.47"></a>
+<span class="sourceLineNo">048</span>  protected final RegionServerServices rsServices;<a name="line.48"></a>
+<span class="sourceLineNo">049</span><a name="line.49"></a>
+<span class="sourceLineNo">050</span>  private final HRegionInfo regionInfo;<a name="line.50"></a>
+<span class="sourceLineNo">051</span>  private final HTableDescriptor htd;<a name="line.51"></a>
+<span class="sourceLineNo">052</span>  private final long masterSystemTime;<a name="line.52"></a>
+<span class="sourceLineNo">053</span><a name="line.53"></a>
+<span class="sourceLineNo">054</span>  public OpenRegionHandler(final Server server,<a name="line.54"></a>
+<span class="sourceLineNo">055</span>      final RegionServerServices rsServices, HRegionInfo regionInfo,<a name="line.55"></a>
+<span class="sourceLineNo">056</span>      HTableDescriptor htd, long masterSystemTime) {<a name="line.56"></a>
+<span class="sourceLineNo">057</span>    this(server, rsServices, regionInfo, htd, masterSystemTime, EventType.M_RS_OPEN_REGION);<a name="line.57"></a>
+<span class="sourceLineNo">058</span>  }<a name="line.58"></a>
+<span class="sourceLineNo">059</span><a name="line.59"></a>
+<span class="sourceLineNo">060</span>  protected OpenRegionHandler(final Server server,<a name="line.60"></a>
+<span class="sourceLineNo">061</span>      final RegionServerServices rsServices, final HRegionInfo regionInfo,<a name="line.61"></a>
+<span class="sourceLineNo">062</span>      final HTableDescriptor htd, long masterSystemTime, EventType eventType) {<a name="line.62"></a>
+<span class="sourceLineNo">063</span>    super(server, eventType);<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    this.rsServices = rsServices;<a name="line.64"></a>
+<span class="sourceLineNo">065</span>    this.regionInfo = regionInfo;<a name="line.65"></a>
+<span class="sourceLineNo">066</span>    this.htd = htd;<a name="line.66"></a>
+<span class="sourceLineNo">067</span>    this.masterSystemTime = masterSystemTime;<a name="line.67"></a>
+<span class="sourceLineNo">068</span>  }<a name="line.68"></a>
+<span class="sourceLineNo">069</span><a name="line.69"></a>
+<span class="sourceLineNo">070</span>  public HRegionInfo getRegionInfo() {<a name="line.70"></a>
+<span class="sourceLineNo">071</span>    return regionInfo;<a name="line.71"></a>
+<span class="sourceLineNo">072</span>  }<a name="line.72"></a>
+<span class="sourceLineNo">073</span><a name="line.73"></a>
+<span class="sourceLineNo">074</span>  @Override<a name="line.74"></a>
+<span class="sourceLineNo">075</span>  public void process() throws IOException {<a name="line.75"></a>
+<span class="sourceLineNo">076</span>    boolean openSuccessful = false;<a name="line.76"></a>
+<span class="sourceLineNo">077</span>    final String regionName = regionInfo.getRegionNameAsString();<a name="line.77"></a>
+<span class="sourceLineNo">078</span>    HRegion region = null;<a name="line.78"></a>
+<span class="sourceLineNo">079</span><a name="line.79"></a>
+<span class="sourceLineNo">080</span>    try {<a name="line.80"></a>
+<span class="sourceLineNo">081</span>      if (this.server.isStopped() || this.rsServices.isStopping()) {<a name="line.81"></a>
+<span class="sourceLineNo">082</span>        return;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>      }<a name="line.83"></a>
+<span class="sourceLineNo">084</span>      final String encodedName = regionInfo.getEncodedName();<a name="line.84"></a>
+<span class="sourceLineNo">085</span><a name="line.85"></a>
+<span class="sourceLineNo">086</span>      // 2 different difficult situations can occur<a name="line.86"></a>
+<span class="sourceLineNo">087</span>      // 1) The opening was cancelled. This is an expected situation<a name="line.87"></a>
+<span class="sourceLineNo">088</span>      // 2) The region is now marked as online while we're suppose to open. This would be a bug.<a name="line.88"></a>
+<span class="sourceLineNo">089</span><a name="line.89"></a>
+<span class="sourceLineNo">090</span>      // Check that this region is not already online<a name="line.90"></a>
+<span class="sourceLineNo">091</span>      if (this.rsServices.getFromOnlineRegions(encodedName) != null) {<a name="line.91"></a>
+<span class="sourceLineNo">092</span>        LOG.error("Region " + encodedName +<a name="line.92"></a>
+<span class="sourceLineNo">093</span>            " was already online when we started processing the opening. " +<a name="line.93"></a>
+<span class="sourceLineNo">094</span>            "Marking this new attempt as failed");<a name="line.94"></a>
+<span class="sourceLineNo">095</span>        return;<a name="line.95"></a>
+<span class="sourceLineNo">096</span>      }<a name="line.96"></a>
+<span class="sourceLineNo">097</span><a name="line.97"></a>
+<span class="sourceLineNo">098</span>      // Check that we're still supposed to open the region.<a name="line.98"></a>
+<span class="sourceLineNo">099</span>      // If fails, just return.  Someone stole the region from under us.<a name="line.99"></a>
+<span class="sourceLineNo">100</span>      if (!isRegionStillOpening()){<a name="line.100"></a>
+<span class="sourceLineNo">101</span>        LOG.error("Region " + encodedName + " opening cancelled");<a name="line.101"></a>
+<span class="sourceLineNo">102</span>        return;<a name="line.102"></a>
+<span class="sourceLineNo">103</span>      }<a name="line.103"></a>
+<span class="sourceLineNo">104</span><a name="line.104"></a>
+<span class="sourceLineNo">105</span>      // Open region.  After a successful open, failures in subsequent<a name="line.105"></a>
+<span class="sourceLineNo">106</span>      // processing needs to do a close as part of cleanup.<a name="line.106"></a>
+<span class="sourceLineNo">107</span>      region = openRegion();<a name="line.107"></a>
+<span class="sourceLineNo">108</span>      if (region == null) {<a name="line.108"></a>
+<span class="sourceLineNo">109</span>        return;<a name="line.109"></a>
+<span class="sourceLineNo">110</span>      }<a name="line.110"></a>
+<span class="sourceLineNo">111</span><a name="line.111"></a>
+<span class="sourceLineNo">112</span>      if (!updateMeta(region, masterSystemTime) || this.server.isStopped() ||<a name="line.112"></a>
+<span class="sourceLineNo">113</span>          this.rsServices.isStopping()) {<a name="line.113"></a>
+<span class="sourceLineNo">114</span>        return;<a name="line.114"></a>
+<span class="sourceLineNo">115</span>      }<a name="line.115"></a>
+<span class="sourceLineNo">116</span><a name="line.116"></a>
+<span class="sourceLineNo">117</span>      if (!isRegionStillOpening()) {<a name="line.117"></a>
+<span class="sourceLineNo">118</span>        return;<a name="line.118"></a>
+<span class="sourceLineNo">119</span>      }<a name="line.119"></a>
+<span class="sourceLineNo">120</span><a name="line.120"></a>
+<span class="sourceLineNo">121</span>      // Successful region open, and add it to OnlineRegions<a name="line.121"></a>
+<span class="sourceLineNo">122</span>      this.rsServices.addToOnlineRegions(region);<a name="line.122"></a>
+<span class="sourceLineNo">123</span>      openSuccessful = true;<a name="line.123"></a>
+<span class="sourceLineNo">124</span><a name="line.124"></a>
+<span class="sourceLineNo">125</span>      // Done!  Successful region open<a name="line.125"></a>
+<span class="sourceLineNo">126</span>      LOG.debug("Opened " + regionName + " on " +<a name="line.126"></a>
+<span class="sourceLineNo">127</span>        this.server.getServerName());<a name="line.127"></a>
+<span class="sourceLineNo">128</span>    } finally {<a name="line.128"></a>
+<span class="sourceLineNo">129</span>      // Do all clean up here<a name="line.129"></a>
+<span class="sourceLineNo">130</span>      if (!openSuccessful) {<a name="line.130"></a>
+<span class="sourceLineNo">131</span>        doCleanUpOnFailedOpen(region);<a name="line.131"></a>
+<span class="sourceLineNo">132</span>      }<a name="line.132"></a>
+<span class="sourceLineNo">133</span>      final Boolean current = this.rsServices.getRegionsInTransitionInRS().<a name="line.133"></a>
+<span class="sourceLineNo">134</span>          remove(this.regionInfo.getEncodedNameAsBytes());<a name="line.134"></a>
+<span class="sourceLineNo">135</span><a name="line.135"></a>
+<span class="sourceLineNo">136</span>      // Let's check if we have met a race condition on open cancellation....<a name="line.136"></a>
+<span class="sourceLineNo">137</span>      // A better solution would be to not have any race condition.<a name="line.137"></a>
+<span class="sourceLineNo">138</span>      // this.rsServices.getRegionsInTransitionInRS().remove(<a name="line.138"></a>
+<span class="sourceLineNo">139</span>      //  this.regionInfo.getEncodedNameAsBytes(), Boolean.TRUE);<a name="line.139"></a>
+<span class="sourceLineNo">140</span>      // would help.<a name="line.140"></a>
+<span class="sourceLineNo">141</span>      if (openSuccessful) {<a name="line.141"></a>
+<span class="sourceLineNo">142</span>        if (current == null) { // Should NEVER happen, but let's be paranoid.<a name="line.142"></a>
+<span class="sourceLineNo">143</span>          LOG.error("Bad state: we've just opened a region that was NOT in transition. Region="<a name="line.143"></a>
+<span class="sourceLineNo">144</span>              + regionName);<a name="line.144"></a>
+<span class="sourceLineNo">145</span>        } else if (Boolean.FALSE.equals(current)) { // Can happen, if we're<a name="line.145"></a>
+<span class="sourceLineNo">146</span>                                                    // really unlucky.<a name="line.146"></a>
+<span class="sourceLineNo">147</span>          LOG.error("Race condition: we've finished to open a region, while a close was requested "<a name="line.147"></a>
+<span class="sourceLineNo">148</span>              + " on region=" + regionName + ". It can be a critical error, as a region that"<a name="line.148"></a>
+<span class="sourceLineNo">149</span>              + " should be closed is now opened. Closing it now");<a name="line.149"></a>
+<span class="sourceLineNo">150</span>          cleanupFailedOpen(region);<a name="line.150"></a>
+<span class="sourceLineNo">151</span>        }<a name="line.151"></a>
+<span class="sourceLineNo">152</span>      }<a name="line.152"></a>
+<span class="sourceLineNo">153</span>    }<a name="line.153"></a>
+<span class="sourceLineNo">154</span>  }<a name="line.154"></a>
+<span class="sourceLineNo">155</span><a name="line.155"></a>
+<span class="sourceLineNo">156</span>  private void doCleanUpOnFailedOpen(HRegion region)<a name="line.156"></a>
+<span class="sourceLineNo">157</span>      throws IOException {<a name="line.157"></a>
+<span class="sourceLineNo">158</span>    try {<a name="line.158"></a>
+<span class="sourceLineNo">159</span>      if (region != null) {<a name="line.159"></a>
+<span class="sourceLineNo">160</span>        cleanupFailedOpen(region);<a name="line.160"></a>
+<span class="sourceLineNo">161</span>      }<a name="line.161"></a>
+<span class="sourceLineNo">162</span>    } finally {<a name="line.162"></a>
+<span class="sourceLineNo">163</span>      rsServices.reportRegionStateTransition(TransitionCode.FAILED_OPEN, regionInfo);<a name="line.163"></a>
+<span class="sourceLineNo">164</span>    }<a name="line.164"></a>
+<span class="sourceLineNo">165</span>  }<a name="line.165"></a>
+<span class="sourceLineNo">166</span><a name="line.166"></a>
+<span class="sourceLineNo">167</span>  /**<a name="line.167"></a>
+<span class="sourceLineNo">168</span>   * Update ZK or META.  This can take a while if for example the<a name="line.168"></a>
+<span class="sourceLineNo">169</span>   * hbase:meta is not available -- if server hosting hbase:meta crashed and we are<a name="line.169"></a>
+<span class="sourceLineNo">170</span>   * waiting on it to come back -- so run in a thread and keep updating znode<a name="line.170"></a>
+<span class="sourceLineNo">171</span>   * state meantime so master doesn't timeout our region-in-transition.<a name="line.171"></a>
+<span class="sourceLineNo">172</span>   * Caller must cleanup region if this fails.<a name="line.172"></a>
+<span class="sourceLineNo">173</span>   */<a name="line.173"></a>
+<span class="sourceLineNo">174</span>  boolean updateMeta(final HRegion r, long masterSystemTime) {<a name="line.174"></a>
+<span class="sourceLineNo">175</span>    if (this.server.isStopped() || this.rsServices.isStopping()) {<a name="line.175"></a>
+<span class="sourceLineNo">176</span>      return false;<a name="line.176"></a>
+<span class="sourceLineNo">177</span>    }<a name="line.177"></a>
+<span class="sourceLineNo">178</span>    // Object we do wait/notify on.  Make it boolean.  If set, we're done.<a name="line.178"></a>
+<span class="sourceLineNo">179</span>    // Else, wait.<a name="line.179"></a>
+<span class="sourceLineNo">180</span>    final AtomicBoolean signaller = new AtomicBoolean(false);<a name="line.180"></a>
+<span class="sourceLineNo">181</span>    PostOpenDeployTasksThread t = new PostOpenDeployTasksThread(r,<a name="line.181"></a>
+<span class="sourceLineNo">182</span>      this.server, this.rsServices, signaller, masterSystemTime);<a name="line.182"></a>
+<span class="sourceLineNo">183</span>    t.start();<a name="line.183"></a>
+<span class="sourceLineNo">184</span>    // Post open deploy task:<a name="line.184"></a>
+<span class="sourceLineNo">185</span>    //   meta =&gt; update meta location in ZK<a name="line.185"></a>
+<span class="sourceLineNo">186</span>    //   other region =&gt; update meta<a name="line.186"></a>
+<span class="sourceLineNo">187</span>    while (!signaller.get() &amp;&amp; t.isAlive() &amp;&amp; !this.server.isStopped() &amp;&amp;<a name="line.187"></a>
+<span class="sourceLineNo">188</span>        !this.rsServices.isStopping() &amp;&amp; isRegionStillOpening()) {<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      synchronized (signaller) {<a name="line.189"></a>
+<span class="sourceLineNo">190</span>        try {<a name="line.190"></a>
+<span class="sourceLineNo">191</span>          // Wait for 10 seconds, so that server shutdown<a name="line.191"></a>
+<span class="sourceLineNo">192</span>          // won't take too long if this thread happens to run.<a name="line.192"></a>
+<span class="sourceLineNo">193</span>          if (!signaller.get()) signaller.wait(10000);<a name="line.193"></a>
+<span class="sourceLineNo">194</span>        } catch (InterruptedException e) {<a name="line.194"></a>
+<span class="sourceLineNo">195</span>          // Go to the loop check.<a name="line.195"></a>
+<span class="sourceLineNo">196</span>        }<a name="line.196"></a>
+<span class="sourceLineNo">197</span>      }<a name="line.197"></a>
+<span class="sourceLineNo">198</span>    }<a name="line.198"></a>
+<span class="sourceLineNo">199</span>    // Is thread still alive?  We may have left above loop because server is<a name="line.199"></a>
+<span class="sourceLineNo">200</span>    // stopping or we timed out the edit.  Is so, interrupt it.<a name="line.200"></a>
+<span class="sourceLineNo">201</span>    if (t.isAlive()) {<a name="line.201"></a>
+<span class="sourceLineNo">202</span>      if (!signaller.get()) {<a name="line.202"></a>
+<span class="sourceLineNo">203</span>        // Thread still running; interrupt<a name="line.203"></a>
+<span class="sourceLineNo">204</span>        LOG.debug("Interrupting thread " + t);<a name="line.204"></a>
+<span class="sourceLineNo">205</span>        t.interrupt();<a name="line.205"></a>
+<span class="sourceLineNo">206</span>      }<a name="line.206"></a>
+<span class="sourceLineNo">207</span>      try {<a name="line.207"></a>
+<span class="sourceLineNo">208</span>        t.join();<a name="line.208"></a>
+<span class="sourceLineNo">209</span>      } catch (InterruptedException ie) {<a name="line.209"></a>
+<span class="sourceLineNo">210</span>        LOG.warn("Interrupted joining " +<a name="line.210"></a>
+<span class="sourceLineNo">211</span>          r.getRegionInfo().getRegionNameAsString(), ie);<a name="line.211"></a>
+<span class="sourceLineNo">212</span>        Thread.currentThread().interrupt();<a name="line.212"></a>
+<span class="sourceLineNo">213</span>      }<a name="line.213"></a>
+<span class="sourceLineNo">214</span>    }<a name="line.214"></a>
+<span class="sourceLineNo">215</span><a name="line.215"></a>
+<span class="sourceLineNo">216</span>    // Was there an exception opening the region?  This should trigger on<a name="line.216"></a>
+<span class="sourceLineNo">217</span>    // InterruptedException too.  If so, we failed.<a name="line.217"></a>
+<span class="sourceLineNo">218</span>    return (!Thread.interrupted() &amp;&amp; t.getException() == null);<a name="line.218"></a>
+<span class="sourceLineNo">219</span>  }<a name="line.219"></a>
+<span class="sourceLineNo">220</span><a name="line.220"></a>
+<span class="sourceLineNo">221</span>  /**<a name="line.221"></a>
+<span class="sourceLineNo">222</span>   * Thread to run region post open tasks. Call {@link #getException()} after the thread finishes<a name="line.222"></a>
+<span class="sourceLineNo">223</span>   * to check for exceptions running {@link RegionServerServices#postOpenDeployTasks(Region)}.<a name="line.223"></a>
 <span class="sourceLineNo">224</span>   */<a name="line.224"></a>
 <span class="sourceLineNo">225</span>  static class PostOpenDeployTasksThread extends Thread {<a name="line.225"></a>
 <span class="sourceLineNo">226</span>    private Throwable exception = null;<a name="line.226"></a>


Mime
View raw message