hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [32/51] [partial] hbase-site git commit: Published site at .
Date Sat, 16 Dec 2017 15:18:20 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/c4c0cfa5/apidocs/src-html/org/apache/hadoop/hbase/HRegionInfo.html
----------------------------------------------------------------------
diff --git a/apidocs/src-html/org/apache/hadoop/hbase/HRegionInfo.html b/apidocs/src-html/org/apache/hadoop/hbase/HRegionInfo.html
index 332eacd..b0b983c 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/HRegionInfo.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/HRegionInfo.html
@@ -128,905 +128,929 @@
 <span class="sourceLineNo">120</span>  /**<a name="line.120"></a>
 <span class="sourceLineNo">121</span>   * @return Return a short, printable name for this region (usually encoded name) for us logging.<a name="line.121"></a>
 <span class="sourceLineNo">122</span>   */<a name="line.122"></a>
-<span class="sourceLineNo">123</span>  public String getShortNameToLog() {<a name="line.123"></a>
-<span class="sourceLineNo">124</span>    return prettyPrint(this.getEncodedName());<a name="line.124"></a>
-<span class="sourceLineNo">125</span>  }<a name="line.125"></a>
-<span class="sourceLineNo">126</span><a name="line.126"></a>
-<span class="sourceLineNo">127</span>  /**<a name="line.127"></a>
-<span class="sourceLineNo">128</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.128"></a>
-<span class="sourceLineNo">129</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getShortNameToLog(RegionInfo...)}.<a name="line.129"></a>
-<span class="sourceLineNo">130</span>   */<a name="line.130"></a>
-<span class="sourceLineNo">131</span>  @Deprecated<a name="line.131"></a>
-<span class="sourceLineNo">132</span>  public static String getShortNameToLog(HRegionInfo...hris) {<a name="line.132"></a>
-<span class="sourceLineNo">133</span>    return RegionInfo.getShortNameToLog(Arrays.asList(hris));<a name="line.133"></a>
-<span class="sourceLineNo">134</span>  }<a name="line.134"></a>
-<span class="sourceLineNo">135</span><a name="line.135"></a>
-<span class="sourceLineNo">136</span>  /**<a name="line.136"></a>
-<span class="sourceLineNo">137</span>   * @return Return a String of short, printable names for &lt;code&gt;hris&lt;/code&gt;<a name="line.137"></a>
-<span class="sourceLineNo">138</span>   * (usually encoded name) for us logging.<a name="line.138"></a>
-<span class="sourceLineNo">139</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.139"></a>
-<span class="sourceLineNo">140</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getShortNameToLog(List)})}.<a name="line.140"></a>
-<span class="sourceLineNo">141</span>   */<a name="line.141"></a>
-<span class="sourceLineNo">142</span>  @Deprecated<a name="line.142"></a>
-<span class="sourceLineNo">143</span>  public static String getShortNameToLog(final List&lt;HRegionInfo&gt; hris) {<a name="line.143"></a>
-<span class="sourceLineNo">144</span>    return RegionInfo.getShortNameToLog(hris.stream().collect(Collectors.toList()));<a name="line.144"></a>
-<span class="sourceLineNo">145</span>  }<a name="line.145"></a>
-<span class="sourceLineNo">146</span><a name="line.146"></a>
-<span class="sourceLineNo">147</span>  /**<a name="line.147"></a>
-<span class="sourceLineNo">148</span>   * Use logging.<a name="line.148"></a>
-<span class="sourceLineNo">149</span>   * @param encodedRegionName The encoded regionname.<a name="line.149"></a>
-<span class="sourceLineNo">150</span>   * @return &lt;code&gt;hbase:meta&lt;/code&gt; if passed &lt;code&gt;1028785192&lt;/code&gt; else returns<a name="line.150"></a>
-<span class="sourceLineNo">151</span>   * &lt;code&gt;encodedRegionName&lt;/code&gt;<a name="line.151"></a>
-<span class="sourceLineNo">152</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.152"></a>
-<span class="sourceLineNo">153</span>   *             Use {@link RegionInfo#prettyPrint(String)}.<a name="line.153"></a>
-<span class="sourceLineNo">154</span>   */<a name="line.154"></a>
-<span class="sourceLineNo">155</span>  @Deprecated<a name="line.155"></a>
-<span class="sourceLineNo">156</span>  @InterfaceAudience.Private<a name="line.156"></a>
-<span class="sourceLineNo">157</span>  public static String prettyPrint(final String encodedRegionName) {<a name="line.157"></a>
-<span class="sourceLineNo">158</span>    return RegionInfo.prettyPrint(encodedRegionName);<a name="line.158"></a>
-<span class="sourceLineNo">159</span>  }<a name="line.159"></a>
-<span class="sourceLineNo">160</span><a name="line.160"></a>
-<span class="sourceLineNo">161</span>  private byte [] endKey = HConstants.EMPTY_BYTE_ARRAY;<a name="line.161"></a>
-<span class="sourceLineNo">162</span>  // This flag is in the parent of a split while the parent is still referenced<a name="line.162"></a>
-<span class="sourceLineNo">163</span>  // by daughter regions.  We USED to set this flag when we disabled a table<a name="line.163"></a>
-<span class="sourceLineNo">164</span>  // but now table state is kept up in zookeeper as of 0.90.0 HBase.<a name="line.164"></a>
-<span class="sourceLineNo">165</span>  private boolean offLine = false;<a name="line.165"></a>
-<span class="sourceLineNo">166</span>  private long regionId = -1;<a name="line.166"></a>
-<span class="sourceLineNo">167</span>  private transient byte [] regionName = HConstants.EMPTY_BYTE_ARRAY;<a name="line.167"></a>
-<span class="sourceLineNo">168</span>  private boolean split = false;<a name="line.168"></a>
-<span class="sourceLineNo">169</span>  private byte [] startKey = HConstants.EMPTY_BYTE_ARRAY;<a name="line.169"></a>
-<span class="sourceLineNo">170</span>  private int hashCode = -1;<a name="line.170"></a>
-<span class="sourceLineNo">171</span>  //TODO: Move NO_HASH to HStoreFile which is really the only place it is used.<a name="line.171"></a>
-<span class="sourceLineNo">172</span>  public static final String NO_HASH = null;<a name="line.172"></a>
-<span class="sourceLineNo">173</span>  private String encodedName = null;<a name="line.173"></a>
-<span class="sourceLineNo">174</span>  private byte [] encodedNameAsBytes = null;<a name="line.174"></a>
-<span class="sourceLineNo">175</span>  private int replicaId = DEFAULT_REPLICA_ID;<a name="line.175"></a>
-<span class="sourceLineNo">176</span><a name="line.176"></a>
-<span class="sourceLineNo">177</span>  // Current TableName<a name="line.177"></a>
-<span class="sourceLineNo">178</span>  private TableName tableName = null;<a name="line.178"></a>
-<span class="sourceLineNo">179</span><a name="line.179"></a>
-<span class="sourceLineNo">180</span>  // Duplicated over in RegionInfoDisplay<a name="line.180"></a>
-<span class="sourceLineNo">181</span>  final static String DISPLAY_KEYS_KEY = RegionInfoDisplay.DISPLAY_KEYS_KEY;<a name="line.181"></a>
-<span class="sourceLineNo">182</span>  public final static byte[] HIDDEN_END_KEY = RegionInfoDisplay.HIDDEN_END_KEY;<a name="line.182"></a>
-<span class="sourceLineNo">183</span>  public final static byte[] HIDDEN_START_KEY = RegionInfoDisplay.HIDDEN_START_KEY;<a name="line.183"></a>
-<span class="sourceLineNo">184</span><a name="line.184"></a>
-<span class="sourceLineNo">185</span>  /** HRegionInfo for first meta region */<a name="line.185"></a>
-<span class="sourceLineNo">186</span>  // TODO: How come Meta regions still do not have encoded region names? Fix.<a name="line.186"></a>
-<span class="sourceLineNo">187</span>  public static final HRegionInfo FIRST_META_REGIONINFO =<a name="line.187"></a>
-<span class="sourceLineNo">188</span>      new HRegionInfo(1L, TableName.META_TABLE_NAME);<a name="line.188"></a>
-<span class="sourceLineNo">189</span><a name="line.189"></a>
-<span class="sourceLineNo">190</span>  private void setHashCode() {<a name="line.190"></a>
-<span class="sourceLineNo">191</span>    int result = Arrays.hashCode(this.regionName);<a name="line.191"></a>
-<span class="sourceLineNo">192</span>    result ^= this.regionId;<a name="line.192"></a>
-<span class="sourceLineNo">193</span>    result ^= Arrays.hashCode(this.startKey);<a name="line.193"></a>
-<span class="sourceLineNo">194</span>    result ^= Arrays.hashCode(this.endKey);<a name="line.194"></a>
-<span class="sourceLineNo">195</span>    result ^= Boolean.valueOf(this.offLine).hashCode();<a name="line.195"></a>
-<span class="sourceLineNo">196</span>    result ^= Arrays.hashCode(this.tableName.getName());<a name="line.196"></a>
-<span class="sourceLineNo">197</span>    result ^= this.replicaId;<a name="line.197"></a>
-<span class="sourceLineNo">198</span>    this.hashCode = result;<a name="line.198"></a>
-<span class="sourceLineNo">199</span>  }<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>   * Private constructor used constructing HRegionInfo for the<a name="line.202"></a>
-<span class="sourceLineNo">203</span>   * first meta regions<a name="line.203"></a>
-<span class="sourceLineNo">204</span>   */<a name="line.204"></a>
-<span class="sourceLineNo">205</span>  private HRegionInfo(long regionId, TableName tableName) {<a name="line.205"></a>
-<span class="sourceLineNo">206</span>    this(regionId, tableName, DEFAULT_REPLICA_ID);<a name="line.206"></a>
-<span class="sourceLineNo">207</span>  }<a name="line.207"></a>
-<span class="sourceLineNo">208</span><a name="line.208"></a>
-<span class="sourceLineNo">209</span>  public HRegionInfo(long regionId, TableName tableName, int replicaId) {<a name="line.209"></a>
-<span class="sourceLineNo">210</span>    super();<a name="line.210"></a>
-<span class="sourceLineNo">211</span>    this.regionId = regionId;<a name="line.211"></a>
-<span class="sourceLineNo">212</span>    this.tableName = tableName;<a name="line.212"></a>
-<span class="sourceLineNo">213</span>    this.replicaId = replicaId;<a name="line.213"></a>
-<span class="sourceLineNo">214</span>    // Note: First Meta region replicas names are in old format<a name="line.214"></a>
-<span class="sourceLineNo">215</span>    this.regionName = createRegionName(tableName, null, regionId, replicaId, false);<a name="line.215"></a>
-<span class="sourceLineNo">216</span>    setHashCode();<a name="line.216"></a>
-<span class="sourceLineNo">217</span>  }<a name="line.217"></a>
-<span class="sourceLineNo">218</span><a name="line.218"></a>
-<span class="sourceLineNo">219</span>  public HRegionInfo(final TableName tableName) {<a name="line.219"></a>
-<span class="sourceLineNo">220</span>    this(tableName, null, null);<a name="line.220"></a>
-<span class="sourceLineNo">221</span>  }<a name="line.221"></a>
-<span class="sourceLineNo">222</span><a name="line.222"></a>
-<span class="sourceLineNo">223</span>  /**<a name="line.223"></a>
-<span class="sourceLineNo">224</span>   * Construct HRegionInfo with explicit parameters<a name="line.224"></a>
-<span class="sourceLineNo">225</span>   *<a name="line.225"></a>
-<span class="sourceLineNo">226</span>   * @param tableName the table name<a name="line.226"></a>
-<span class="sourceLineNo">227</span>   * @param startKey first key in region<a name="line.227"></a>
-<span class="sourceLineNo">228</span>   * @param endKey end of key range<a name="line.228"></a>
-<span class="sourceLineNo">229</span>   * @throws IllegalArgumentException<a name="line.229"></a>
-<span class="sourceLineNo">230</span>   */<a name="line.230"></a>
-<span class="sourceLineNo">231</span>  public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey)<a name="line.231"></a>
-<span class="sourceLineNo">232</span>  throws IllegalArgumentException {<a name="line.232"></a>
-<span class="sourceLineNo">233</span>    this(tableName, startKey, endKey, false);<a name="line.233"></a>
-<span class="sourceLineNo">234</span>  }<a name="line.234"></a>
-<span class="sourceLineNo">235</span><a name="line.235"></a>
-<span class="sourceLineNo">236</span>  /**<a name="line.236"></a>
-<span class="sourceLineNo">237</span>   * Construct HRegionInfo with explicit parameters<a name="line.237"></a>
-<span class="sourceLineNo">238</span>   *<a name="line.238"></a>
-<span class="sourceLineNo">239</span>   * @param tableName the table descriptor<a name="line.239"></a>
-<span class="sourceLineNo">240</span>   * @param startKey first key in region<a name="line.240"></a>
-<span class="sourceLineNo">241</span>   * @param endKey end of key range<a name="line.241"></a>
-<span class="sourceLineNo">242</span>   * @param split true if this region has split and we have daughter regions<a name="line.242"></a>
-<span class="sourceLineNo">243</span>   * regions that may or may not hold references to this region.<a name="line.243"></a>
-<span class="sourceLineNo">244</span>   * @throws IllegalArgumentException<a name="line.244"></a>
-<span class="sourceLineNo">245</span>   */<a name="line.245"></a>
-<span class="sourceLineNo">246</span>  public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey,<a name="line.246"></a>
-<span class="sourceLineNo">247</span>      final boolean split)<a name="line.247"></a>
-<span class="sourceLineNo">248</span>  throws IllegalArgumentException {<a name="line.248"></a>
-<span class="sourceLineNo">249</span>    this(tableName, startKey, endKey, split, System.currentTimeMillis());<a name="line.249"></a>
-<span class="sourceLineNo">250</span>  }<a name="line.250"></a>
-<span class="sourceLineNo">251</span><a name="line.251"></a>
-<span class="sourceLineNo">252</span>  /**<a name="line.252"></a>
-<span class="sourceLineNo">253</span>   * Construct HRegionInfo with explicit parameters<a name="line.253"></a>
-<span class="sourceLineNo">254</span>   *<a name="line.254"></a>
-<span class="sourceLineNo">255</span>   * @param tableName the table descriptor<a name="line.255"></a>
-<span class="sourceLineNo">256</span>   * @param startKey first key in region<a name="line.256"></a>
-<span class="sourceLineNo">257</span>   * @param endKey end of key range<a name="line.257"></a>
-<span class="sourceLineNo">258</span>   * @param split true if this region has split and we have daughter regions<a name="line.258"></a>
-<span class="sourceLineNo">259</span>   * regions that may or may not hold references to this region.<a name="line.259"></a>
-<span class="sourceLineNo">260</span>   * @param regionid Region id to use.<a name="line.260"></a>
-<span class="sourceLineNo">261</span>   * @throws IllegalArgumentException<a name="line.261"></a>
-<span class="sourceLineNo">262</span>   */<a name="line.262"></a>
-<span class="sourceLineNo">263</span>  public HRegionInfo(final TableName tableName, final byte[] startKey,<a name="line.263"></a>
-<span class="sourceLineNo">264</span>                     final byte[] endKey, final boolean split, final long regionid)<a name="line.264"></a>
-<span class="sourceLineNo">265</span>  throws IllegalArgumentException {<a name="line.265"></a>
-<span class="sourceLineNo">266</span>    this(tableName, startKey, endKey, split, regionid, DEFAULT_REPLICA_ID);<a name="line.266"></a>
-<span class="sourceLineNo">267</span>  }<a name="line.267"></a>
-<span class="sourceLineNo">268</span><a name="line.268"></a>
-<span class="sourceLineNo">269</span>  /**<a name="line.269"></a>
-<span class="sourceLineNo">270</span>   * Construct HRegionInfo with explicit parameters<a name="line.270"></a>
-<span class="sourceLineNo">271</span>   *<a name="line.271"></a>
-<span class="sourceLineNo">272</span>   * @param tableName the table descriptor<a name="line.272"></a>
-<span class="sourceLineNo">273</span>   * @param startKey first key in region<a name="line.273"></a>
-<span class="sourceLineNo">274</span>   * @param endKey end of key range<a name="line.274"></a>
-<span class="sourceLineNo">275</span>   * @param split true if this region has split and we have daughter regions<a name="line.275"></a>
-<span class="sourceLineNo">276</span>   * regions that may or may not hold references to this region.<a name="line.276"></a>
-<span class="sourceLineNo">277</span>   * @param regionid Region id to use.<a name="line.277"></a>
-<span class="sourceLineNo">278</span>   * @param replicaId the replicaId to use<a name="line.278"></a>
-<span class="sourceLineNo">279</span>   * @throws IllegalArgumentException<a name="line.279"></a>
-<span class="sourceLineNo">280</span>   */<a name="line.280"></a>
-<span class="sourceLineNo">281</span>  public HRegionInfo(final TableName tableName, final byte[] startKey,<a name="line.281"></a>
-<span class="sourceLineNo">282</span>                     final byte[] endKey, final boolean split, final long regionid,<a name="line.282"></a>
-<span class="sourceLineNo">283</span>                     final int replicaId)<a name="line.283"></a>
-<span class="sourceLineNo">284</span>    throws IllegalArgumentException {<a name="line.284"></a>
-<span class="sourceLineNo">285</span>    super();<a name="line.285"></a>
-<span class="sourceLineNo">286</span>    if (tableName == null) {<a name="line.286"></a>
-<span class="sourceLineNo">287</span>      throw new IllegalArgumentException("TableName cannot be null");<a name="line.287"></a>
-<span class="sourceLineNo">288</span>    }<a name="line.288"></a>
-<span class="sourceLineNo">289</span>    this.tableName = tableName;<a name="line.289"></a>
-<span class="sourceLineNo">290</span>    this.offLine = false;<a name="line.290"></a>
-<span class="sourceLineNo">291</span>    this.regionId = regionid;<a name="line.291"></a>
-<span class="sourceLineNo">292</span>    this.replicaId = replicaId;<a name="line.292"></a>
-<span class="sourceLineNo">293</span>    if (this.replicaId &gt; MAX_REPLICA_ID) {<a name="line.293"></a>
-<span class="sourceLineNo">294</span>      throw new IllegalArgumentException("ReplicaId cannot be greater than" + MAX_REPLICA_ID);<a name="line.294"></a>
-<span class="sourceLineNo">295</span>    }<a name="line.295"></a>
-<span class="sourceLineNo">296</span><a name="line.296"></a>
-<span class="sourceLineNo">297</span>    this.regionName = createRegionName(this.tableName, startKey, regionId, replicaId, true);<a name="line.297"></a>
-<span class="sourceLineNo">298</span><a name="line.298"></a>
-<span class="sourceLineNo">299</span>    this.split = split;<a name="line.299"></a>
-<span class="sourceLineNo">300</span>    this.endKey = endKey == null? HConstants.EMPTY_END_ROW: endKey.clone();<a name="line.300"></a>
-<span class="sourceLineNo">301</span>    this.startKey = startKey == null?<a name="line.301"></a>
-<span class="sourceLineNo">302</span>      HConstants.EMPTY_START_ROW: startKey.clone();<a name="line.302"></a>
-<span class="sourceLineNo">303</span>    this.tableName = tableName;<a name="line.303"></a>
-<span class="sourceLineNo">304</span>    setHashCode();<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>   * Costruct a copy of another HRegionInfo<a name="line.308"></a>
-<span class="sourceLineNo">309</span>   *<a name="line.309"></a>
-<span class="sourceLineNo">310</span>   * @param other<a name="line.310"></a>
-<span class="sourceLineNo">311</span>   */<a name="line.311"></a>
-<span class="sourceLineNo">312</span>  public HRegionInfo(RegionInfo other) {<a name="line.312"></a>
-<span class="sourceLineNo">313</span>    super();<a name="line.313"></a>
-<span class="sourceLineNo">314</span>    this.endKey = other.getEndKey();<a name="line.314"></a>
-<span class="sourceLineNo">315</span>    this.offLine = other.isOffline();<a name="line.315"></a>
-<span class="sourceLineNo">316</span>    this.regionId = other.getRegionId();<a name="line.316"></a>
-<span class="sourceLineNo">317</span>    this.regionName = other.getRegionName();<a name="line.317"></a>
-<span class="sourceLineNo">318</span>    this.split = other.isSplit();<a name="line.318"></a>
-<span class="sourceLineNo">319</span>    this.startKey = other.getStartKey();<a name="line.319"></a>
-<span class="sourceLineNo">320</span>    this.hashCode = other.hashCode();<a name="line.320"></a>
-<span class="sourceLineNo">321</span>    this.encodedName = other.getEncodedName();<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    this.tableName = other.getTable();<a name="line.322"></a>
-<span class="sourceLineNo">323</span>    this.replicaId = other.getReplicaId();<a name="line.323"></a>
-<span class="sourceLineNo">324</span>  }<a name="line.324"></a>
-<span class="sourceLineNo">325</span><a name="line.325"></a>
-<span class="sourceLineNo">326</span>  public HRegionInfo(HRegionInfo other, int replicaId) {<a name="line.326"></a>
-<span class="sourceLineNo">327</span>    this(other);<a name="line.327"></a>
-<span class="sourceLineNo">328</span>    this.replicaId = replicaId;<a name="line.328"></a>
-<span class="sourceLineNo">329</span>    this.setHashCode();<a name="line.329"></a>
-<span class="sourceLineNo">330</span>  }<a name="line.330"></a>
-<span class="sourceLineNo">331</span><a name="line.331"></a>
-<span class="sourceLineNo">332</span>  /**<a name="line.332"></a>
-<span class="sourceLineNo">333</span>   * Make a region name of passed parameters.<a name="line.333"></a>
-<span class="sourceLineNo">334</span>   * @param tableName<a name="line.334"></a>
-<span class="sourceLineNo">335</span>   * @param startKey Can be null<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   * @param regionid Region id (Usually timestamp from when region was created).<a name="line.336"></a>
-<span class="sourceLineNo">337</span>   * @param newFormat should we create the region name in the new format<a name="line.337"></a>
-<span class="sourceLineNo">338</span>   *                  (such that it contains its encoded name?).<a name="line.338"></a>
-<span class="sourceLineNo">339</span>   * @return Region name made of passed tableName, startKey and id<a name="line.339"></a>
-<span class="sourceLineNo">340</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.340"></a>
-<span class="sourceLineNo">341</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], long, boolean)}.<a name="line.341"></a>
-<span class="sourceLineNo">342</span>   */<a name="line.342"></a>
-<span class="sourceLineNo">343</span>  @Deprecated<a name="line.343"></a>
-<span class="sourceLineNo">344</span>  @InterfaceAudience.Private<a name="line.344"></a>
-<span class="sourceLineNo">345</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.345"></a>
-<span class="sourceLineNo">346</span>      final byte [] startKey, final long regionid, boolean newFormat) {<a name="line.346"></a>
-<span class="sourceLineNo">347</span>    return RegionInfo.createRegionName(tableName, startKey, Long.toString(regionid), newFormat);<a name="line.347"></a>
-<span class="sourceLineNo">348</span>  }<a name="line.348"></a>
-<span class="sourceLineNo">349</span><a name="line.349"></a>
-<span class="sourceLineNo">350</span>  /**<a name="line.350"></a>
-<span class="sourceLineNo">351</span>   * Make a region name of passed parameters.<a name="line.351"></a>
-<span class="sourceLineNo">352</span>   * @param tableName<a name="line.352"></a>
-<span class="sourceLineNo">353</span>   * @param startKey Can be null<a name="line.353"></a>
-<span class="sourceLineNo">354</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.354"></a>
-<span class="sourceLineNo">355</span>   * @param newFormat should we create the region name in the new format<a name="line.355"></a>
-<span class="sourceLineNo">356</span>   *                  (such that it contains its encoded name?).<a name="line.356"></a>
-<span class="sourceLineNo">357</span>   * @return Region name made of passed tableName, startKey and id<a name="line.357"></a>
-<span class="sourceLineNo">358</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.358"></a>
-<span class="sourceLineNo">359</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], String, boolean)}.<a name="line.359"></a>
-<span class="sourceLineNo">360</span>   */<a name="line.360"></a>
-<span class="sourceLineNo">361</span>  @Deprecated<a name="line.361"></a>
-<span class="sourceLineNo">362</span>  @InterfaceAudience.Private<a name="line.362"></a>
-<span class="sourceLineNo">363</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.363"></a>
-<span class="sourceLineNo">364</span>      final byte [] startKey, final String id, boolean newFormat) {<a name="line.364"></a>
-<span class="sourceLineNo">365</span>    return RegionInfo.createRegionName(tableName, startKey, Bytes.toBytes(id), newFormat);<a name="line.365"></a>
-<span class="sourceLineNo">366</span>  }<a name="line.366"></a>
-<span class="sourceLineNo">367</span><a name="line.367"></a>
-<span class="sourceLineNo">368</span>  /**<a name="line.368"></a>
-<span class="sourceLineNo">369</span>   * Make a region name of passed parameters.<a name="line.369"></a>
-<span class="sourceLineNo">370</span>   * @param tableName<a name="line.370"></a>
-<span class="sourceLineNo">371</span>   * @param startKey Can be null<a name="line.371"></a>
-<span class="sourceLineNo">372</span>   * @param regionid Region id (Usually timestamp from when region was created).<a name="line.372"></a>
-<span class="sourceLineNo">373</span>   * @param replicaId<a name="line.373"></a>
-<span class="sourceLineNo">374</span>   * @param newFormat should we create the region name in the new format<a name="line.374"></a>
-<span class="sourceLineNo">375</span>   *                  (such that it contains its encoded name?).<a name="line.375"></a>
-<span class="sourceLineNo">376</span>   * @return Region name made of passed tableName, startKey, id and replicaId<a name="line.376"></a>
-<span class="sourceLineNo">377</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.377"></a>
-<span class="sourceLineNo">378</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], long, int, boolean)}.<a name="line.378"></a>
-<span class="sourceLineNo">379</span>   */<a name="line.379"></a>
-<span class="sourceLineNo">380</span>  @Deprecated<a name="line.380"></a>
-<span class="sourceLineNo">381</span>  @InterfaceAudience.Private<a name="line.381"></a>
-<span class="sourceLineNo">382</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.382"></a>
-<span class="sourceLineNo">383</span>      final byte [] startKey, final long regionid, int replicaId, boolean newFormat) {<a name="line.383"></a>
-<span class="sourceLineNo">384</span>    return RegionInfo.createRegionName(tableName, startKey, Bytes.toBytes(Long.toString(regionid)),<a name="line.384"></a>
-<span class="sourceLineNo">385</span>        replicaId, newFormat);<a name="line.385"></a>
-<span class="sourceLineNo">386</span>  }<a name="line.386"></a>
-<span class="sourceLineNo">387</span><a name="line.387"></a>
-<span class="sourceLineNo">388</span>  /**<a name="line.388"></a>
-<span class="sourceLineNo">389</span>   * Make a region name of passed parameters.<a name="line.389"></a>
-<span class="sourceLineNo">390</span>   * @param tableName<a name="line.390"></a>
-<span class="sourceLineNo">391</span>   * @param startKey Can be null<a name="line.391"></a>
-<span class="sourceLineNo">392</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.392"></a>
-<span class="sourceLineNo">393</span>   * @param newFormat should we create the region name in the new format<a name="line.393"></a>
-<span class="sourceLineNo">394</span>   *                  (such that it contains its encoded name?).<a name="line.394"></a>
-<span class="sourceLineNo">395</span>   * @return Region name made of passed tableName, startKey and id<a name="line.395"></a>
-<span class="sourceLineNo">396</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.396"></a>
-<span class="sourceLineNo">397</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], byte[], boolean)}.<a name="line.397"></a>
-<span class="sourceLineNo">398</span>   */<a name="line.398"></a>
-<span class="sourceLineNo">399</span>  @Deprecated<a name="line.399"></a>
-<span class="sourceLineNo">400</span>  @InterfaceAudience.Private<a name="line.400"></a>
-<span class="sourceLineNo">401</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.401"></a>
-<span class="sourceLineNo">402</span>      final byte [] startKey, final byte [] id, boolean newFormat) {<a name="line.402"></a>
-<span class="sourceLineNo">403</span>    return RegionInfo.createRegionName(tableName, startKey, id, DEFAULT_REPLICA_ID, newFormat);<a name="line.403"></a>
-<span class="sourceLineNo">404</span>  }<a name="line.404"></a>
-<span class="sourceLineNo">405</span>  /**<a name="line.405"></a>
-<span class="sourceLineNo">406</span>   * Make a region name of passed parameters.<a name="line.406"></a>
-<span class="sourceLineNo">407</span>   * @param tableName<a name="line.407"></a>
-<span class="sourceLineNo">408</span>   * @param startKey Can be null<a name="line.408"></a>
-<span class="sourceLineNo">409</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.409"></a>
-<span class="sourceLineNo">410</span>   * @param replicaId<a name="line.410"></a>
-<span class="sourceLineNo">411</span>   * @param newFormat should we create the region name in the new format<a name="line.411"></a>
-<span class="sourceLineNo">412</span>   * @return Region name made of passed tableName, startKey, id and replicaId<a name="line.412"></a>
-<span class="sourceLineNo">413</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.413"></a>
-<span class="sourceLineNo">414</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], byte[], int, boolean)}.<a name="line.414"></a>
-<span class="sourceLineNo">415</span>   */<a name="line.415"></a>
-<span class="sourceLineNo">416</span>  @Deprecated<a name="line.416"></a>
-<span class="sourceLineNo">417</span>  @InterfaceAudience.Private<a name="line.417"></a>
-<span class="sourceLineNo">418</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.418"></a>
-<span class="sourceLineNo">419</span>      final byte [] startKey, final byte [] id, final int replicaId, boolean newFormat) {<a name="line.419"></a>
-<span class="sourceLineNo">420</span>    return RegionInfo.createRegionName(tableName, startKey, id, replicaId, newFormat);<a name="line.420"></a>
-<span class="sourceLineNo">421</span>  }<a name="line.421"></a>
-<span class="sourceLineNo">422</span><a name="line.422"></a>
-<span class="sourceLineNo">423</span>  /**<a name="line.423"></a>
-<span class="sourceLineNo">424</span>   * Gets the table name from the specified region name.<a name="line.424"></a>
-<span class="sourceLineNo">425</span>   * @param regionName to extract the table name from<a name="line.425"></a>
-<span class="sourceLineNo">426</span>   * @return Table name<a name="line.426"></a>
-<span class="sourceLineNo">427</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.427"></a>
-<span class="sourceLineNo">428</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getTable(byte[])}.<a name="line.428"></a>
-<span class="sourceLineNo">429</span>   */<a name="line.429"></a>
-<span class="sourceLineNo">430</span>  @Deprecated<a name="line.430"></a>
-<span class="sourceLineNo">431</span>  public static TableName getTable(final byte [] regionName) {<a name="line.431"></a>
-<span class="sourceLineNo">432</span>    return RegionInfo.getTable(regionName);<a name="line.432"></a>
-<span class="sourceLineNo">433</span>  }<a name="line.433"></a>
-<span class="sourceLineNo">434</span><a name="line.434"></a>
-<span class="sourceLineNo">435</span>  /**<a name="line.435"></a>
-<span class="sourceLineNo">436</span>   * Gets the start key from the specified region name.<a name="line.436"></a>
-<span class="sourceLineNo">437</span>   * @param regionName<a name="line.437"></a>
-<span class="sourceLineNo">438</span>   * @return Start key.<a name="line.438"></a>
-<span class="sourceLineNo">439</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.439"></a>
-<span class="sourceLineNo">440</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getStartKey(byte[])}.<a name="line.440"></a>
-<span class="sourceLineNo">441</span>   */<a name="line.441"></a>
-<span class="sourceLineNo">442</span>  @Deprecated<a name="line.442"></a>
-<span class="sourceLineNo">443</span>  public static byte[] getStartKey(final byte[] regionName) throws IOException {<a name="line.443"></a>
-<span class="sourceLineNo">444</span>    return RegionInfo.getStartKey(regionName);<a name="line.444"></a>
-<span class="sourceLineNo">445</span>  }<a name="line.445"></a>
-<span class="sourceLineNo">446</span><a name="line.446"></a>
-<span class="sourceLineNo">447</span>  /**<a name="line.447"></a>
-<span class="sourceLineNo">448</span>   * Separate elements of a regionName.<a name="line.448"></a>
-<span class="sourceLineNo">449</span>   * @param regionName<a name="line.449"></a>
-<span class="sourceLineNo">450</span>   * @return Array of byte[] containing tableName, startKey and id<a name="line.450"></a>
-<span class="sourceLineNo">451</span>   * @throws IOException<a name="line.451"></a>
-<span class="sourceLineNo">452</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.452"></a>
-<span class="sourceLineNo">453</span>   *             Use {@link RegionInfo#parseRegionName(byte[])}.<a name="line.453"></a>
-<span class="sourceLineNo">454</span>   */<a name="line.454"></a>
-<span class="sourceLineNo">455</span>  @Deprecated<a name="line.455"></a>
-<span class="sourceLineNo">456</span>  @InterfaceAudience.Private<a name="line.456"></a>
-<span class="sourceLineNo">457</span>  public static byte [][] parseRegionName(final byte [] regionName)<a name="line.457"></a>
-<span class="sourceLineNo">458</span>  throws IOException {<a name="line.458"></a>
-<span class="sourceLineNo">459</span>    return RegionInfo.parseRegionName(regionName);<a name="line.459"></a>
-<span class="sourceLineNo">460</span>  }<a name="line.460"></a>
-<span class="sourceLineNo">461</span><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>   * @param regionName<a name="line.464"></a>
-<span class="sourceLineNo">465</span>   * @return if region name is encoded.<a name="line.465"></a>
-<span class="sourceLineNo">466</span>   * @throws IOException<a name="line.466"></a>
-<span class="sourceLineNo">467</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.467"></a>
-<span class="sourceLineNo">468</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#isEncodedRegionName(byte[])}.<a name="line.468"></a>
-<span class="sourceLineNo">469</span>   */<a name="line.469"></a>
-<span class="sourceLineNo">470</span>  @Deprecated<a name="line.470"></a>
-<span class="sourceLineNo">471</span>  public static boolean isEncodedRegionName(byte[] regionName) throws IOException {<a name="line.471"></a>
-<span class="sourceLineNo">472</span>    return RegionInfo.isEncodedRegionName(regionName);<a name="line.472"></a>
-<span class="sourceLineNo">473</span>  }<a name="line.473"></a>
-<span class="sourceLineNo">474</span><a name="line.474"></a>
-<span class="sourceLineNo">475</span>  /** @return the regionId */<a name="line.475"></a>
-<span class="sourceLineNo">476</span>  public long getRegionId(){<a name="line.476"></a>
-<span class="sourceLineNo">477</span>    return regionId;<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>  /**<a name="line.480"></a>
-<span class="sourceLineNo">481</span>   * @return the regionName as an array of bytes.<a name="line.481"></a>
-<span class="sourceLineNo">482</span>   * @see #getRegionNameAsString()<a name="line.482"></a>
-<span class="sourceLineNo">483</span>   */<a name="line.483"></a>
-<span class="sourceLineNo">484</span>  public byte [] getRegionName(){<a name="line.484"></a>
-<span class="sourceLineNo">485</span>    return regionName;<a name="line.485"></a>
-<span class="sourceLineNo">486</span>  }<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>   * @return Region name as a String for use in logging, etc.<a name="line.489"></a>
-<span class="sourceLineNo">490</span>   */<a name="line.490"></a>
-<span class="sourceLineNo">491</span>  public String getRegionNameAsString() {<a name="line.491"></a>
-<span class="sourceLineNo">492</span>    if (RegionInfo.hasEncodedName(this.regionName)) {<a name="line.492"></a>
-<span class="sourceLineNo">493</span>      // new format region names already have their encoded name.<a name="line.493"></a>
-<span class="sourceLineNo">494</span>      return Bytes.toStringBinary(this.regionName);<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>    // old format. regionNameStr doesn't have the region name.<a name="line.497"></a>
-<span class="sourceLineNo">498</span>    //<a name="line.498"></a>
-<span class="sourceLineNo">499</span>    //<a name="line.499"></a>
-<span class="sourceLineNo">500</span>    return Bytes.toStringBinary(this.regionName) + "." + this.getEncodedName();<a name="line.500"></a>
-<span class="sourceLineNo">501</span>  }<a name="line.501"></a>
-<span class="sourceLineNo">502</span><a name="line.502"></a>
-<span class="sourceLineNo">503</span>  /** @return the encoded region name */<a name="line.503"></a>
-<span class="sourceLineNo">504</span>  public synchronized String getEncodedName() {<a name="line.504"></a>
-<span class="sourceLineNo">505</span>    if (this.encodedName == null) {<a name="line.505"></a>
-<span class="sourceLineNo">506</span>      this.encodedName = RegionInfo.encodeRegionName(this.regionName);<a name="line.506"></a>
-<span class="sourceLineNo">507</span>    }<a name="line.507"></a>
-<span class="sourceLineNo">508</span>    return this.encodedName;<a name="line.508"></a>
-<span class="sourceLineNo">509</span>  }<a name="line.509"></a>
-<span class="sourceLineNo">510</span><a name="line.510"></a>
-<span class="sourceLineNo">511</span>  public synchronized byte [] getEncodedNameAsBytes() {<a name="line.511"></a>
-<span class="sourceLineNo">512</span>    if (this.encodedNameAsBytes == null) {<a name="line.512"></a>
-<span class="sourceLineNo">513</span>      this.encodedNameAsBytes = Bytes.toBytes(getEncodedName());<a name="line.513"></a>
+<span class="sourceLineNo">123</span>  @Override<a name="line.123"></a>
+<span class="sourceLineNo">124</span>  public String getShortNameToLog() {<a name="line.124"></a>
+<span class="sourceLineNo">125</span>    return prettyPrint(this.getEncodedName());<a name="line.125"></a>
+<span class="sourceLineNo">126</span>  }<a name="line.126"></a>
+<span class="sourceLineNo">127</span><a name="line.127"></a>
+<span class="sourceLineNo">128</span>  /**<a name="line.128"></a>
+<span class="sourceLineNo">129</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.129"></a>
+<span class="sourceLineNo">130</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getShortNameToLog(RegionInfo...)}.<a name="line.130"></a>
+<span class="sourceLineNo">131</span>   */<a name="line.131"></a>
+<span class="sourceLineNo">132</span>  @Deprecated<a name="line.132"></a>
+<span class="sourceLineNo">133</span>  public static String getShortNameToLog(HRegionInfo...hris) {<a name="line.133"></a>
+<span class="sourceLineNo">134</span>    return RegionInfo.getShortNameToLog(Arrays.asList(hris));<a name="line.134"></a>
+<span class="sourceLineNo">135</span>  }<a name="line.135"></a>
+<span class="sourceLineNo">136</span><a name="line.136"></a>
+<span class="sourceLineNo">137</span>  /**<a name="line.137"></a>
+<span class="sourceLineNo">138</span>   * @return Return a String of short, printable names for &lt;code&gt;hris&lt;/code&gt;<a name="line.138"></a>
+<span class="sourceLineNo">139</span>   * (usually encoded name) for us logging.<a name="line.139"></a>
+<span class="sourceLineNo">140</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.140"></a>
+<span class="sourceLineNo">141</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getShortNameToLog(List)})}.<a name="line.141"></a>
+<span class="sourceLineNo">142</span>   */<a name="line.142"></a>
+<span class="sourceLineNo">143</span>  @Deprecated<a name="line.143"></a>
+<span class="sourceLineNo">144</span>  public static String getShortNameToLog(final List&lt;HRegionInfo&gt; hris) {<a name="line.144"></a>
+<span class="sourceLineNo">145</span>    return RegionInfo.getShortNameToLog(hris.stream().collect(Collectors.toList()));<a name="line.145"></a>
+<span class="sourceLineNo">146</span>  }<a name="line.146"></a>
+<span class="sourceLineNo">147</span><a name="line.147"></a>
+<span class="sourceLineNo">148</span>  /**<a name="line.148"></a>
+<span class="sourceLineNo">149</span>   * Use logging.<a name="line.149"></a>
+<span class="sourceLineNo">150</span>   * @param encodedRegionName The encoded regionname.<a name="line.150"></a>
+<span class="sourceLineNo">151</span>   * @return &lt;code&gt;hbase:meta&lt;/code&gt; if passed &lt;code&gt;1028785192&lt;/code&gt; else returns<a name="line.151"></a>
+<span class="sourceLineNo">152</span>   * &lt;code&gt;encodedRegionName&lt;/code&gt;<a name="line.152"></a>
+<span class="sourceLineNo">153</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.153"></a>
+<span class="sourceLineNo">154</span>   *             Use {@link RegionInfo#prettyPrint(String)}.<a name="line.154"></a>
+<span class="sourceLineNo">155</span>   */<a name="line.155"></a>
+<span class="sourceLineNo">156</span>  @Deprecated<a name="line.156"></a>
+<span class="sourceLineNo">157</span>  @InterfaceAudience.Private<a name="line.157"></a>
+<span class="sourceLineNo">158</span>  public static String prettyPrint(final String encodedRegionName) {<a name="line.158"></a>
+<span class="sourceLineNo">159</span>    return RegionInfo.prettyPrint(encodedRegionName);<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>  private byte [] endKey = HConstants.EMPTY_BYTE_ARRAY;<a name="line.162"></a>
+<span class="sourceLineNo">163</span>  // This flag is in the parent of a split while the parent is still referenced<a name="line.163"></a>
+<span class="sourceLineNo">164</span>  // by daughter regions.  We USED to set this flag when we disabled a table<a name="line.164"></a>
+<span class="sourceLineNo">165</span>  // but now table state is kept up in zookeeper as of 0.90.0 HBase.<a name="line.165"></a>
+<span class="sourceLineNo">166</span>  private boolean offLine = false;<a name="line.166"></a>
+<span class="sourceLineNo">167</span>  private long regionId = -1;<a name="line.167"></a>
+<span class="sourceLineNo">168</span>  private transient byte [] regionName = HConstants.EMPTY_BYTE_ARRAY;<a name="line.168"></a>
+<span class="sourceLineNo">169</span>  private boolean split = false;<a name="line.169"></a>
+<span class="sourceLineNo">170</span>  private byte [] startKey = HConstants.EMPTY_BYTE_ARRAY;<a name="line.170"></a>
+<span class="sourceLineNo">171</span>  private int hashCode = -1;<a name="line.171"></a>
+<span class="sourceLineNo">172</span>  //TODO: Move NO_HASH to HStoreFile which is really the only place it is used.<a name="line.172"></a>
+<span class="sourceLineNo">173</span>  public static final String NO_HASH = null;<a name="line.173"></a>
+<span class="sourceLineNo">174</span>  private String encodedName = null;<a name="line.174"></a>
+<span class="sourceLineNo">175</span>  private byte [] encodedNameAsBytes = null;<a name="line.175"></a>
+<span class="sourceLineNo">176</span>  private int replicaId = DEFAULT_REPLICA_ID;<a name="line.176"></a>
+<span class="sourceLineNo">177</span><a name="line.177"></a>
+<span class="sourceLineNo">178</span>  // Current TableName<a name="line.178"></a>
+<span class="sourceLineNo">179</span>  private TableName tableName = null;<a name="line.179"></a>
+<span class="sourceLineNo">180</span><a name="line.180"></a>
+<span class="sourceLineNo">181</span>  // Duplicated over in RegionInfoDisplay<a name="line.181"></a>
+<span class="sourceLineNo">182</span>  final static String DISPLAY_KEYS_KEY = RegionInfoDisplay.DISPLAY_KEYS_KEY;<a name="line.182"></a>
+<span class="sourceLineNo">183</span>  public final static byte[] HIDDEN_END_KEY = RegionInfoDisplay.HIDDEN_END_KEY;<a name="line.183"></a>
+<span class="sourceLineNo">184</span>  public final static byte[] HIDDEN_START_KEY = RegionInfoDisplay.HIDDEN_START_KEY;<a name="line.184"></a>
+<span class="sourceLineNo">185</span><a name="line.185"></a>
+<span class="sourceLineNo">186</span>  /** HRegionInfo for first meta region */<a name="line.186"></a>
+<span class="sourceLineNo">187</span>  // TODO: How come Meta regions still do not have encoded region names? Fix.<a name="line.187"></a>
+<span class="sourceLineNo">188</span>  public static final HRegionInfo FIRST_META_REGIONINFO =<a name="line.188"></a>
+<span class="sourceLineNo">189</span>      new HRegionInfo(1L, TableName.META_TABLE_NAME);<a name="line.189"></a>
+<span class="sourceLineNo">190</span><a name="line.190"></a>
+<span class="sourceLineNo">191</span>  private void setHashCode() {<a name="line.191"></a>
+<span class="sourceLineNo">192</span>    int result = Arrays.hashCode(this.regionName);<a name="line.192"></a>
+<span class="sourceLineNo">193</span>    result = (int) (result ^ this.regionId);<a name="line.193"></a>
+<span class="sourceLineNo">194</span>    result ^= Arrays.hashCode(this.startKey);<a name="line.194"></a>
+<span class="sourceLineNo">195</span>    result ^= Arrays.hashCode(this.endKey);<a name="line.195"></a>
+<span class="sourceLineNo">196</span>    result ^= Boolean.valueOf(this.offLine).hashCode();<a name="line.196"></a>
+<span class="sourceLineNo">197</span>    result ^= Arrays.hashCode(this.tableName.getName());<a name="line.197"></a>
+<span class="sourceLineNo">198</span>    result ^= this.replicaId;<a name="line.198"></a>
+<span class="sourceLineNo">199</span>    this.hashCode = result;<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>   * Private constructor used constructing HRegionInfo for the<a name="line.203"></a>
+<span class="sourceLineNo">204</span>   * first meta regions<a name="line.204"></a>
+<span class="sourceLineNo">205</span>   */<a name="line.205"></a>
+<span class="sourceLineNo">206</span>  private HRegionInfo(long regionId, TableName tableName) {<a name="line.206"></a>
+<span class="sourceLineNo">207</span>    this(regionId, tableName, DEFAULT_REPLICA_ID);<a name="line.207"></a>
+<span class="sourceLineNo">208</span>  }<a name="line.208"></a>
+<span class="sourceLineNo">209</span><a name="line.209"></a>
+<span class="sourceLineNo">210</span>  public HRegionInfo(long regionId, TableName tableName, int replicaId) {<a name="line.210"></a>
+<span class="sourceLineNo">211</span>    super();<a name="line.211"></a>
+<span class="sourceLineNo">212</span>    this.regionId = regionId;<a name="line.212"></a>
+<span class="sourceLineNo">213</span>    this.tableName = tableName;<a name="line.213"></a>
+<span class="sourceLineNo">214</span>    this.replicaId = replicaId;<a name="line.214"></a>
+<span class="sourceLineNo">215</span>    // Note: First Meta region replicas names are in old format<a name="line.215"></a>
+<span class="sourceLineNo">216</span>    this.regionName = createRegionName(tableName, null, regionId, replicaId, false);<a name="line.216"></a>
+<span class="sourceLineNo">217</span>    setHashCode();<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>  public HRegionInfo(final TableName tableName) {<a name="line.220"></a>
+<span class="sourceLineNo">221</span>    this(tableName, null, null);<a name="line.221"></a>
+<span class="sourceLineNo">222</span>  }<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>   * Construct HRegionInfo with explicit parameters<a name="line.225"></a>
+<span class="sourceLineNo">226</span>   *<a name="line.226"></a>
+<span class="sourceLineNo">227</span>   * @param tableName the table name<a name="line.227"></a>
+<span class="sourceLineNo">228</span>   * @param startKey first key in region<a name="line.228"></a>
+<span class="sourceLineNo">229</span>   * @param endKey end of key range<a name="line.229"></a>
+<span class="sourceLineNo">230</span>   * @throws IllegalArgumentException<a name="line.230"></a>
+<span class="sourceLineNo">231</span>   */<a name="line.231"></a>
+<span class="sourceLineNo">232</span>  public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey)<a name="line.232"></a>
+<span class="sourceLineNo">233</span>  throws IllegalArgumentException {<a name="line.233"></a>
+<span class="sourceLineNo">234</span>    this(tableName, startKey, endKey, false);<a name="line.234"></a>
+<span class="sourceLineNo">235</span>  }<a name="line.235"></a>
+<span class="sourceLineNo">236</span><a name="line.236"></a>
+<span class="sourceLineNo">237</span>  /**<a name="line.237"></a>
+<span class="sourceLineNo">238</span>   * Construct HRegionInfo with explicit parameters<a name="line.238"></a>
+<span class="sourceLineNo">239</span>   *<a name="line.239"></a>
+<span class="sourceLineNo">240</span>   * @param tableName the table descriptor<a name="line.240"></a>
+<span class="sourceLineNo">241</span>   * @param startKey first key in region<a name="line.241"></a>
+<span class="sourceLineNo">242</span>   * @param endKey end of key range<a name="line.242"></a>
+<span class="sourceLineNo">243</span>   * @param split true if this region has split and we have daughter regions<a name="line.243"></a>
+<span class="sourceLineNo">244</span>   * regions that may or may not hold references to this region.<a name="line.244"></a>
+<span class="sourceLineNo">245</span>   * @throws IllegalArgumentException<a name="line.245"></a>
+<span class="sourceLineNo">246</span>   */<a name="line.246"></a>
+<span class="sourceLineNo">247</span>  public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey,<a name="line.247"></a>
+<span class="sourceLineNo">248</span>      final boolean split)<a name="line.248"></a>
+<span class="sourceLineNo">249</span>  throws IllegalArgumentException {<a name="line.249"></a>
+<span class="sourceLineNo">250</span>    this(tableName, startKey, endKey, split, System.currentTimeMillis());<a name="line.250"></a>
+<span class="sourceLineNo">251</span>  }<a name="line.251"></a>
+<span class="sourceLineNo">252</span><a name="line.252"></a>
+<span class="sourceLineNo">253</span>  /**<a name="line.253"></a>
+<span class="sourceLineNo">254</span>   * Construct HRegionInfo with explicit parameters<a name="line.254"></a>
+<span class="sourceLineNo">255</span>   *<a name="line.255"></a>
+<span class="sourceLineNo">256</span>   * @param tableName the table descriptor<a name="line.256"></a>
+<span class="sourceLineNo">257</span>   * @param startKey first key in region<a name="line.257"></a>
+<span class="sourceLineNo">258</span>   * @param endKey end of key range<a name="line.258"></a>
+<span class="sourceLineNo">259</span>   * @param split true if this region has split and we have daughter regions<a name="line.259"></a>
+<span class="sourceLineNo">260</span>   * regions that may or may not hold references to this region.<a name="line.260"></a>
+<span class="sourceLineNo">261</span>   * @param regionid Region id to use.<a name="line.261"></a>
+<span class="sourceLineNo">262</span>   * @throws IllegalArgumentException<a name="line.262"></a>
+<span class="sourceLineNo">263</span>   */<a name="line.263"></a>
+<span class="sourceLineNo">264</span>  public HRegionInfo(final TableName tableName, final byte[] startKey,<a name="line.264"></a>
+<span class="sourceLineNo">265</span>                     final byte[] endKey, final boolean split, final long regionid)<a name="line.265"></a>
+<span class="sourceLineNo">266</span>  throws IllegalArgumentException {<a name="line.266"></a>
+<span class="sourceLineNo">267</span>    this(tableName, startKey, endKey, split, regionid, DEFAULT_REPLICA_ID);<a name="line.267"></a>
+<span class="sourceLineNo">268</span>  }<a name="line.268"></a>
+<span class="sourceLineNo">269</span><a name="line.269"></a>
+<span class="sourceLineNo">270</span>  /**<a name="line.270"></a>
+<span class="sourceLineNo">271</span>   * Construct HRegionInfo with explicit parameters<a name="line.271"></a>
+<span class="sourceLineNo">272</span>   *<a name="line.272"></a>
+<span class="sourceLineNo">273</span>   * @param tableName the table descriptor<a name="line.273"></a>
+<span class="sourceLineNo">274</span>   * @param startKey first key in region<a name="line.274"></a>
+<span class="sourceLineNo">275</span>   * @param endKey end of key range<a name="line.275"></a>
+<span class="sourceLineNo">276</span>   * @param split true if this region has split and we have daughter regions<a name="line.276"></a>
+<span class="sourceLineNo">277</span>   * regions that may or may not hold references to this region.<a name="line.277"></a>
+<span class="sourceLineNo">278</span>   * @param regionid Region id to use.<a name="line.278"></a>
+<span class="sourceLineNo">279</span>   * @param replicaId the replicaId to use<a name="line.279"></a>
+<span class="sourceLineNo">280</span>   * @throws IllegalArgumentException<a name="line.280"></a>
+<span class="sourceLineNo">281</span>   */<a name="line.281"></a>
+<span class="sourceLineNo">282</span>  public HRegionInfo(final TableName tableName, final byte[] startKey,<a name="line.282"></a>
+<span class="sourceLineNo">283</span>                     final byte[] endKey, final boolean split, final long regionid,<a name="line.283"></a>
+<span class="sourceLineNo">284</span>                     final int replicaId)<a name="line.284"></a>
+<span class="sourceLineNo">285</span>    throws IllegalArgumentException {<a name="line.285"></a>
+<span class="sourceLineNo">286</span>    super();<a name="line.286"></a>
+<span class="sourceLineNo">287</span>    if (tableName == null) {<a name="line.287"></a>
+<span class="sourceLineNo">288</span>      throw new IllegalArgumentException("TableName cannot be null");<a name="line.288"></a>
+<span class="sourceLineNo">289</span>    }<a name="line.289"></a>
+<span class="sourceLineNo">290</span>    this.tableName = tableName;<a name="line.290"></a>
+<span class="sourceLineNo">291</span>    this.offLine = false;<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    this.regionId = regionid;<a name="line.292"></a>
+<span class="sourceLineNo">293</span>    this.replicaId = replicaId;<a name="line.293"></a>
+<span class="sourceLineNo">294</span>    if (this.replicaId &gt; MAX_REPLICA_ID) {<a name="line.294"></a>
+<span class="sourceLineNo">295</span>      throw new IllegalArgumentException("ReplicaId cannot be greater than" + MAX_REPLICA_ID);<a name="line.295"></a>
+<span class="sourceLineNo">296</span>    }<a name="line.296"></a>
+<span class="sourceLineNo">297</span><a name="line.297"></a>
+<span class="sourceLineNo">298</span>    this.regionName = createRegionName(this.tableName, startKey, regionId, replicaId, true);<a name="line.298"></a>
+<span class="sourceLineNo">299</span><a name="line.299"></a>
+<span class="sourceLineNo">300</span>    this.split = split;<a name="line.300"></a>
+<span class="sourceLineNo">301</span>    this.endKey = endKey == null? HConstants.EMPTY_END_ROW: endKey.clone();<a name="line.301"></a>
+<span class="sourceLineNo">302</span>    this.startKey = startKey == null?<a name="line.302"></a>
+<span class="sourceLineNo">303</span>      HConstants.EMPTY_START_ROW: startKey.clone();<a name="line.303"></a>
+<span class="sourceLineNo">304</span>    this.tableName = tableName;<a name="line.304"></a>
+<span class="sourceLineNo">305</span>    setHashCode();<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>  /**<a name="line.308"></a>
+<span class="sourceLineNo">309</span>   * Costruct a copy of another HRegionInfo<a name="line.309"></a>
+<span class="sourceLineNo">310</span>   *<a name="line.310"></a>
+<span class="sourceLineNo">311</span>   * @param other<a name="line.311"></a>
+<span class="sourceLineNo">312</span>   */<a name="line.312"></a>
+<span class="sourceLineNo">313</span>  public HRegionInfo(RegionInfo other) {<a name="line.313"></a>
+<span class="sourceLineNo">314</span>    super();<a name="line.314"></a>
+<span class="sourceLineNo">315</span>    this.endKey = other.getEndKey();<a name="line.315"></a>
+<span class="sourceLineNo">316</span>    this.offLine = other.isOffline();<a name="line.316"></a>
+<span class="sourceLineNo">317</span>    this.regionId = other.getRegionId();<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    this.regionName = other.getRegionName();<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    this.split = other.isSplit();<a name="line.319"></a>
+<span class="sourceLineNo">320</span>    this.startKey = other.getStartKey();<a name="line.320"></a>
+<span class="sourceLineNo">321</span>    this.hashCode = other.hashCode();<a name="line.321"></a>
+<span class="sourceLineNo">322</span>    this.encodedName = other.getEncodedName();<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    this.tableName = other.getTable();<a name="line.323"></a>
+<span class="sourceLineNo">324</span>    this.replicaId = other.getReplicaId();<a name="line.324"></a>
+<span class="sourceLineNo">325</span>  }<a name="line.325"></a>
+<span class="sourceLineNo">326</span><a name="line.326"></a>
+<span class="sourceLineNo">327</span>  public HRegionInfo(HRegionInfo other, int replicaId) {<a name="line.327"></a>
+<span class="sourceLineNo">328</span>    this(other);<a name="line.328"></a>
+<span class="sourceLineNo">329</span>    this.replicaId = replicaId;<a name="line.329"></a>
+<span class="sourceLineNo">330</span>    this.setHashCode();<a name="line.330"></a>
+<span class="sourceLineNo">331</span>  }<a name="line.331"></a>
+<span class="sourceLineNo">332</span><a name="line.332"></a>
+<span class="sourceLineNo">333</span>  /**<a name="line.333"></a>
+<span class="sourceLineNo">334</span>   * Make a region name of passed parameters.<a name="line.334"></a>
+<span class="sourceLineNo">335</span>   * @param tableName<a name="line.335"></a>
+<span class="sourceLineNo">336</span>   * @param startKey Can be null<a name="line.336"></a>
+<span class="sourceLineNo">337</span>   * @param regionid Region id (Usually timestamp from when region was created).<a name="line.337"></a>
+<span class="sourceLineNo">338</span>   * @param newFormat should we create the region name in the new format<a name="line.338"></a>
+<span class="sourceLineNo">339</span>   *                  (such that it contains its encoded name?).<a name="line.339"></a>
+<span class="sourceLineNo">340</span>   * @return Region name made of passed tableName, startKey and id<a name="line.340"></a>
+<span class="sourceLineNo">341</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.341"></a>
+<span class="sourceLineNo">342</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], long, boolean)}.<a name="line.342"></a>
+<span class="sourceLineNo">343</span>   */<a name="line.343"></a>
+<span class="sourceLineNo">344</span>  @Deprecated<a name="line.344"></a>
+<span class="sourceLineNo">345</span>  @InterfaceAudience.Private<a name="line.345"></a>
+<span class="sourceLineNo">346</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.346"></a>
+<span class="sourceLineNo">347</span>      final byte [] startKey, final long regionid, boolean newFormat) {<a name="line.347"></a>
+<span class="sourceLineNo">348</span>    return RegionInfo.createRegionName(tableName, startKey, Long.toString(regionid), newFormat);<a name="line.348"></a>
+<span class="sourceLineNo">349</span>  }<a name="line.349"></a>
+<span class="sourceLineNo">350</span><a name="line.350"></a>
+<span class="sourceLineNo">351</span>  /**<a name="line.351"></a>
+<span class="sourceLineNo">352</span>   * Make a region name of passed parameters.<a name="line.352"></a>
+<span class="sourceLineNo">353</span>   * @param tableName<a name="line.353"></a>
+<span class="sourceLineNo">354</span>   * @param startKey Can be null<a name="line.354"></a>
+<span class="sourceLineNo">355</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.355"></a>
+<span class="sourceLineNo">356</span>   * @param newFormat should we create the region name in the new format<a name="line.356"></a>
+<span class="sourceLineNo">357</span>   *                  (such that it contains its encoded name?).<a name="line.357"></a>
+<span class="sourceLineNo">358</span>   * @return Region name made of passed tableName, startKey and id<a name="line.358"></a>
+<span class="sourceLineNo">359</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.359"></a>
+<span class="sourceLineNo">360</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], String, boolean)}.<a name="line.360"></a>
+<span class="sourceLineNo">361</span>   */<a name="line.361"></a>
+<span class="sourceLineNo">362</span>  @Deprecated<a name="line.362"></a>
+<span class="sourceLineNo">363</span>  @InterfaceAudience.Private<a name="line.363"></a>
+<span class="sourceLineNo">364</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.364"></a>
+<span class="sourceLineNo">365</span>      final byte [] startKey, final String id, boolean newFormat) {<a name="line.365"></a>
+<span class="sourceLineNo">366</span>    return RegionInfo.createRegionName(tableName, startKey, Bytes.toBytes(id), newFormat);<a name="line.366"></a>
+<span class="sourceLineNo">367</span>  }<a name="line.367"></a>
+<span class="sourceLineNo">368</span><a name="line.368"></a>
+<span class="sourceLineNo">369</span>  /**<a name="line.369"></a>
+<span class="sourceLineNo">370</span>   * Make a region name of passed parameters.<a name="line.370"></a>
+<span class="sourceLineNo">371</span>   * @param tableName<a name="line.371"></a>
+<span class="sourceLineNo">372</span>   * @param startKey Can be null<a name="line.372"></a>
+<span class="sourceLineNo">373</span>   * @param regionid Region id (Usually timestamp from when region was created).<a name="line.373"></a>
+<span class="sourceLineNo">374</span>   * @param replicaId<a name="line.374"></a>
+<span class="sourceLineNo">375</span>   * @param newFormat should we create the region name in the new format<a name="line.375"></a>
+<span class="sourceLineNo">376</span>   *                  (such that it contains its encoded name?).<a name="line.376"></a>
+<span class="sourceLineNo">377</span>   * @return Region name made of passed tableName, startKey, id and replicaId<a name="line.377"></a>
+<span class="sourceLineNo">378</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.378"></a>
+<span class="sourceLineNo">379</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], long, int, boolean)}.<a name="line.379"></a>
+<span class="sourceLineNo">380</span>   */<a name="line.380"></a>
+<span class="sourceLineNo">381</span>  @Deprecated<a name="line.381"></a>
+<span class="sourceLineNo">382</span>  @InterfaceAudience.Private<a name="line.382"></a>
+<span class="sourceLineNo">383</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.383"></a>
+<span class="sourceLineNo">384</span>      final byte [] startKey, final long regionid, int replicaId, boolean newFormat) {<a name="line.384"></a>
+<span class="sourceLineNo">385</span>    return RegionInfo.createRegionName(tableName, startKey, Bytes.toBytes(Long.toString(regionid)),<a name="line.385"></a>
+<span class="sourceLineNo">386</span>        replicaId, newFormat);<a name="line.386"></a>
+<span class="sourceLineNo">387</span>  }<a name="line.387"></a>
+<span class="sourceLineNo">388</span><a name="line.388"></a>
+<span class="sourceLineNo">389</span>  /**<a name="line.389"></a>
+<span class="sourceLineNo">390</span>   * Make a region name of passed parameters.<a name="line.390"></a>
+<span class="sourceLineNo">391</span>   * @param tableName<a name="line.391"></a>
+<span class="sourceLineNo">392</span>   * @param startKey Can be null<a name="line.392"></a>
+<span class="sourceLineNo">393</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.393"></a>
+<span class="sourceLineNo">394</span>   * @param newFormat should we create the region name in the new format<a name="line.394"></a>
+<span class="sourceLineNo">395</span>   *                  (such that it contains its encoded name?).<a name="line.395"></a>
+<span class="sourceLineNo">396</span>   * @return Region name made of passed tableName, startKey and id<a name="line.396"></a>
+<span class="sourceLineNo">397</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.397"></a>
+<span class="sourceLineNo">398</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], byte[], boolean)}.<a name="line.398"></a>
+<span class="sourceLineNo">399</span>   */<a name="line.399"></a>
+<span class="sourceLineNo">400</span>  @Deprecated<a name="line.400"></a>
+<span class="sourceLineNo">401</span>  @InterfaceAudience.Private<a name="line.401"></a>
+<span class="sourceLineNo">402</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.402"></a>
+<span class="sourceLineNo">403</span>      final byte [] startKey, final byte [] id, boolean newFormat) {<a name="line.403"></a>
+<span class="sourceLineNo">404</span>    return RegionInfo.createRegionName(tableName, startKey, id, DEFAULT_REPLICA_ID, newFormat);<a name="line.404"></a>
+<span class="sourceLineNo">405</span>  }<a name="line.405"></a>
+<span class="sourceLineNo">406</span>  /**<a name="line.406"></a>
+<span class="sourceLineNo">407</span>   * Make a region name of passed parameters.<a name="line.407"></a>
+<span class="sourceLineNo">408</span>   * @param tableName<a name="line.408"></a>
+<span class="sourceLineNo">409</span>   * @param startKey Can be null<a name="line.409"></a>
+<span class="sourceLineNo">410</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.410"></a>
+<span class="sourceLineNo">411</span>   * @param replicaId<a name="line.411"></a>
+<span class="sourceLineNo">412</span>   * @param newFormat should we create the region name in the new format<a name="line.412"></a>
+<span class="sourceLineNo">413</span>   * @return Region name made of passed tableName, startKey, id and replicaId<a name="line.413"></a>
+<span class="sourceLineNo">414</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.414"></a>
+<span class="sourceLineNo">415</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], byte[], int, boolean)}.<a name="line.415"></a>
+<span class="sourceLineNo">416</span>   */<a name="line.416"></a>
+<span class="sourceLineNo">417</span>  @Deprecated<a name="line.417"></a>
+<span class="sourceLineNo">418</span>  @InterfaceAudience.Private<a name="line.418"></a>
+<span class="sourceLineNo">419</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.419"></a>
+<span class="sourceLineNo">420</span>      final byte [] startKey, final byte [] id, final int replicaId, boolean newFormat) {<a name="line.420"></a>
+<span class="sourceLineNo">421</span>    return RegionInfo.createRegionName(tableName, startKey, id, replicaId, newFormat);<a name="line.421"></a>
+<span class="sourceLineNo">422</span>  }<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>   * Gets the table name from the specified region name.<a name="line.425"></a>
+<span class="sourceLineNo">426</span>   * @param regionName to extract the table name from<a name="line.426"></a>
+<span class="sourceLineNo">427</span>   * @return Table name<a name="line.427"></a>
+<span class="sourceLineNo">428</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.428"></a>
+<span class="sourceLineNo">429</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getTable(byte[])}.<a name="line.429"></a>
+<span class="sourceLineNo">430</span>   */<a name="line.430"></a>
+<span class="sourceLineNo">431</span>  @Deprecated<a name="line.431"></a>
+<span class="sourceLineNo">432</span>  public static TableName getTable(final byte [] regionName) {<a name="line.432"></a>
+<span class="sourceLineNo">433</span>    return RegionInfo.getTable(regionName);<a name="line.433"></a>
+<span class="sourceLineNo">434</span>  }<a name="line.434"></a>
+<span class="sourceLineNo">435</span><a name="line.435"></a>
+<span class="sourceLineNo">436</span>  /**<a name="line.436"></a>
+<span class="sourceLineNo">437</span>   * Gets the start key from the specified region name.<a name="line.437"></a>
+<span class="sourceLineNo">438</span>   * @param regionName<a name="line.438"></a>
+<span class="sourceLineNo">439</span>   * @return Start key.<a name="line.439"></a>
+<span class="sourceLineNo">440</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.440"></a>
+<span class="sourceLineNo">441</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getStartKey(byte[])}.<a name="line.441"></a>
+<span class="sourceLineNo">442</span>   */<a name="line.442"></a>
+<span class="sourceLineNo">443</span>  @Deprecated<a name="line.443"></a>
+<span class="sourceLineNo">444</span>  public static byte[] getStartKey(final byte[] regionName) throws IOException {<a name="line.444"></a>
+<span class="sourceLineNo">445</span>    return RegionInfo.getStartKey(regionName);<a name="line.445"></a>
+<span class="sourceLineNo">446</span>  }<a name="line.446"></a>
+<span class="sourceLineNo">447</span><a name="line.447"></a>
+<span class="sourceLineNo">448</span>  /**<a name="line.448"></a>
+<span class="sourceLineNo">449</span>   * Separate elements of a regionName.<a name="line.449"></a>
+<span class="sourceLineNo">450</span>   * @param regionName<a name="line.450"></a>
+<span class="sourceLineNo">451</span>   * @return Array of byte[] containing tableName, startKey and id<a name="line.451"></a>
+<span class="sourceLineNo">452</span>   * @throws IOException<a name="line.452"></a>
+<span class="sourceLineNo">453</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.453"></a>
+<span class="sourceLineNo">454</span>   *             Use {@link RegionInfo#parseRegionName(byte[])}.<a name="line.454"></a>
+<span class="sourceLineNo">455</span>   */<a name="line.455"></a>
+<span class="sourceLineNo">456</span>  @Deprecated<a name="line.456"></a>
+<span class="sourceLineNo">457</span>  @InterfaceAudience.Private<a name="line.457"></a>
+<span class="sourceLineNo">458</span>  public static byte [][] parseRegionName(final byte [] regionName)<a name="line.458"></a>
+<span class="sourceLineNo">459</span>  throws IOException {<a name="line.459"></a>
+<span class="sourceLineNo">460</span>    return RegionInfo.parseRegionName(regionName);<a name="line.460"></a>
+<span class="sourceLineNo">461</span>  }<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>   *<a name="line.464"></a>
+<span class="sourceLineNo">465</span>   * @param regionName<a name="line.465"></a>
+<span class="sourceLineNo">466</span>   * @return if region name is encoded.<a name="line.466"></a>
+<span class="sourceLineNo">467</span>   * @throws IOException<a name="line.467"></a>
+<span class="sourceLineNo">468</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.468"></a>
+<span class="sourceLineNo">469</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#isEncodedRegionName(byte[])}.<a name="line.469"></a>
+<span class="sourceLineNo">470</span>   */<a name="line.470"></a>
+<span class="sourceLineNo">471</span>  @Deprecated<a name="line.471"></a>
+<span class="sourceLineNo">472</span>  public static boolean isEncodedRegionName(byte[] regionName) throws IOException {<a name="line.472"></a>
+<span class="sourceLineNo">473</span>    return RegionInfo.isEncodedRegionName(regionName);<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>  /** @return the regionId */<a name="line.476"></a>
+<span class="sourceLineNo">477</span>  @Override<a name="line.477"></a>
+<span class="sourceLineNo">478</span>  public long getRegionId(){<a name="line.478"></a>
+<span class="sourceLineNo">479</span>    return regionId;<a name="line.479"></a>
+<span class="sourceLineNo">480</span>  }<a name="line.480"></a>
+<span class="sourceLineNo">481</span><a name="line.481"></a>
+<span class="sourceLineNo">482</span>  /**<a name="line.482"></a>
+<span class="sourceLineNo">483</span>   * @return the regionName as an array of bytes.<a name="line.483"></a>
+<span class="sourceLineNo">484</span>   * @see #getRegionNameAsString()<a name="line.484"></a>
+<span class="sourceLineNo">485</span>   */<a name="line.485"></a>
+<span class="sourceLineNo">486</span>  @Override<a name="line.486"></a>
+<span class="sourceLineNo">487</span>  public byte [] getRegionName(){<a name="line.487"></a>
+<span class="sourceLineNo">488</span>    return regionName;<a name="line.488"></a>
+<span class="sourceLineNo">489</span>  }<a name="line.489"></a>
+<span class="sourceLineNo">490</span><a name="line.490"></a>
+<span class="sourceLineNo">491</span>  /**<a name="line.491"></a>
+<span class="sourceLineNo">492</span>   * @return Region name as a String for use in logging, etc.<a name="line.492"></a>
+<span class="sourceLineNo">493</span>   */<a name="line.493"></a>
+<span class="sourceLineNo">494</span>  @Override<a name="line.494"></a>
+<span class="sourceLineNo">495</span>  public String getRegionNameAsString() {<a name="line.495"></a>
+<span class="sourceLineNo">496</span>    if (RegionInfo.hasEncodedName(this.regionName)) {<a name="line.496"></a>
+<span class="sourceLineNo">497</span>      // new format region names already have their encoded name.<a name="line.497"></a>
+<span class="sourceLineNo">498</span>      return Bytes.toStringBinary(this.regionName);<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>    // old format. regionNameStr doesn't have the region name.<a name="line.501"></a>
+<span class="sourceLineNo">502</span>    //<a name="line.502"></a>
+<span class="sourceLineNo">503</span>    //<a name="line.503"></a>
+<span class="sourceLineNo">504</span>    return Bytes.toStringBinary(this.regionName) + "." + this.getEncodedName();<a name="line.504"></a>
+<span class="sourceLineNo">505</span>  }<a name="line.505"></a>
+<span class="sourceLineNo">506</span><a name="line.506"></a>
+<span class="sourceLineNo">507</span>  /**<a name="line.507"></a>
+<span class="sourceLineNo">508</span>   * @return the encoded region name<a name="line.508"></a>
+<span class="sourceLineNo">509</span>   */<a name="line.509"></a>
+<span class="sourceLineNo">510</span>  @Override<a name="line.510"></a>
+<span class="sourceLineNo">511</span>  public synchronized String getEncodedName() {<a name="line.511"></a>
+<span class="sourceLineNo">512</span>    if (this.encodedName == null) {<a name="line.512"></a>
+<span class="sourceLineNo">513</span>      this.encodedName = RegionInfo.encodeRegionName(this.regionName);<a name="line.513"></a>
 <span class="sourceLineNo">514</span>    }<a name="line.514"></a>
-<span class="sourceLineNo">515</span>    return this.encodedNameAsBytes;<a name="line.515"></a>
+<span class="sourceLineNo">515</span>    return this.encodedName;<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>  /** @return the startKey */<a name="line.518"></a>
-<span class="sourceLineNo">519</span>  public byte [] getStartKey(){<a name="line.519"></a>
-<span class="sourceLineNo">520</span>    return startKey;<a name="line.520"></a>
-<span class="sourceLineNo">521</span>  }<a name="line.521"></a>
-<span class="sourceLineNo">522</span><a name="line.522"></a>
-<span class="sourceLineNo">523</span>  /** @return the endKey */<a name="line.523"></a>
-<span class="sourceLineNo">524</span>  public byte [] getEndKey(){<a name="line.524"></a>
-<span class="sourceLineNo">525</span>    return endKey;<a name="line.525"></a>
-<span class="sourceLineNo">526</span>  }<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>
-<span class="sourceLineNo">529</span>   * Get current table name of the region<a name="line.529"></a>
-<span class="sourceLineNo">530</span>   * @return TableName<a name="line.530"></a>
-<span class="sourceLineNo">531</span>   */<a name="line.531"></a>
-<span class="sourceLineNo">532</span>  public TableName getTable() {<a name="line.532"></a>
-<span class="sourceLineNo">533</span>    // This method name should be getTableName but there was already a method getTableName<a name="line.533"></a>
-<span class="sourceLineNo">534</span>    // that returned a byte array.  It is unfortunate given everywhere else, getTableName returns<a name="line.534"></a>
-<span class="sourceLineNo">535</span>    // a TableName instance.<a name="line.535"></a>
-<span class="sourceLineNo">536</span>    if (tableName == null || tableName.getName().length == 0) {<a name="line.536"></a>
-<span class="sourceLineNo">537</span>      tableName = getTable(getRegionName());<a name="line.537"></a>
-<span class="sourceLineNo">538</span>    }<a name="line.538"></a>
-<span class="sourceLineNo">539</span>    return this.tableName;<a name="line.539"></a>
+<span class="sourceLineNo">518</span>  @Override<a name="line.518"></a>
+<span class="sourceLineNo">519</span>  public synchronized byte [] getEncodedNameAsBytes() {<a name="line.519"></a>
+<span class="sourceLineNo">520</span>    if (this.encodedNameAsBytes == null) {<a name="line.520"></a>
+<span class="sourceLineNo">521</span>      this.encodedNameAsBytes = Bytes.toBytes(getEncodedName());<a name="line.521"></a>
+<span class="sourceLineNo">522</span>    }<a name="line.522"></a>
+<span class="sourceLineNo">523</span>    return this.encodedNameAsBytes;<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>  /**<a name="line.526"></a>
+<span class="sourceLineNo">527</span>   * @return the startKey<a name="line.527"></a>
+<span class="sourceLineNo">528</span>   */<a name="line.528"></a>
+<span class="sourceLineNo">529</span>  @Override<a name="line.529"></a>
+<span class="sourceLineNo">530</span>  public byte [] getStartKey(){<a name="line.530"></a>
+<span class="sourceLineNo">531</span>    return startKey;<a name="line.531"></a>
+<span class="sourceLineNo">532</span>  }<a name="line.532"></a>
+<span class="sourceLineNo">533</span><a name="line.533"></a>
+<span class="sourceLineNo">534</span>  /**<a name="line.534"></a>
+<span class="sourceLineNo">535</span>   * @return the endKey<a name="line.535"></a>
+<span class="sourceLineNo">536</span>   */<a name="line.536"></a>
+<span class="sourceLineNo">537</span>  @Override<a name="line.537"></a>
+<span class="sourceLineNo">538</span>  public byte [] getEndKey(){<a name="line.538"></a>
+<span class="sourceLineNo">539</span>    return endKey;<a name="line.539"></a>
 <span class="sourceLineNo">540</span>  }<a name="line.540"></a>
 <span class="sourceLineNo">541</span><a name="line.541"></a>
 <span class="sourceLineNo">542</span>  /**<a name="line.542"></a>
-<span class="sourceLineNo">543</span>   * Returns true if the given inclusive range of rows is fully contained<a name="line.543"></a>
-<span class="sourceLineNo">544</span>   * by this region. For example, if the region is foo,a,g and this is<a name="line.544"></a>
-<span class="sourceLineNo">545</span>   * passed ["b","c"] or ["a","c"] it will return true, but if this is passed<a name="line.545"></a>
-<span class="sourceLineNo">546</span>   * ["b","z"] it will return false.<a name="line.546"></a>
-<span class="sourceLineNo">547</span>   * @throws IllegalArgumentException if the range passed is invalid (ie. end &amp;lt; start)<a name="line.547"></a>
-<span class="sourceLineNo">548</span>   */<a name="line.548"></a>
-<span class="sourceLineNo">549</span>  public boolean containsRange(byte[] rangeStartKey, byte[] rangeEndKey) {<a name="line.549"></a>
-<span class="sourceLineNo">550</span>    if (Bytes.compareTo(rangeStartKey, rangeEndKey) &gt; 0) {<a name="line.550"></a>
-<span class="sourceLineNo">551</span>      throw new IllegalArgumentException(<a name="line.551"></a>
-<span class="sourceLineNo">552</span>      "Invalid range: " + Bytes.toStringBinary(rangeStartKey) +<a name="line.552"></a>
-<span class="sourceLineNo">553</span>      " &gt; " + Bytes.toStringBinary(rangeEndKey));<a name="line.553"></a>
-<span class="sourceLineNo">554</span>    }<a name="line.554"></a>
-<span class="sourceLineNo">555</span><a name="line.555"></a>
-<span class="sourceLineNo">556</span>    boolean firstKeyInRange = Bytes.compareTo(rangeStartKey, startKey) &gt;= 0;<a name="line.556"></a>
-<span class="sourceLineNo">557</span>    boolean lastKeyInRange =<a name="line.557"></a>
-<span class="sourceLineNo">558</span>      Bytes.compareTo(rangeEndKey, endKey) &lt; 0 ||<a name="line.558"></a>
-<span class="sourceLineNo">559</span>      Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY);<a name="line.559"></a>
-<span class="sourceLineNo">560</span>    return firstKeyInRange &amp;&amp; lastKeyInRange;<a name="line.560"></a>
-<span class="sourceLineNo">561</span>  }<a name="line.561"></a>
-<span class="sourceLineNo">562</span><a name="line.562"></a>
-<span class="sourceLineNo">563</span>  /**<a name="line.563"></a>
-<span class="sourceLineNo">564</span>   * Return true if the given row falls in this region.<a name="line.564"></a>
-<span class="sourceLineNo">565</span>   */<a name="line.565"></a>
-<span class="sourceLineNo">566</span>  public boolean containsRow(byte[] row) {<a name="line.566"></a>
-<span class="sourceLineNo">567</span>    return Bytes.compareTo(row, startKey) &gt;= 0 &amp;&amp;<a name="line.567"></a>
-<span class="sourceLineNo">568</span>      (Bytes.compareTo(row, endKey) &lt; 0 ||<a name="line.568"></a>
-<span class="sourceLineNo">569</span>       Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY));<a name="line.569"></a>
-<span class="sourceLineNo">570</span>  }<a name="line.570"></a>
+<span class="sourceLineNo">543</span>   * Get current table name of the region<a name="line.543"></a>
+<span class="sourceLineNo">544</span>   * @return TableName<a name="line.544"></a>
+<span class="sourceLineNo">545</span>   */<a name="line.545"></a>
+<span class="sourceLineNo">546</span>  @Override<a name="line.546"></a>
+<span class="sourceLineNo">547</span>  public TableName getTable() {<a name="line.547"></a>
+<span class="sourceLineNo">548</span>    // This method name should be getTableName but there was already a method getTableName<a name="line.548"></a>
+<span class="sourceLineNo">549</span>    // that returned a byte array.  It is unfortunate given everywhere else, getTableName returns<a name="line.549"></a>
+<span class="sourceLineNo">550</span>    // a TableName instance.<a name="line.550"></a>
+<span class="sourceLineNo">551</span>    if (tableName == null || tableName.getName().length == 0) {<a name="line.551"></a>
+<span class="sourceLineNo">552</span>      tableName = getTable(getRegionName());<a name="line.552"></a>
+<span class="sourceLineNo">553</span>    }<a name="line.553"></a>
+<span class="sourceLineNo">554</span>    return this.tableName;<a name="line.554"></a>
+<span class="sourceLineNo">555</span>  }<a name="line.555"></a>
+<span class="sourceLineNo">556</span><a name="line.556"></a>
+<span class="sourceLineNo">557</span>  /**<a name="line.557"></a>
+<span class="sourceLineNo">558</span>   * Returns true if the given inclusive range of rows is fully contained<a name="line.558"></a>
+<span class="sourceLineNo">559</span>   * by this region. For example, if the region is foo,a,g and this is<a name="line.559"></a>
+<span class="sourceLineNo">560</span>   * passed ["b","c"] or ["a","c"] it will return true, but if this is passed<a name="line.560"></a>
+<span class="sourceLineNo">561</span>   * ["b","z"] it will return false.<a name="line.561"></a>
+<span class="sourceLineNo">562</span>   * @throws IllegalArgumentException if the range passed is invalid (ie. end &amp;lt; start)<a name="line.562"></a>
+<span class="sourceLineNo">563</span>   */<a name="line.563"></a>
+<span class="sourceLineNo">564</span>  @Override<a name="line.564"></a>
+<span class="sourceLineNo">565</span>  public boolean containsRange(byte[] rangeStartKey, byte[] rangeEndKey) {<a name="line.565"></a>
+<span class="sourceLineNo">566</span>    if (Bytes.compareTo(rangeStartKey, rangeEndKey) &gt; 0) {<a name="line.566"></a>
+<span class="sourceLineNo">567</span>      throw new IllegalArgumentException(<a name="line.567"></a>
+<span class="sourceLineNo">568</span>      "Invalid range: " + Bytes.toStringBinary(rangeStartKey) +<a name="line.568"></a>
+<span class="sourceLineNo">569</span>      " &gt; " + Bytes.toStringBinary(rangeEndKey));<a name="line.569"></a>
+<span class="sourceLineNo">570</span>    }<a name="line.570"></a>
 <span class="sourceLineNo">571</span><a name="line.571"></a>
-<span class="sourceLineNo">572</span>  /**<a name="line.572"></a>
-<span class="sourceLineNo">573</span>   * @return true if this region is from hbase:meta<a name="line.573"></a>
-<span class="sourceLineNo">574</span>   */<a name="line.574"></a>
-<span class="sourceLineNo">575</span>  public boolean isMetaTable() {<a name="line.575"></a>
-<span class="sourceLineNo">576</span>    return isMetaRegion();<a name="line.576"></a>
+<span class="sourceLineNo">572</span>    boolean firstKeyInRange = Bytes.compareTo(rangeStartKey, startKey) &gt;= 0;<a name="line.572"></a>
+<span class="sourceLineNo">573</span>    boolean lastKeyInRange =<a name="line.573"></a>
+<span class="sourceLineNo">574</span>      Bytes.compareTo(rangeEndKey, endKey) &lt; 0 ||<a name="line.574"></a>
+<span class="sourceLineNo">575</span>      Bytes.equals(endKey, HConstants.EMPTY_BYTE_ARRAY);<a name="line.575"></a>
+<span class="sourceLineNo">576</span>    return firstKeyInRange &amp;&amp; lastKeyInRange;<a name="line.576"></a>
 <span class="sourceLineNo">577</span>  }<a name="line.577"></a>
 <span class="sourceLineNo">578</span><a name="line.578"></a>
-<span class="sourceLineNo">579</span>  /** @return true if this region is a meta region */<a name="line.579"></a>

<TRUNCATED>

Mime
View raw message