hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [41/51] [partial] hbase-site git commit: Published site at .
Date Fri, 15 Sep 2017 15:14:49 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/82166ec2/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 67cb1a3..05331ef 100644
--- a/apidocs/src-html/org/apache/hadoop/hbase/HRegionInfo.html
+++ b/apidocs/src-html/org/apache/hadoop/hbase/HRegionInfo.html
@@ -36,340 +36,340 @@
 <span class="sourceLineNo">028</span>import org.apache.commons.logging.Log;<a name="line.28"></a>
 <span class="sourceLineNo">029</span>import org.apache.commons.logging.LogFactory;<a name="line.29"></a>
 <span class="sourceLineNo">030</span>import org.apache.hadoop.conf.Configuration;<a name="line.30"></a>
-<span class="sourceLineNo">031</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.31"></a>
-<span class="sourceLineNo">032</span>import org.apache.hadoop.hbase.client.RegionReplicaUtil;<a name="line.32"></a>
-<span class="sourceLineNo">033</span>import org.apache.hadoop.hbase.KeyValue.KVComparator;<a name="line.33"></a>
-<span class="sourceLineNo">034</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.34"></a>
-<span class="sourceLineNo">035</span>import org.apache.hadoop.hbase.master.RegionState;<a name="line.35"></a>
-<span class="sourceLineNo">036</span>import org.apache.hadoop.hbase.shaded.com.google.protobuf.UnsafeByteOperations;<a name="line.36"></a>
+<span class="sourceLineNo">031</span>import org.apache.hadoop.hbase.client.RegionInfoBuilder;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.32"></a>
+<span class="sourceLineNo">033</span>import org.apache.hadoop.hbase.client.RegionInfo;<a name="line.33"></a>
+<span class="sourceLineNo">034</span>import org.apache.hadoop.hbase.KeyValue.KVComparator;<a name="line.34"></a>
+<span class="sourceLineNo">035</span>import org.apache.hadoop.hbase.exceptions.DeserializationException;<a name="line.35"></a>
+<span class="sourceLineNo">036</span>import org.apache.hadoop.hbase.master.RegionState;<a name="line.36"></a>
 <span class="sourceLineNo">037</span>import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;<a name="line.37"></a>
 <span class="sourceLineNo">038</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;<a name="line.38"></a>
-<span class="sourceLineNo">039</span>import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionInfo;<a name="line.39"></a>
-<span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.util.ByteArrayHashKey;<a name="line.40"></a>
-<span class="sourceLineNo">041</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.41"></a>
-<span class="sourceLineNo">042</span>import org.apache.hadoop.hbase.util.HashKey;<a name="line.42"></a>
-<span class="sourceLineNo">043</span>import org.apache.hadoop.hbase.util.JenkinsHash;<a name="line.43"></a>
-<span class="sourceLineNo">044</span>import org.apache.hadoop.hbase.util.MD5Hash;<a name="line.44"></a>
-<span class="sourceLineNo">045</span>import org.apache.hadoop.io.DataInputBuffer;<a name="line.45"></a>
-<span class="sourceLineNo">046</span>import org.apache.hadoop.util.StringUtils;<a name="line.46"></a>
-<span class="sourceLineNo">047</span><a name="line.47"></a>
-<span class="sourceLineNo">048</span>/**<a name="line.48"></a>
-<span class="sourceLineNo">049</span> * Information about a region. A region is a range of keys in the whole keyspace of a table, an<a name="line.49"></a>
-<span class="sourceLineNo">050</span> * identifier (a timestamp) for differentiating between subset ranges (after region split)<a name="line.50"></a>
-<span class="sourceLineNo">051</span> * and a replicaId for differentiating the instance for the same range and some status information<a name="line.51"></a>
-<span class="sourceLineNo">052</span> * about the region.<a name="line.52"></a>
-<span class="sourceLineNo">053</span> *<a name="line.53"></a>
-<span class="sourceLineNo">054</span> * The region has a unique name which consists of the following fields:<a name="line.54"></a>
-<span class="sourceLineNo">055</span> * &lt;ul&gt;<a name="line.55"></a>
-<span class="sourceLineNo">056</span> * &lt;li&gt; tableName   : The name of the table &lt;/li&gt;<a name="line.56"></a>
-<span class="sourceLineNo">057</span> * &lt;li&gt; startKey    : The startKey for the region. &lt;/li&gt;<a name="line.57"></a>
-<span class="sourceLineNo">058</span> * &lt;li&gt; regionId    : A timestamp when the region is created. &lt;/li&gt;<a name="line.58"></a>
-<span class="sourceLineNo">059</span> * &lt;li&gt; replicaId   : An id starting from 0 to differentiate replicas of the same region range<a name="line.59"></a>
-<span class="sourceLineNo">060</span> * but hosted in separated servers. The same region range can be hosted in multiple locations.&lt;/li&gt;<a name="line.60"></a>
-<span class="sourceLineNo">061</span> * &lt;li&gt; encodedName : An MD5 encoded string for the region name.&lt;/li&gt;<a name="line.61"></a>
-<span class="sourceLineNo">062</span> * &lt;/ul&gt;<a name="line.62"></a>
-<span class="sourceLineNo">063</span> *<a name="line.63"></a>
-<span class="sourceLineNo">064</span> * &lt;br&gt; Other than the fields in the region name, region info contains:<a name="line.64"></a>
-<span class="sourceLineNo">065</span> * &lt;ul&gt;<a name="line.65"></a>
-<span class="sourceLineNo">066</span> * &lt;li&gt; endKey      : the endKey for the region (exclusive) &lt;/li&gt;<a name="line.66"></a>
-<span class="sourceLineNo">067</span> * &lt;li&gt; split       : Whether the region is split &lt;/li&gt;<a name="line.67"></a>
-<span class="sourceLineNo">068</span> * &lt;li&gt; offline     : Whether the region is offline &lt;/li&gt;<a name="line.68"></a>
-<span class="sourceLineNo">069</span> * &lt;/ul&gt;<a name="line.69"></a>
-<span class="sourceLineNo">070</span> *<a name="line.70"></a>
-<span class="sourceLineNo">071</span> * In 0.98 or before, a list of table's regions would fully cover the total keyspace, and at any<a name="line.71"></a>
-<span class="sourceLineNo">072</span> * point in time, a row key always belongs to a single region, which is hosted in a single server.<a name="line.72"></a>
-<span class="sourceLineNo">073</span> * In 0.99+, a region can have multiple instances (called replicas), and thus a range (or row) can<a name="line.73"></a>
-<span class="sourceLineNo">074</span> * correspond to multiple HRegionInfo's. These HRI's share the same fields however except the<a name="line.74"></a>
-<span class="sourceLineNo">075</span> * replicaId field. If the replicaId is not set, it defaults to 0, which is compatible with the<a name="line.75"></a>
-<span class="sourceLineNo">076</span> * previous behavior of a range corresponding to 1 region.<a name="line.76"></a>
-<span class="sourceLineNo">077</span> */<a name="line.77"></a>
-<span class="sourceLineNo">078</span>@InterfaceAudience.Public<a name="line.78"></a>
-<span class="sourceLineNo">079</span>public class HRegionInfo implements Comparable&lt;HRegionInfo&gt; {<a name="line.79"></a>
-<span class="sourceLineNo">080</span><a name="line.80"></a>
-<span class="sourceLineNo">081</span>  private static final Log LOG = LogFactory.getLog(HRegionInfo.class);<a name="line.81"></a>
-<span class="sourceLineNo">082</span><a name="line.82"></a>
-<span class="sourceLineNo">083</span>  /**<a name="line.83"></a>
-<span class="sourceLineNo">084</span>   * The new format for a region name contains its encodedName at the end.<a name="line.84"></a>
-<span class="sourceLineNo">085</span>   * The encoded name also serves as the directory name for the region<a name="line.85"></a>
-<span class="sourceLineNo">086</span>   * in the filesystem.<a name="line.86"></a>
-<span class="sourceLineNo">087</span>   *<a name="line.87"></a>
-<span class="sourceLineNo">088</span>   * New region name format:<a name="line.88"></a>
-<span class="sourceLineNo">089</span>   *    &amp;lt;tablename&gt;,,&amp;lt;startkey&gt;,&amp;lt;regionIdTimestamp&gt;.&amp;lt;encodedName&gt;.<a name="line.89"></a>
-<span class="sourceLineNo">090</span>   * where,<a name="line.90"></a>
-<span class="sourceLineNo">091</span>   *    &amp;lt;encodedName&gt; is a hex version of the MD5 hash of<a name="line.91"></a>
+<span class="sourceLineNo">039</span>import org.apache.hadoop.hbase.util.Bytes;<a name="line.39"></a>
+<span class="sourceLineNo">040</span>import org.apache.hadoop.hbase.client.RegionInfoDisplay;<a name="line.40"></a>
+<span class="sourceLineNo">041</span>import org.apache.hadoop.io.DataInputBuffer;<a name="line.41"></a>
+<span class="sourceLineNo">042</span><a name="line.42"></a>
+<span class="sourceLineNo">043</span>/**<a name="line.43"></a>
+<span class="sourceLineNo">044</span> * Information about a region. A region is a range of keys in the whole keyspace of a table, an<a name="line.44"></a>
+<span class="sourceLineNo">045</span> * identifier (a timestamp) for differentiating between subset ranges (after region split)<a name="line.45"></a>
+<span class="sourceLineNo">046</span> * and a replicaId for differentiating the instance for the same range and some status information<a name="line.46"></a>
+<span class="sourceLineNo">047</span> * about the region.<a name="line.47"></a>
+<span class="sourceLineNo">048</span> *<a name="line.48"></a>
+<span class="sourceLineNo">049</span> * The region has a unique name which consists of the following fields:<a name="line.49"></a>
+<span class="sourceLineNo">050</span> * &lt;ul&gt;<a name="line.50"></a>
+<span class="sourceLineNo">051</span> * &lt;li&gt; tableName   : The name of the table &lt;/li&gt;<a name="line.51"></a>
+<span class="sourceLineNo">052</span> * &lt;li&gt; startKey    : The startKey for the region. &lt;/li&gt;<a name="line.52"></a>
+<span class="sourceLineNo">053</span> * &lt;li&gt; regionId    : A timestamp when the region is created. &lt;/li&gt;<a name="line.53"></a>
+<span class="sourceLineNo">054</span> * &lt;li&gt; replicaId   : An id starting from 0 to differentiate replicas of the same region range<a name="line.54"></a>
+<span class="sourceLineNo">055</span> * but hosted in separated servers. The same region range can be hosted in multiple locations.&lt;/li&gt;<a name="line.55"></a>
+<span class="sourceLineNo">056</span> * &lt;li&gt; encodedName : An MD5 encoded string for the region name.&lt;/li&gt;<a name="line.56"></a>
+<span class="sourceLineNo">057</span> * &lt;/ul&gt;<a name="line.57"></a>
+<span class="sourceLineNo">058</span> *<a name="line.58"></a>
+<span class="sourceLineNo">059</span> * &lt;br&gt; Other than the fields in the region name, region info contains:<a name="line.59"></a>
+<span class="sourceLineNo">060</span> * &lt;ul&gt;<a name="line.60"></a>
+<span class="sourceLineNo">061</span> * &lt;li&gt; endKey      : the endKey for the region (exclusive) &lt;/li&gt;<a name="line.61"></a>
+<span class="sourceLineNo">062</span> * &lt;li&gt; split       : Whether the region is split &lt;/li&gt;<a name="line.62"></a>
+<span class="sourceLineNo">063</span> * &lt;li&gt; offline     : Whether the region is offline &lt;/li&gt;<a name="line.63"></a>
+<span class="sourceLineNo">064</span> * &lt;/ul&gt;<a name="line.64"></a>
+<span class="sourceLineNo">065</span> *<a name="line.65"></a>
+<span class="sourceLineNo">066</span> * In 0.98 or before, a list of table's regions would fully cover the total keyspace, and at any<a name="line.66"></a>
+<span class="sourceLineNo">067</span> * point in time, a row key always belongs to a single region, which is hosted in a single server.<a name="line.67"></a>
+<span class="sourceLineNo">068</span> * In 0.99+, a region can have multiple instances (called replicas), and thus a range (or row) can<a name="line.68"></a>
+<span class="sourceLineNo">069</span> * correspond to multiple HRegionInfo's. These HRI's share the same fields however except the<a name="line.69"></a>
+<span class="sourceLineNo">070</span> * replicaId field. If the replicaId is not set, it defaults to 0, which is compatible with the<a name="line.70"></a>
+<span class="sourceLineNo">071</span> * previous behavior of a range corresponding to 1 region.<a name="line.71"></a>
+<span class="sourceLineNo">072</span> * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0.<a name="line.72"></a>
+<span class="sourceLineNo">073</span> *             use {@link RegionInfoBuilder} to build {@link RegionInfo}.<a name="line.73"></a>
+<span class="sourceLineNo">074</span> */<a name="line.74"></a>
+<span class="sourceLineNo">075</span>@Deprecated<a name="line.75"></a>
+<span class="sourceLineNo">076</span>@InterfaceAudience.Public<a name="line.76"></a>
+<span class="sourceLineNo">077</span>public class HRegionInfo implements RegionInfo, Comparable&lt;HRegionInfo&gt; {<a name="line.77"></a>
+<span class="sourceLineNo">078</span>  private static final Log LOG = LogFactory.getLog(HRegionInfo.class);<a name="line.78"></a>
+<span class="sourceLineNo">079</span><a name="line.79"></a>
+<span class="sourceLineNo">080</span>  /**<a name="line.80"></a>
+<span class="sourceLineNo">081</span>   * The new format for a region name contains its encodedName at the end.<a name="line.81"></a>
+<span class="sourceLineNo">082</span>   * The encoded name also serves as the directory name for the region<a name="line.82"></a>
+<span class="sourceLineNo">083</span>   * in the filesystem.<a name="line.83"></a>
+<span class="sourceLineNo">084</span>   *<a name="line.84"></a>
+<span class="sourceLineNo">085</span>   * New region name format:<a name="line.85"></a>
+<span class="sourceLineNo">086</span>   *    &amp;lt;tablename&gt;,,&amp;lt;startkey&gt;,&amp;lt;regionIdTimestamp&gt;.&amp;lt;encodedName&gt;.<a name="line.86"></a>
+<span class="sourceLineNo">087</span>   * where,<a name="line.87"></a>
+<span class="sourceLineNo">088</span>   *    &amp;lt;encodedName&gt; is a hex version of the MD5 hash of<a name="line.88"></a>
+<span class="sourceLineNo">089</span>   *    &amp;lt;tablename&gt;,&amp;lt;startkey&gt;,&amp;lt;regionIdTimestamp&gt;<a name="line.89"></a>
+<span class="sourceLineNo">090</span>   *<a name="line.90"></a>
+<span class="sourceLineNo">091</span>   * The old region name format:<a name="line.91"></a>
 <span class="sourceLineNo">092</span>   *    &amp;lt;tablename&gt;,&amp;lt;startkey&gt;,&amp;lt;regionIdTimestamp&gt;<a name="line.92"></a>
-<span class="sourceLineNo">093</span>   *<a name="line.93"></a>
-<span class="sourceLineNo">094</span>   * The old region name format:<a name="line.94"></a>
-<span class="sourceLineNo">095</span>   *    &amp;lt;tablename&gt;,&amp;lt;startkey&gt;,&amp;lt;regionIdTimestamp&gt;<a name="line.95"></a>
-<span class="sourceLineNo">096</span>   * For region names in the old format, the encoded name is a 32-bit<a name="line.96"></a>
-<span class="sourceLineNo">097</span>   * JenkinsHash integer value (in its decimal notation, string form).<a name="line.97"></a>
-<span class="sourceLineNo">098</span>   *&lt;p&gt;<a name="line.98"></a>
-<span class="sourceLineNo">099</span>   * **NOTE**<a name="line.99"></a>
-<span class="sourceLineNo">100</span>   *<a name="line.100"></a>
-<span class="sourceLineNo">101</span>   * The first hbase:meta region, and regions created by an older<a name="line.101"></a>
-<span class="sourceLineNo">102</span>   * version of HBase (0.20 or prior) will continue to use the<a name="line.102"></a>
-<span class="sourceLineNo">103</span>   * old region name format.<a name="line.103"></a>
-<span class="sourceLineNo">104</span>   */<a name="line.104"></a>
+<span class="sourceLineNo">093</span>   * For region names in the old format, the encoded name is a 32-bit<a name="line.93"></a>
+<span class="sourceLineNo">094</span>   * JenkinsHash integer value (in its decimal notation, string form).<a name="line.94"></a>
+<span class="sourceLineNo">095</span>   *&lt;p&gt;<a name="line.95"></a>
+<span class="sourceLineNo">096</span>   * **NOTE**<a name="line.96"></a>
+<span class="sourceLineNo">097</span>   *<a name="line.97"></a>
+<span class="sourceLineNo">098</span>   * The first hbase:meta region, and regions created by an older<a name="line.98"></a>
+<span class="sourceLineNo">099</span>   * version of HBase (0.20 or prior) will continue to use the<a name="line.99"></a>
+<span class="sourceLineNo">100</span>   * old region name format.<a name="line.100"></a>
+<span class="sourceLineNo">101</span>   */<a name="line.101"></a>
+<span class="sourceLineNo">102</span><a name="line.102"></a>
+<span class="sourceLineNo">103</span>  /** A non-capture group so that this can be embedded. */<a name="line.103"></a>
+<span class="sourceLineNo">104</span>  public static final String ENCODED_REGION_NAME_REGEX = RegionInfoBuilder.ENCODED_REGION_NAME_REGEX;<a name="line.104"></a>
 <span class="sourceLineNo">105</span><a name="line.105"></a>
-<span class="sourceLineNo">106</span>  /** Separator used to demarcate the encodedName in a region name<a name="line.106"></a>
-<span class="sourceLineNo">107</span>   * in the new format. See description on new format above.<a name="line.107"></a>
-<span class="sourceLineNo">108</span>   */<a name="line.108"></a>
-<span class="sourceLineNo">109</span>  private static final int ENC_SEPARATOR = '.';<a name="line.109"></a>
-<span class="sourceLineNo">110</span>  public  static final int MD5_HEX_LENGTH   = 32;<a name="line.110"></a>
-<span class="sourceLineNo">111</span><a name="line.111"></a>
-<span class="sourceLineNo">112</span>  /** A non-capture group so that this can be embedded. */<a name="line.112"></a>
-<span class="sourceLineNo">113</span>  public static final String ENCODED_REGION_NAME_REGEX = "(?:[a-f0-9]+)";<a name="line.113"></a>
-<span class="sourceLineNo">114</span><a name="line.114"></a>
-<span class="sourceLineNo">115</span>  // to keep appended int's sorted in string format. Only allows 2 bytes to be<a name="line.115"></a>
-<span class="sourceLineNo">116</span>  // sorted for replicaId<a name="line.116"></a>
-<span class="sourceLineNo">117</span>  public static final String REPLICA_ID_FORMAT = "%04X";<a name="line.117"></a>
+<span class="sourceLineNo">106</span>  private static final int MAX_REPLICA_ID = 0xFFFF;<a name="line.106"></a>
+<span class="sourceLineNo">107</span><a name="line.107"></a>
+<span class="sourceLineNo">108</span>  /**<a name="line.108"></a>
+<span class="sourceLineNo">109</span>   * @param regionName<a name="line.109"></a>
+<span class="sourceLineNo">110</span>   * @return the encodedName<a name="line.110"></a>
+<span class="sourceLineNo">111</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.111"></a>
+<span class="sourceLineNo">112</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#encodeRegionName(byte[])}.<a name="line.112"></a>
+<span class="sourceLineNo">113</span>   */<a name="line.113"></a>
+<span class="sourceLineNo">114</span>  @Deprecated<a name="line.114"></a>
+<span class="sourceLineNo">115</span>  public static String encodeRegionName(final byte [] regionName) {<a name="line.115"></a>
+<span class="sourceLineNo">116</span>    return RegionInfo.encodeRegionName(regionName);<a name="line.116"></a>
+<span class="sourceLineNo">117</span>  }<a name="line.117"></a>
 <span class="sourceLineNo">118</span><a name="line.118"></a>
-<span class="sourceLineNo">119</span>  public static final byte REPLICA_ID_DELIMITER = (byte)'_';<a name="line.119"></a>
-<span class="sourceLineNo">120</span><a name="line.120"></a>
-<span class="sourceLineNo">121</span>  private static final int MAX_REPLICA_ID = 0xFFFF;<a name="line.121"></a>
-<span class="sourceLineNo">122</span>  public static final int DEFAULT_REPLICA_ID = 0;<a name="line.122"></a>
-<span class="sourceLineNo">123</span><a name="line.123"></a>
-<span class="sourceLineNo">124</span>  public static final String INVALID_REGION_NAME_FORMAT_MESSAGE = "Invalid regionName format";<a name="line.124"></a>
+<span class="sourceLineNo">119</span>  /**<a name="line.119"></a>
+<span class="sourceLineNo">120</span>   * @return Return a short, printable name for this region (usually encoded name) for us logging.<a name="line.120"></a>
+<span class="sourceLineNo">121</span>   */<a name="line.121"></a>
+<span class="sourceLineNo">122</span>  public String getShortNameToLog() {<a name="line.122"></a>
+<span class="sourceLineNo">123</span>    return prettyPrint(this.getEncodedName());<a name="line.123"></a>
+<span class="sourceLineNo">124</span>  }<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>   * Does region name contain its encoded name?<a name="line.127"></a>
-<span class="sourceLineNo">128</span>   * @param regionName region name<a name="line.128"></a>
-<span class="sourceLineNo">129</span>   * @return boolean indicating if this a new format region<a name="line.129"></a>
-<span class="sourceLineNo">130</span>   *         name which contains its encoded name.<a name="line.130"></a>
-<span class="sourceLineNo">131</span>   */<a name="line.131"></a>
-<span class="sourceLineNo">132</span>  private static boolean hasEncodedName(final byte[] regionName) {<a name="line.132"></a>
-<span class="sourceLineNo">133</span>    // check if region name ends in ENC_SEPARATOR<a name="line.133"></a>
-<span class="sourceLineNo">134</span>    if ((regionName.length &gt;= 1)<a name="line.134"></a>
-<span class="sourceLineNo">135</span>        &amp;&amp; (regionName[regionName.length - 1] == ENC_SEPARATOR)) {<a name="line.135"></a>
-<span class="sourceLineNo">136</span>      // region name is new format. it contains the encoded name.<a name="line.136"></a>
-<span class="sourceLineNo">137</span>      return true;<a name="line.137"></a>
-<span class="sourceLineNo">138</span>    }<a name="line.138"></a>
-<span class="sourceLineNo">139</span>    return false;<a name="line.139"></a>
-<span class="sourceLineNo">140</span>  }<a name="line.140"></a>
-<span class="sourceLineNo">141</span><a name="line.141"></a>
-<span class="sourceLineNo">142</span>  /**<a name="line.142"></a>
-<span class="sourceLineNo">143</span>   * @param regionName<a name="line.143"></a>
-<span class="sourceLineNo">144</span>   * @return the encodedName<a name="line.144"></a>
-<span class="sourceLineNo">145</span>   */<a name="line.145"></a>
-<span class="sourceLineNo">146</span>  public static String encodeRegionName(final byte [] regionName) {<a name="line.146"></a>
-<span class="sourceLineNo">147</span>    String encodedName;<a name="line.147"></a>
-<span class="sourceLineNo">148</span>    if (hasEncodedName(regionName)) {<a name="line.148"></a>
-<span class="sourceLineNo">149</span>      // region is in new format:<a name="line.149"></a>
-<span class="sourceLineNo">150</span>      // &lt;tableName&gt;,&lt;startKey&gt;,&lt;regionIdTimeStamp&gt;/encodedName/<a name="line.150"></a>
-<span class="sourceLineNo">151</span>      encodedName = Bytes.toString(regionName,<a name="line.151"></a>
-<span class="sourceLineNo">152</span>          regionName.length - MD5_HEX_LENGTH - 1,<a name="line.152"></a>
-<span class="sourceLineNo">153</span>          MD5_HEX_LENGTH);<a name="line.153"></a>
-<span class="sourceLineNo">154</span>    } else {<a name="line.154"></a>
-<span class="sourceLineNo">155</span>      // old format region name. First hbase:meta region also<a name="line.155"></a>
-<span class="sourceLineNo">156</span>      // use this format.EncodedName is the JenkinsHash value.<a name="line.156"></a>
-<span class="sourceLineNo">157</span>      HashKey&lt;byte[]&gt; key = new ByteArrayHashKey(regionName, 0, regionName.length);<a name="line.157"></a>
-<span class="sourceLineNo">158</span>      int hashVal = Math.abs(JenkinsHash.getInstance().hash(key, 0));<a name="line.158"></a>
-<span class="sourceLineNo">159</span>      encodedName = String.valueOf(hashVal);<a name="line.159"></a>
-<span class="sourceLineNo">160</span>    }<a name="line.160"></a>
-<span class="sourceLineNo">161</span>    return encodedName;<a name="line.161"></a>
-<span class="sourceLineNo">162</span>  }<a name="line.162"></a>
-<span class="sourceLineNo">163</span><a name="line.163"></a>
-<span class="sourceLineNo">164</span>  /**<a name="line.164"></a>
-<span class="sourceLineNo">165</span>   * @return Return a short, printable name for this region (usually encoded name) for us logging.<a name="line.165"></a>
-<span class="sourceLineNo">166</span>   */<a name="line.166"></a>
-<span class="sourceLineNo">167</span>  public String getShortNameToLog() {<a name="line.167"></a>
-<span class="sourceLineNo">168</span>    return prettyPrint(this.getEncodedName());<a name="line.168"></a>
-<span class="sourceLineNo">169</span>  }<a name="line.169"></a>
-<span class="sourceLineNo">170</span><a name="line.170"></a>
-<span class="sourceLineNo">171</span>  public static String getShortNameToLog(HRegionInfo...hris) {<a name="line.171"></a>
-<span class="sourceLineNo">172</span>    return getShortNameToLog(Arrays.asList(hris));<a name="line.172"></a>
-<span class="sourceLineNo">173</span>  }<a name="line.173"></a>
-<span class="sourceLineNo">174</span><a name="line.174"></a>
-<span class="sourceLineNo">175</span>  /**<a name="line.175"></a>
-<span class="sourceLineNo">176</span>   * @return Return a String of short, printable names for &lt;code&gt;hris&lt;/code&gt;<a name="line.176"></a>
-<span class="sourceLineNo">177</span>   * (usually encoded name) for us logging.<a name="line.177"></a>
-<span class="sourceLineNo">178</span>   */<a name="line.178"></a>
-<span class="sourceLineNo">179</span>  public static String getShortNameToLog(final List&lt;HRegionInfo&gt; hris) {<a name="line.179"></a>
-<span class="sourceLineNo">180</span>    return hris.stream().map(hri -&gt; hri.getShortNameToLog()).<a name="line.180"></a>
-<span class="sourceLineNo">181</span>        collect(Collectors.toList()).toString();<a name="line.181"></a>
-<span class="sourceLineNo">182</span>  }<a name="line.182"></a>
+<span class="sourceLineNo">127</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.127"></a>
+<span class="sourceLineNo">128</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getShortNameToLog(RegionInfo...)}.<a name="line.128"></a>
+<span class="sourceLineNo">129</span>   */<a name="line.129"></a>
+<span class="sourceLineNo">130</span>  @Deprecated<a name="line.130"></a>
+<span class="sourceLineNo">131</span>  public static String getShortNameToLog(HRegionInfo...hris) {<a name="line.131"></a>
+<span class="sourceLineNo">132</span>    return RegionInfo.getShortNameToLog(Arrays.asList(hris));<a name="line.132"></a>
+<span class="sourceLineNo">133</span>  }<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>   * @return Return a String of short, printable names for &lt;code&gt;hris&lt;/code&gt;<a name="line.136"></a>
+<span class="sourceLineNo">137</span>   * (usually encoded name) for us logging.<a name="line.137"></a>
+<span class="sourceLineNo">138</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.138"></a>
+<span class="sourceLineNo">139</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getShortNameToLog(List)})}.<a name="line.139"></a>
+<span class="sourceLineNo">140</span>   */<a name="line.140"></a>
+<span class="sourceLineNo">141</span>  @Deprecated<a name="line.141"></a>
+<span class="sourceLineNo">142</span>  public static String getShortNameToLog(final List&lt;HRegionInfo&gt; hris) {<a name="line.142"></a>
+<span class="sourceLineNo">143</span>    return RegionInfo.getShortNameToLog(hris.stream().collect(Collectors.toList()));<a name="line.143"></a>
+<span class="sourceLineNo">144</span>  }<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>   * Use logging.<a name="line.147"></a>
+<span class="sourceLineNo">148</span>   * @param encodedRegionName The encoded regionname.<a name="line.148"></a>
+<span class="sourceLineNo">149</span>   * @return &lt;code&gt;hbase:meta&lt;/code&gt; if passed &lt;code&gt;1028785192&lt;/code&gt; else returns<a name="line.149"></a>
+<span class="sourceLineNo">150</span>   * &lt;code&gt;encodedRegionName&lt;/code&gt;<a name="line.150"></a>
+<span class="sourceLineNo">151</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.151"></a>
+<span class="sourceLineNo">152</span>   *             Use {@link RegionInfo#prettyPrint(String)}.<a name="line.152"></a>
+<span class="sourceLineNo">153</span>   */<a name="line.153"></a>
+<span class="sourceLineNo">154</span>  @Deprecated<a name="line.154"></a>
+<span class="sourceLineNo">155</span>  @InterfaceAudience.Private<a name="line.155"></a>
+<span class="sourceLineNo">156</span>  public static String prettyPrint(final String encodedRegionName) {<a name="line.156"></a>
+<span class="sourceLineNo">157</span>    return RegionInfo.prettyPrint(encodedRegionName);<a name="line.157"></a>
+<span class="sourceLineNo">158</span>  }<a name="line.158"></a>
+<span class="sourceLineNo">159</span><a name="line.159"></a>
+<span class="sourceLineNo">160</span>  private byte [] endKey = HConstants.EMPTY_BYTE_ARRAY;<a name="line.160"></a>
+<span class="sourceLineNo">161</span>  // This flag is in the parent of a split while the parent is still referenced<a name="line.161"></a>
+<span class="sourceLineNo">162</span>  // by daughter regions.  We USED to set this flag when we disabled a table<a name="line.162"></a>
+<span class="sourceLineNo">163</span>  // but now table state is kept up in zookeeper as of 0.90.0 HBase.<a name="line.163"></a>
+<span class="sourceLineNo">164</span>  private boolean offLine = false;<a name="line.164"></a>
+<span class="sourceLineNo">165</span>  private long regionId = -1;<a name="line.165"></a>
+<span class="sourceLineNo">166</span>  private transient byte [] regionName = HConstants.EMPTY_BYTE_ARRAY;<a name="line.166"></a>
+<span class="sourceLineNo">167</span>  private boolean split = false;<a name="line.167"></a>
+<span class="sourceLineNo">168</span>  private byte [] startKey = HConstants.EMPTY_BYTE_ARRAY;<a name="line.168"></a>
+<span class="sourceLineNo">169</span>  private int hashCode = -1;<a name="line.169"></a>
+<span class="sourceLineNo">170</span>  //TODO: Move NO_HASH to HStoreFile which is really the only place it is used.<a name="line.170"></a>
+<span class="sourceLineNo">171</span>  public static final String NO_HASH = null;<a name="line.171"></a>
+<span class="sourceLineNo">172</span>  private String encodedName = null;<a name="line.172"></a>
+<span class="sourceLineNo">173</span>  private byte [] encodedNameAsBytes = null;<a name="line.173"></a>
+<span class="sourceLineNo">174</span>  private int replicaId = DEFAULT_REPLICA_ID;<a name="line.174"></a>
+<span class="sourceLineNo">175</span><a name="line.175"></a>
+<span class="sourceLineNo">176</span>  // Current TableName<a name="line.176"></a>
+<span class="sourceLineNo">177</span>  private TableName tableName = null;<a name="line.177"></a>
+<span class="sourceLineNo">178</span><a name="line.178"></a>
+<span class="sourceLineNo">179</span>  // Duplicated over in RegionInfoDisplay<a name="line.179"></a>
+<span class="sourceLineNo">180</span>  final static String DISPLAY_KEYS_KEY = RegionInfoDisplay.DISPLAY_KEYS_KEY;<a name="line.180"></a>
+<span class="sourceLineNo">181</span>  public final static byte[] HIDDEN_END_KEY = RegionInfoDisplay.HIDDEN_END_KEY;<a name="line.181"></a>
+<span class="sourceLineNo">182</span>  public final static byte[] HIDDEN_START_KEY = RegionInfoDisplay.HIDDEN_START_KEY;<a name="line.182"></a>
 <span class="sourceLineNo">183</span><a name="line.183"></a>
-<span class="sourceLineNo">184</span>  /**<a name="line.184"></a>
-<span class="sourceLineNo">185</span>   * Use logging.<a name="line.185"></a>
-<span class="sourceLineNo">186</span>   * @param encodedRegionName The encoded regionname.<a name="line.186"></a>
-<span class="sourceLineNo">187</span>   * @return &lt;code&gt;hbase:meta&lt;/code&gt; if passed &lt;code&gt;1028785192&lt;/code&gt; else returns<a name="line.187"></a>
-<span class="sourceLineNo">188</span>   * &lt;code&gt;encodedRegionName&lt;/code&gt;<a name="line.188"></a>
-<span class="sourceLineNo">189</span>   */<a name="line.189"></a>
-<span class="sourceLineNo">190</span>  public static String prettyPrint(final String encodedRegionName) {<a name="line.190"></a>
-<span class="sourceLineNo">191</span>    if (encodedRegionName.equals("1028785192")) {<a name="line.191"></a>
-<span class="sourceLineNo">192</span>      return encodedRegionName + "/hbase:meta";<a name="line.192"></a>
-<span class="sourceLineNo">193</span>    }<a name="line.193"></a>
-<span class="sourceLineNo">194</span>    return encodedRegionName;<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>  private byte [] endKey = HConstants.EMPTY_BYTE_ARRAY;<a name="line.197"></a>
-<span class="sourceLineNo">198</span>  // This flag is in the parent of a split while the parent is still referenced<a name="line.198"></a>
-<span class="sourceLineNo">199</span>  // by daughter regions.  We USED to set this flag when we disabled a table<a name="line.199"></a>
-<span class="sourceLineNo">200</span>  // but now table state is kept up in zookeeper as of 0.90.0 HBase.<a name="line.200"></a>
-<span class="sourceLineNo">201</span>  private boolean offLine = false;<a name="line.201"></a>
-<span class="sourceLineNo">202</span>  private long regionId = -1;<a name="line.202"></a>
-<span class="sourceLineNo">203</span>  private transient byte [] regionName = HConstants.EMPTY_BYTE_ARRAY;<a name="line.203"></a>
-<span class="sourceLineNo">204</span>  private boolean split = false;<a name="line.204"></a>
-<span class="sourceLineNo">205</span>  private byte [] startKey = HConstants.EMPTY_BYTE_ARRAY;<a name="line.205"></a>
-<span class="sourceLineNo">206</span>  private int hashCode = -1;<a name="line.206"></a>
-<span class="sourceLineNo">207</span>  //TODO: Move NO_HASH to HStoreFile which is really the only place it is used.<a name="line.207"></a>
-<span class="sourceLineNo">208</span>  public static final String NO_HASH = null;<a name="line.208"></a>
-<span class="sourceLineNo">209</span>  private String encodedName = null;<a name="line.209"></a>
-<span class="sourceLineNo">210</span>  private byte [] encodedNameAsBytes = null;<a name="line.210"></a>
-<span class="sourceLineNo">211</span>  private int replicaId = DEFAULT_REPLICA_ID;<a name="line.211"></a>
-<span class="sourceLineNo">212</span><a name="line.212"></a>
-<span class="sourceLineNo">213</span>  // Current TableName<a name="line.213"></a>
-<span class="sourceLineNo">214</span>  private TableName tableName = null;<a name="line.214"></a>
-<span class="sourceLineNo">215</span>  final static String DISPLAY_KEYS_KEY = "hbase.display.keys";<a name="line.215"></a>
-<span class="sourceLineNo">216</span>  public final static byte[] HIDDEN_END_KEY = Bytes.toBytes("hidden-end-key");<a name="line.216"></a>
-<span class="sourceLineNo">217</span>  public final static byte[] HIDDEN_START_KEY = Bytes.toBytes("hidden-start-key");<a name="line.217"></a>
-<span class="sourceLineNo">218</span><a name="line.218"></a>
-<span class="sourceLineNo">219</span>  /** HRegionInfo for first meta region */<a name="line.219"></a>
-<span class="sourceLineNo">220</span>  // TODO: How come Meta regions still do not have encoded region names? Fix.<a name="line.220"></a>
-<span class="sourceLineNo">221</span>  public static final HRegionInfo FIRST_META_REGIONINFO =<a name="line.221"></a>
-<span class="sourceLineNo">222</span>      new HRegionInfo(1L, TableName.META_TABLE_NAME);<a name="line.222"></a>
-<span class="sourceLineNo">223</span><a name="line.223"></a>
-<span class="sourceLineNo">224</span>  private void setHashCode() {<a name="line.224"></a>
-<span class="sourceLineNo">225</span>    int result = Arrays.hashCode(this.regionName);<a name="line.225"></a>
-<span class="sourceLineNo">226</span>    result ^= this.regionId;<a name="line.226"></a>
-<span class="sourceLineNo">227</span>    result ^= Arrays.hashCode(this.startKey);<a name="line.227"></a>
-<span class="sourceLineNo">228</span>    result ^= Arrays.hashCode(this.endKey);<a name="line.228"></a>
-<span class="sourceLineNo">229</span>    result ^= Boolean.valueOf(this.offLine).hashCode();<a name="line.229"></a>
-<span class="sourceLineNo">230</span>    result ^= Arrays.hashCode(this.tableName.getName());<a name="line.230"></a>
-<span class="sourceLineNo">231</span>    result ^= this.replicaId;<a name="line.231"></a>
-<span class="sourceLineNo">232</span>    this.hashCode = result;<a name="line.232"></a>
+<span class="sourceLineNo">184</span>  /** HRegionInfo for first meta region */<a name="line.184"></a>
+<span class="sourceLineNo">185</span>  // TODO: How come Meta regions still do not have encoded region names? Fix.<a name="line.185"></a>
+<span class="sourceLineNo">186</span>  public static final HRegionInfo FIRST_META_REGIONINFO =<a name="line.186"></a>
+<span class="sourceLineNo">187</span>      new HRegionInfo(1L, TableName.META_TABLE_NAME);<a name="line.187"></a>
+<span class="sourceLineNo">188</span><a name="line.188"></a>
+<span class="sourceLineNo">189</span>  private void setHashCode() {<a name="line.189"></a>
+<span class="sourceLineNo">190</span>    int result = Arrays.hashCode(this.regionName);<a name="line.190"></a>
+<span class="sourceLineNo">191</span>    result ^= this.regionId;<a name="line.191"></a>
+<span class="sourceLineNo">192</span>    result ^= Arrays.hashCode(this.startKey);<a name="line.192"></a>
+<span class="sourceLineNo">193</span>    result ^= Arrays.hashCode(this.endKey);<a name="line.193"></a>
+<span class="sourceLineNo">194</span>    result ^= Boolean.valueOf(this.offLine).hashCode();<a name="line.194"></a>
+<span class="sourceLineNo">195</span>    result ^= Arrays.hashCode(this.tableName.getName());<a name="line.195"></a>
+<span class="sourceLineNo">196</span>    result ^= this.replicaId;<a name="line.196"></a>
+<span class="sourceLineNo">197</span>    this.hashCode = result;<a name="line.197"></a>
+<span class="sourceLineNo">198</span>  }<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>   * Private constructor used constructing HRegionInfo for the<a name="line.201"></a>
+<span class="sourceLineNo">202</span>   * first meta regions<a name="line.202"></a>
+<span class="sourceLineNo">203</span>   */<a name="line.203"></a>
+<span class="sourceLineNo">204</span>  private HRegionInfo(long regionId, TableName tableName) {<a name="line.204"></a>
+<span class="sourceLineNo">205</span>    this(regionId, tableName, DEFAULT_REPLICA_ID);<a name="line.205"></a>
+<span class="sourceLineNo">206</span>  }<a name="line.206"></a>
+<span class="sourceLineNo">207</span><a name="line.207"></a>
+<span class="sourceLineNo">208</span>  public HRegionInfo(long regionId, TableName tableName, int replicaId) {<a name="line.208"></a>
+<span class="sourceLineNo">209</span>    super();<a name="line.209"></a>
+<span class="sourceLineNo">210</span>    this.regionId = regionId;<a name="line.210"></a>
+<span class="sourceLineNo">211</span>    this.tableName = tableName;<a name="line.211"></a>
+<span class="sourceLineNo">212</span>    this.replicaId = replicaId;<a name="line.212"></a>
+<span class="sourceLineNo">213</span>    // Note: First Meta region replicas names are in old format<a name="line.213"></a>
+<span class="sourceLineNo">214</span>    this.regionName = createRegionName(tableName, null, regionId, replicaId, false);<a name="line.214"></a>
+<span class="sourceLineNo">215</span>    setHashCode();<a name="line.215"></a>
+<span class="sourceLineNo">216</span>  }<a name="line.216"></a>
+<span class="sourceLineNo">217</span><a name="line.217"></a>
+<span class="sourceLineNo">218</span>  public HRegionInfo(final TableName tableName) {<a name="line.218"></a>
+<span class="sourceLineNo">219</span>    this(tableName, null, null);<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>  /**<a name="line.222"></a>
+<span class="sourceLineNo">223</span>   * Construct HRegionInfo with explicit parameters<a name="line.223"></a>
+<span class="sourceLineNo">224</span>   *<a name="line.224"></a>
+<span class="sourceLineNo">225</span>   * @param tableName the table name<a name="line.225"></a>
+<span class="sourceLineNo">226</span>   * @param startKey first key in region<a name="line.226"></a>
+<span class="sourceLineNo">227</span>   * @param endKey end of key range<a name="line.227"></a>
+<span class="sourceLineNo">228</span>   * @throws IllegalArgumentException<a name="line.228"></a>
+<span class="sourceLineNo">229</span>   */<a name="line.229"></a>
+<span class="sourceLineNo">230</span>  public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey)<a name="line.230"></a>
+<span class="sourceLineNo">231</span>  throws IllegalArgumentException {<a name="line.231"></a>
+<span class="sourceLineNo">232</span>    this(tableName, startKey, endKey, false);<a name="line.232"></a>
 <span class="sourceLineNo">233</span>  }<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>   * Private constructor used constructing HRegionInfo for the<a name="line.237"></a>
-<span class="sourceLineNo">238</span>   * first meta regions<a name="line.238"></a>
-<span class="sourceLineNo">239</span>   */<a name="line.239"></a>
-<span class="sourceLineNo">240</span>  private HRegionInfo(long regionId, TableName tableName) {<a name="line.240"></a>
-<span class="sourceLineNo">241</span>    this(regionId, tableName, DEFAULT_REPLICA_ID);<a name="line.241"></a>
-<span class="sourceLineNo">242</span>  }<a name="line.242"></a>
-<span class="sourceLineNo">243</span><a name="line.243"></a>
-<span class="sourceLineNo">244</span>  public HRegionInfo(long regionId, TableName tableName, int replicaId) {<a name="line.244"></a>
-<span class="sourceLineNo">245</span>    super();<a name="line.245"></a>
-<span class="sourceLineNo">246</span>    this.regionId = regionId;<a name="line.246"></a>
-<span class="sourceLineNo">247</span>    this.tableName = tableName;<a name="line.247"></a>
-<span class="sourceLineNo">248</span>    this.replicaId = replicaId;<a name="line.248"></a>
-<span class="sourceLineNo">249</span>    // Note: First Meta region replicas names are in old format<a name="line.249"></a>
-<span class="sourceLineNo">250</span>    this.regionName = createRegionName(tableName, null, regionId, replicaId, false);<a name="line.250"></a>
-<span class="sourceLineNo">251</span>    setHashCode();<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>  public HRegionInfo(final TableName tableName) {<a name="line.254"></a>
-<span class="sourceLineNo">255</span>    this(tableName, null, null);<a name="line.255"></a>
-<span class="sourceLineNo">256</span>  }<a name="line.256"></a>
-<span class="sourceLineNo">257</span><a name="line.257"></a>
-<span class="sourceLineNo">258</span>  /**<a name="line.258"></a>
-<span class="sourceLineNo">259</span>   * Construct HRegionInfo with explicit parameters<a name="line.259"></a>
-<span class="sourceLineNo">260</span>   *<a name="line.260"></a>
-<span class="sourceLineNo">261</span>   * @param tableName the table name<a name="line.261"></a>
-<span class="sourceLineNo">262</span>   * @param startKey first key in region<a name="line.262"></a>
-<span class="sourceLineNo">263</span>   * @param endKey end of key range<a name="line.263"></a>
-<span class="sourceLineNo">264</span>   * @throws IllegalArgumentException<a name="line.264"></a>
-<span class="sourceLineNo">265</span>   */<a name="line.265"></a>
-<span class="sourceLineNo">266</span>  public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey)<a name="line.266"></a>
-<span class="sourceLineNo">267</span>  throws IllegalArgumentException {<a name="line.267"></a>
-<span class="sourceLineNo">268</span>    this(tableName, startKey, endKey, false);<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>  /**<a name="line.271"></a>
-<span class="sourceLineNo">272</span>   * Construct HRegionInfo with explicit parameters<a name="line.272"></a>
-<span class="sourceLineNo">273</span>   *<a name="line.273"></a>
-<span class="sourceLineNo">274</span>   * @param tableName the table descriptor<a name="line.274"></a>
-<span class="sourceLineNo">275</span>   * @param startKey first key in region<a name="line.275"></a>
-<span class="sourceLineNo">276</span>   * @param endKey end of key range<a name="line.276"></a>
-<span class="sourceLineNo">277</span>   * @param split true if this region has split and we have daughter regions<a name="line.277"></a>
-<span class="sourceLineNo">278</span>   * regions that may or may not hold references to this region.<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, final byte[] endKey,<a name="line.281"></a>
-<span class="sourceLineNo">282</span>      final boolean split)<a name="line.282"></a>
-<span class="sourceLineNo">283</span>  throws IllegalArgumentException {<a name="line.283"></a>
-<span class="sourceLineNo">284</span>    this(tableName, startKey, endKey, split, System.currentTimeMillis());<a name="line.284"></a>
-<span class="sourceLineNo">285</span>  }<a name="line.285"></a>
-<span class="sourceLineNo">286</span><a name="line.286"></a>
-<span class="sourceLineNo">287</span>  /**<a name="line.287"></a>
-<span class="sourceLineNo">288</span>   * Construct HRegionInfo with explicit parameters<a name="line.288"></a>
-<span class="sourceLineNo">289</span>   *<a name="line.289"></a>
-<span class="sourceLineNo">290</span>   * @param tableName the table descriptor<a name="line.290"></a>
-<span class="sourceLineNo">291</span>   * @param startKey first key in region<a name="line.291"></a>
-<span class="sourceLineNo">292</span>   * @param endKey end of key range<a name="line.292"></a>
-<span class="sourceLineNo">293</span>   * @param split true if this region has split and we have daughter regions<a name="line.293"></a>
-<span class="sourceLineNo">294</span>   * regions that may or may not hold references to this region.<a name="line.294"></a>
-<span class="sourceLineNo">295</span>   * @param regionid Region id to use.<a name="line.295"></a>
-<span class="sourceLineNo">296</span>   * @throws IllegalArgumentException<a name="line.296"></a>
-<span class="sourceLineNo">297</span>   */<a name="line.297"></a>
-<span class="sourceLineNo">298</span>  public HRegionInfo(final TableName tableName, final byte[] startKey,<a name="line.298"></a>
-<span class="sourceLineNo">299</span>                     final byte[] endKey, final boolean split, final long regionid)<a name="line.299"></a>
-<span class="sourceLineNo">300</span>  throws IllegalArgumentException {<a name="line.300"></a>
-<span class="sourceLineNo">301</span>    this(tableName, startKey, endKey, split, regionid, DEFAULT_REPLICA_ID);<a name="line.301"></a>
-<span class="sourceLineNo">302</span>  }<a name="line.302"></a>
-<span class="sourceLineNo">303</span><a name="line.303"></a>
-<span class="sourceLineNo">304</span>  /**<a name="line.304"></a>
-<span class="sourceLineNo">305</span>   * Construct HRegionInfo with explicit parameters<a name="line.305"></a>
-<span class="sourceLineNo">306</span>   *<a name="line.306"></a>
-<span class="sourceLineNo">307</span>   * @param tableName the table descriptor<a name="line.307"></a>
-<span class="sourceLineNo">308</span>   * @param startKey first key in region<a name="line.308"></a>
-<span class="sourceLineNo">309</span>   * @param endKey end of key range<a name="line.309"></a>
-<span class="sourceLineNo">310</span>   * @param split true if this region has split and we have daughter regions<a name="line.310"></a>
-<span class="sourceLineNo">311</span>   * regions that may or may not hold references to this region.<a name="line.311"></a>
-<span class="sourceLineNo">312</span>   * @param regionid Region id to use.<a name="line.312"></a>
-<span class="sourceLineNo">313</span>   * @param replicaId the replicaId to use<a name="line.313"></a>
-<span class="sourceLineNo">314</span>   * @throws IllegalArgumentException<a name="line.314"></a>
-<span class="sourceLineNo">315</span>   */<a name="line.315"></a>
-<span class="sourceLineNo">316</span>  public HRegionInfo(final TableName tableName, final byte[] startKey,<a name="line.316"></a>
-<span class="sourceLineNo">317</span>                     final byte[] endKey, final boolean split, final long regionid,<a name="line.317"></a>
-<span class="sourceLineNo">318</span>                     final int replicaId)<a name="line.318"></a>
-<span class="sourceLineNo">319</span>    throws IllegalArgumentException {<a name="line.319"></a>
-<span class="sourceLineNo">320</span>    super();<a name="line.320"></a>
-<span class="sourceLineNo">321</span>    if (tableName == null) {<a name="line.321"></a>
-<span class="sourceLineNo">322</span>      throw new IllegalArgumentException("TableName cannot be null");<a name="line.322"></a>
-<span class="sourceLineNo">323</span>    }<a name="line.323"></a>
-<span class="sourceLineNo">324</span>    this.tableName = tableName;<a name="line.324"></a>
-<span class="sourceLineNo">325</span>    this.offLine = false;<a name="line.325"></a>
-<span class="sourceLineNo">326</span>    this.regionId = regionid;<a name="line.326"></a>
+<span class="sourceLineNo">235</span>  /**<a name="line.235"></a>
+<span class="sourceLineNo">236</span>   * Construct HRegionInfo with explicit parameters<a name="line.236"></a>
+<span class="sourceLineNo">237</span>   *<a name="line.237"></a>
+<span class="sourceLineNo">238</span>   * @param tableName the table descriptor<a name="line.238"></a>
+<span class="sourceLineNo">239</span>   * @param startKey first key in region<a name="line.239"></a>
+<span class="sourceLineNo">240</span>   * @param endKey end of key range<a name="line.240"></a>
+<span class="sourceLineNo">241</span>   * @param split true if this region has split and we have daughter regions<a name="line.241"></a>
+<span class="sourceLineNo">242</span>   * regions that may or may not hold references to this region.<a name="line.242"></a>
+<span class="sourceLineNo">243</span>   * @throws IllegalArgumentException<a name="line.243"></a>
+<span class="sourceLineNo">244</span>   */<a name="line.244"></a>
+<span class="sourceLineNo">245</span>  public HRegionInfo(final TableName tableName, final byte[] startKey, final byte[] endKey,<a name="line.245"></a>
+<span class="sourceLineNo">246</span>      final boolean split)<a name="line.246"></a>
+<span class="sourceLineNo">247</span>  throws IllegalArgumentException {<a name="line.247"></a>
+<span class="sourceLineNo">248</span>    this(tableName, startKey, endKey, split, System.currentTimeMillis());<a name="line.248"></a>
+<span class="sourceLineNo">249</span>  }<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>   * Construct HRegionInfo with explicit parameters<a name="line.252"></a>
+<span class="sourceLineNo">253</span>   *<a name="line.253"></a>
+<span class="sourceLineNo">254</span>   * @param tableName the table descriptor<a name="line.254"></a>
+<span class="sourceLineNo">255</span>   * @param startKey first key in region<a name="line.255"></a>
+<span class="sourceLineNo">256</span>   * @param endKey end of key range<a name="line.256"></a>
+<span class="sourceLineNo">257</span>   * @param split true if this region has split and we have daughter regions<a name="line.257"></a>
+<span class="sourceLineNo">258</span>   * regions that may or may not hold references to this region.<a name="line.258"></a>
+<span class="sourceLineNo">259</span>   * @param regionid Region id to use.<a name="line.259"></a>
+<span class="sourceLineNo">260</span>   * @throws IllegalArgumentException<a name="line.260"></a>
+<span class="sourceLineNo">261</span>   */<a name="line.261"></a>
+<span class="sourceLineNo">262</span>  public HRegionInfo(final TableName tableName, final byte[] startKey,<a name="line.262"></a>
+<span class="sourceLineNo">263</span>                     final byte[] endKey, final boolean split, final long regionid)<a name="line.263"></a>
+<span class="sourceLineNo">264</span>  throws IllegalArgumentException {<a name="line.264"></a>
+<span class="sourceLineNo">265</span>    this(tableName, startKey, endKey, split, regionid, DEFAULT_REPLICA_ID);<a name="line.265"></a>
+<span class="sourceLineNo">266</span>  }<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>   * Construct HRegionInfo with explicit parameters<a name="line.269"></a>
+<span class="sourceLineNo">270</span>   *<a name="line.270"></a>
+<span class="sourceLineNo">271</span>   * @param tableName the table descriptor<a name="line.271"></a>
+<span class="sourceLineNo">272</span>   * @param startKey first key in region<a name="line.272"></a>
+<span class="sourceLineNo">273</span>   * @param endKey end of key range<a name="line.273"></a>
+<span class="sourceLineNo">274</span>   * @param split true if this region has split and we have daughter regions<a name="line.274"></a>
+<span class="sourceLineNo">275</span>   * regions that may or may not hold references to this region.<a name="line.275"></a>
+<span class="sourceLineNo">276</span>   * @param regionid Region id to use.<a name="line.276"></a>
+<span class="sourceLineNo">277</span>   * @param replicaId the replicaId to use<a name="line.277"></a>
+<span class="sourceLineNo">278</span>   * @throws IllegalArgumentException<a name="line.278"></a>
+<span class="sourceLineNo">279</span>   */<a name="line.279"></a>
+<span class="sourceLineNo">280</span>  public HRegionInfo(final TableName tableName, final byte[] startKey,<a name="line.280"></a>
+<span class="sourceLineNo">281</span>                     final byte[] endKey, final boolean split, final long regionid,<a name="line.281"></a>
+<span class="sourceLineNo">282</span>                     final int replicaId)<a name="line.282"></a>
+<span class="sourceLineNo">283</span>    throws IllegalArgumentException {<a name="line.283"></a>
+<span class="sourceLineNo">284</span>    super();<a name="line.284"></a>
+<span class="sourceLineNo">285</span>    if (tableName == null) {<a name="line.285"></a>
+<span class="sourceLineNo">286</span>      throw new IllegalArgumentException("TableName cannot be null");<a name="line.286"></a>
+<span class="sourceLineNo">287</span>    }<a name="line.287"></a>
+<span class="sourceLineNo">288</span>    this.tableName = tableName;<a name="line.288"></a>
+<span class="sourceLineNo">289</span>    this.offLine = false;<a name="line.289"></a>
+<span class="sourceLineNo">290</span>    this.regionId = regionid;<a name="line.290"></a>
+<span class="sourceLineNo">291</span>    this.replicaId = replicaId;<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    if (this.replicaId &gt; MAX_REPLICA_ID) {<a name="line.292"></a>
+<span class="sourceLineNo">293</span>      throw new IllegalArgumentException("ReplicaId cannot be greater than" + MAX_REPLICA_ID);<a name="line.293"></a>
+<span class="sourceLineNo">294</span>    }<a name="line.294"></a>
+<span class="sourceLineNo">295</span><a name="line.295"></a>
+<span class="sourceLineNo">296</span>    this.regionName = createRegionName(this.tableName, startKey, regionId, replicaId, true);<a name="line.296"></a>
+<span class="sourceLineNo">297</span><a name="line.297"></a>
+<span class="sourceLineNo">298</span>    this.split = split;<a name="line.298"></a>
+<span class="sourceLineNo">299</span>    this.endKey = endKey == null? HConstants.EMPTY_END_ROW: endKey.clone();<a name="line.299"></a>
+<span class="sourceLineNo">300</span>    this.startKey = startKey == null?<a name="line.300"></a>
+<span class="sourceLineNo">301</span>      HConstants.EMPTY_START_ROW: startKey.clone();<a name="line.301"></a>
+<span class="sourceLineNo">302</span>    this.tableName = tableName;<a name="line.302"></a>
+<span class="sourceLineNo">303</span>    setHashCode();<a name="line.303"></a>
+<span class="sourceLineNo">304</span>  }<a name="line.304"></a>
+<span class="sourceLineNo">305</span><a name="line.305"></a>
+<span class="sourceLineNo">306</span>  /**<a name="line.306"></a>
+<span class="sourceLineNo">307</span>   * Costruct a copy of another HRegionInfo<a name="line.307"></a>
+<span class="sourceLineNo">308</span>   *<a name="line.308"></a>
+<span class="sourceLineNo">309</span>   * @param other<a name="line.309"></a>
+<span class="sourceLineNo">310</span>   */<a name="line.310"></a>
+<span class="sourceLineNo">311</span>  public HRegionInfo(HRegionInfo other) {<a name="line.311"></a>
+<span class="sourceLineNo">312</span>    super();<a name="line.312"></a>
+<span class="sourceLineNo">313</span>    this.endKey = other.getEndKey();<a name="line.313"></a>
+<span class="sourceLineNo">314</span>    this.offLine = other.isOffline();<a name="line.314"></a>
+<span class="sourceLineNo">315</span>    this.regionId = other.getRegionId();<a name="line.315"></a>
+<span class="sourceLineNo">316</span>    this.regionName = other.getRegionName();<a name="line.316"></a>
+<span class="sourceLineNo">317</span>    this.split = other.isSplit();<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    this.startKey = other.getStartKey();<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    this.hashCode = other.hashCode();<a name="line.319"></a>
+<span class="sourceLineNo">320</span>    this.encodedName = other.getEncodedName();<a name="line.320"></a>
+<span class="sourceLineNo">321</span>    this.tableName = other.getTable();<a name="line.321"></a>
+<span class="sourceLineNo">322</span>    this.replicaId = other.getReplicaId();<a name="line.322"></a>
+<span class="sourceLineNo">323</span>  }<a name="line.323"></a>
+<span class="sourceLineNo">324</span><a name="line.324"></a>
+<span class="sourceLineNo">325</span>  public HRegionInfo(HRegionInfo other, int replicaId) {<a name="line.325"></a>
+<span class="sourceLineNo">326</span>    this(other);<a name="line.326"></a>
 <span class="sourceLineNo">327</span>    this.replicaId = replicaId;<a name="line.327"></a>
-<span class="sourceLineNo">328</span>    if (this.replicaId &gt; MAX_REPLICA_ID) {<a name="line.328"></a>
-<span class="sourceLineNo">329</span>      throw new IllegalArgumentException("ReplicaId cannot be greater than" + MAX_REPLICA_ID);<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>    this.regionName = createRegionName(this.tableName, startKey, regionId, replicaId, true);<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>    this.split = split;<a name="line.334"></a>
-<span class="sourceLineNo">335</span>    this.endKey = endKey == null? HConstants.EMPTY_END_ROW: endKey.clone();<a name="line.335"></a>
-<span class="sourceLineNo">336</span>    this.startKey = startKey == null?<a name="line.336"></a>
-<span class="sourceLineNo">337</span>      HConstants.EMPTY_START_ROW: startKey.clone();<a name="line.337"></a>
-<span class="sourceLineNo">338</span>    this.tableName = tableName;<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    setHashCode();<a name="line.339"></a>
-<span class="sourceLineNo">340</span>  }<a name="line.340"></a>
-<span class="sourceLineNo">341</span><a name="line.341"></a>
-<span class="sourceLineNo">342</span>  /**<a name="line.342"></a>
-<span class="sourceLineNo">343</span>   * Costruct a copy of another HRegionInfo<a name="line.343"></a>
-<span class="sourceLineNo">344</span>   *<a name="line.344"></a>
-<span class="sourceLineNo">345</span>   * @param other<a name="line.345"></a>
-<span class="sourceLineNo">346</span>   */<a name="line.346"></a>
-<span class="sourceLineNo">347</span>  public HRegionInfo(HRegionInfo other) {<a name="line.347"></a>
-<span class="sourceLineNo">348</span>    super();<a name="line.348"></a>
-<span class="sourceLineNo">349</span>    this.endKey = other.getEndKey();<a name="line.349"></a>
-<span class="sourceLineNo">350</span>    this.offLine = other.isOffline();<a name="line.350"></a>
-<span class="sourceLineNo">351</span>    this.regionId = other.getRegionId();<a name="line.351"></a>
-<span class="sourceLineNo">352</span>    this.regionName = other.getRegionName();<a name="line.352"></a>
-<span class="sourceLineNo">353</span>    this.split = other.isSplit();<a name="line.353"></a>
-<span class="sourceLineNo">354</span>    this.startKey = other.getStartKey();<a name="line.354"></a>
-<span class="sourceLineNo">355</span>    this.hashCode = other.hashCode();<a name="line.355"></a>
-<span class="sourceLineNo">356</span>    this.encodedName = other.getEncodedName();<a name="line.356"></a>
-<span class="sourceLineNo">357</span>    this.tableName = other.tableName;<a name="line.357"></a>
-<span class="sourceLineNo">358</span>    this.replicaId = other.replicaId;<a name="line.358"></a>
-<span class="sourceLineNo">359</span>  }<a name="line.359"></a>
-<span class="sourceLineNo">360</span><a name="line.360"></a>
-<span class="sourceLineNo">361</span>  public HRegionInfo(HRegionInfo other, int replicaId) {<a name="line.361"></a>
-<span class="sourceLineNo">362</span>    this(other);<a name="line.362"></a>
-<span class="sourceLineNo">363</span>    this.replicaId = replicaId;<a name="line.363"></a>
-<span class="sourceLineNo">364</span>    this.setHashCode();<a name="line.364"></a>
+<span class="sourceLineNo">328</span>    this.setHashCode();<a name="line.328"></a>
+<span class="sourceLineNo">329</span>  }<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>   * Make a region name of passed parameters.<a name="line.332"></a>
+<span class="sourceLineNo">333</span>   * @param tableName<a name="line.333"></a>
+<span class="sourceLineNo">334</span>   * @param startKey Can be null<a name="line.334"></a>
+<span class="sourceLineNo">335</span>   * @param regionid Region id (Usually timestamp from when region was created).<a name="line.335"></a>
+<span class="sourceLineNo">336</span>   * @param newFormat should we create the region name in the new format<a name="line.336"></a>
+<span class="sourceLineNo">337</span>   *                  (such that it contains its encoded name?).<a name="line.337"></a>
+<span class="sourceLineNo">338</span>   * @return Region name made of passed tableName, startKey and id<a name="line.338"></a>
+<span class="sourceLineNo">339</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.339"></a>
+<span class="sourceLineNo">340</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], long, boolean)}.<a name="line.340"></a>
+<span class="sourceLineNo">341</span>   */<a name="line.341"></a>
+<span class="sourceLineNo">342</span>  @Deprecated<a name="line.342"></a>
+<span class="sourceLineNo">343</span>  @InterfaceAudience.Private<a name="line.343"></a>
+<span class="sourceLineNo">344</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.344"></a>
+<span class="sourceLineNo">345</span>      final byte [] startKey, final long regionid, boolean newFormat) {<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    return RegionInfo.createRegionName(tableName, startKey, Long.toString(regionid), newFormat);<a name="line.346"></a>
+<span class="sourceLineNo">347</span>  }<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>   * Make a region name of passed parameters.<a name="line.350"></a>
+<span class="sourceLineNo">351</span>   * @param tableName<a name="line.351"></a>
+<span class="sourceLineNo">352</span>   * @param startKey Can be null<a name="line.352"></a>
+<span class="sourceLineNo">353</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.353"></a>
+<span class="sourceLineNo">354</span>   * @param newFormat should we create the region name in the new format<a name="line.354"></a>
+<span class="sourceLineNo">355</span>   *                  (such that it contains its encoded name?).<a name="line.355"></a>
+<span class="sourceLineNo">356</span>   * @return Region name made of passed tableName, startKey and id<a name="line.356"></a>
+<span class="sourceLineNo">357</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.357"></a>
+<span class="sourceLineNo">358</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], String, boolean)}.<a name="line.358"></a>
+<span class="sourceLineNo">359</span>   */<a name="line.359"></a>
+<span class="sourceLineNo">360</span>  @Deprecated<a name="line.360"></a>
+<span class="sourceLineNo">361</span>  @InterfaceAudience.Private<a name="line.361"></a>
+<span class="sourceLineNo">362</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.362"></a>
+<span class="sourceLineNo">363</span>      final byte [] startKey, final String id, boolean newFormat) {<a name="line.363"></a>
+<span class="sourceLineNo">364</span>    return RegionInfo.createRegionName(tableName, startKey, Bytes.toBytes(id), newFormat);<a name="line.364"></a>
 <span class="sourceLineNo">365</span>  }<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>
@@ -377,866 +377,655 @@
 <span class="sourceLineNo">369</span>   * @param tableName<a name="line.369"></a>
 <span class="sourceLineNo">370</span>   * @param startKey Can be null<a name="line.370"></a>
 <span class="sourceLineNo">371</span>   * @param regionid Region id (Usually timestamp from when region was created).<a name="line.371"></a>
-<span class="sourceLineNo">372</span>   * @param newFormat should we create the region name in the new format<a name="line.372"></a>
-<span class="sourceLineNo">373</span>   *                  (such that it contains its encoded name?).<a name="line.373"></a>
-<span class="sourceLineNo">374</span>   * @return Region name made of passed tableName, startKey and id<a name="line.374"></a>
-<span class="sourceLineNo">375</span>   */<a name="line.375"></a>
-<span class="sourceLineNo">376</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.376"></a>
-<span class="sourceLineNo">377</span>      final byte [] startKey, final long regionid, boolean newFormat) {<a name="line.377"></a>
-<span class="sourceLineNo">378</span>    return createRegionName(tableName, startKey, Long.toString(regionid), newFormat);<a name="line.378"></a>
-<span class="sourceLineNo">379</span>  }<a name="line.379"></a>
-<span class="sourceLineNo">380</span><a name="line.380"></a>
-<span class="sourceLineNo">381</span>  /**<a name="line.381"></a>
-<span class="sourceLineNo">382</span>   * Make a region name of passed parameters.<a name="line.382"></a>
-<span class="sourceLineNo">383</span>   * @param tableName<a name="line.383"></a>
-<span class="sourceLineNo">384</span>   * @param startKey Can be null<a name="line.384"></a>
-<span class="sourceLineNo">385</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.385"></a>
-<span class="sourceLineNo">386</span>   * @param newFormat should we create the region name in the new format<a name="line.386"></a>
-<span class="sourceLineNo">387</span>   *                  (such that it contains its encoded name?).<a name="line.387"></a>
-<span class="sourceLineNo">388</span>   * @return Region name made of passed tableName, startKey and id<a name="line.388"></a>
-<span class="sourceLineNo">389</span>   */<a name="line.389"></a>
-<span class="sourceLineNo">390</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.390"></a>
-<span class="sourceLineNo">391</span>      final byte [] startKey, final String id, boolean newFormat) {<a name="line.391"></a>
-<span class="sourceLineNo">392</span>    return createRegionName(tableName, startKey, Bytes.toBytes(id), newFormat);<a name="line.392"></a>
-<span class="sourceLineNo">393</span>  }<a name="line.393"></a>
-<span class="sourceLineNo">394</span><a name="line.394"></a>
-<span class="sourceLineNo">395</span>  /**<a name="line.395"></a>
-<span class="sourceLineNo">396</span>   * Make a region name of passed parameters.<a name="line.396"></a>
-<span class="sourceLineNo">397</span>   * @param tableName<a name="line.397"></a>
-<span class="sourceLineNo">398</span>   * @param startKey Can be null<a name="line.398"></a>
-<span class="sourceLineNo">399</span>   * @param regionid Region id (Usually timestamp from when region was created).<a name="line.399"></a>
-<span class="sourceLineNo">400</span>   * @param replicaId<a name="line.400"></a>
-<span class="sourceLineNo">401</span>   * @param newFormat should we create the region name in the new format<a name="line.401"></a>
-<span class="sourceLineNo">402</span>   *                  (such that it contains its encoded name?).<a name="line.402"></a>
-<span class="sourceLineNo">403</span>   * @return Region name made of passed tableName, startKey, id and replicaId<a name="line.403"></a>
-<span class="sourceLineNo">404</span>   */<a name="line.404"></a>
-<span class="sourceLineNo">405</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.405"></a>
-<span class="sourceLineNo">406</span>      final byte [] startKey, final long regionid, int replicaId, boolean newFormat) {<a name="line.406"></a>
-<span class="sourceLineNo">407</span>    return createRegionName(tableName, startKey, Bytes.toBytes(Long.toString(regionid)),<a name="line.407"></a>
-<span class="sourceLineNo">408</span>        replicaId, newFormat);<a name="line.408"></a>
-<span class="sourceLineNo">409</span>  }<a name="line.409"></a>
-<span class="sourceLineNo">410</span><a name="line.410"></a>
-<span class="sourceLineNo">411</span>  /**<a name="line.411"></a>
-<span class="sourceLineNo">412</span>   * Make a region name of passed parameters.<a name="line.412"></a>
-<span class="sourceLineNo">413</span>   * @param tableName<a name="line.413"></a>
-<span class="sourceLineNo">414</span>   * @param startKey Can be null<a name="line.414"></a>
-<span class="sourceLineNo">415</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.415"></a>
-<span class="sourceLineNo">416</span>   * @param newFormat should we create the region name in the new format<a name="line.416"></a>
-<span class="sourceLineNo">417</span>   *                  (such that it contains its encoded name?).<a name="line.417"></a>
-<span class="sourceLineNo">418</span>   * @return Region name made of passed tableName, startKey and id<a name="line.418"></a>
-<span class="sourceLineNo">419</span>   */<a name="line.419"></a>
-<span class="sourceLineNo">420</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.420"></a>
-<span class="sourceLineNo">421</span>      final byte [] startKey, final byte [] id, boolean newFormat) {<a name="line.421"></a>
-<span class="sourceLineNo">422</span>    return createRegionName(tableName, startKey, id, DEFAULT_REPLICA_ID, newFormat);<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>   * Make a region name of passed parameters.<a name="line.425"></a>
-<span class="sourceLineNo">426</span>   * @param tableName<a name="line.426"></a>
-<span class="sourceLineNo">427</span>   * @param startKey Can be null<a name="line.427"></a>
-<span class="sourceLineNo">428</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.428"></a>
-<span class="sourceLineNo">429</span>   * @param replicaId<a name="line.429"></a>
-<span class="sourceLineNo">430</span>   * @param newFormat should we create the region name in the new format<a name="line.430"></a>
-<span class="sourceLineNo">431</span>   * @return Region name made of passed tableName, startKey, id and replicaId<a name="line.431"></a>
-<span class="sourceLineNo">432</span>   */<a name="line.432"></a>
-<span class="sourceLineNo">433</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.433"></a>
-<span class="sourceLineNo">434</span>      final byte [] startKey, final byte [] id, final int replicaId, boolean newFormat) {<a name="line.434"></a>
-<span class="sourceLineNo">435</span>    int len = tableName.getName().length + 2 + id.length +<a name="line.435"></a>
-<span class="sourceLineNo">436</span>        (startKey == null? 0: startKey.length);<a name="line.436"></a>
-<span class="sourceLineNo">437</span>    if (newFormat) {<a name="line.437"></a>
-<span class="sourceLineNo">438</span>      len += MD5_HEX_LENGTH + 2;<a name="line.438"></a>
-<span class="sourceLineNo">439</span>    }<a name="line.439"></a>
-<span class="sourceLineNo">440</span>    byte[] replicaIdBytes = null;<a name="line.440"></a>
-<span class="sourceLineNo">441</span>    // Special casing: replicaId is only appended if replicaId is greater than<a name="line.441"></a>
-<span class="sourceLineNo">442</span>    // 0. This is because all regions in meta would have to be migrated to the new<a name="line.442"></a>
-<span class="sourceLineNo">443</span>    // name otherwise<a name="line.443"></a>
-<span class="sourceLineNo">444</span>    if (replicaId &gt; 0) {<a name="line.444"></a>
-<span class="sourceLineNo">445</span>      // use string representation for replica id<a name="line.445"></a>
-<span class="sourceLineNo">446</span>      replicaIdBytes = Bytes.toBytes(String.format(REPLICA_ID_FORMAT, replicaId));<a name="line.446"></a>
-<span class="sourceLineNo">447</span>      len += 1 + replicaIdBytes.length;<a name="line.447"></a>
-<span class="sourceLineNo">448</span>    }<a name="line.448"></a>
-<span class="sourceLineNo">449</span><a name="line.449"></a>
-<span class="sourceLineNo">450</span>    byte [] b = new byte [len];<a name="line.450"></a>
-<span class="sourceLineNo">451</span><a name="line.451"></a>
-<span class="sourceLineNo">452</span>    int offset = tableName.getName().length;<a name="line.452"></a>
-<span class="sourceLineNo">453</span>    System.arraycopy(tableName.getName(), 0, b, 0, offset);<a name="line.453"></a>
-<span class="sourceLineNo">454</span>    b[offset++] = HConstants.DELIMITER;<a name="line.454"></a>
-<span class="sourceLineNo">455</span>    if (startKey != null &amp;&amp; startKey.length &gt; 0) {<a name="line.455"></a>
-<span class="sourceLineNo">456</span>      System.arraycopy(startKey, 0, b, offset, startKey.length);<a name="line.456"></a>
-<span class="sourceLineNo">457</span>      offset += startKey.length;<a name="line.457"></a>
-<span class="sourceLineNo">458</span>    }<a name="line.458"></a>
-<span class="sourceLineNo">459</span>    b[offset++] = HConstants.DELIMITER;<a name="line.459"></a>
-<span class="sourceLineNo">460</span>    System.arraycopy(id, 0, b, offset, id.length);<a name="line.460"></a>
-<span class="sourceLineNo">461</span>    offset += id.length;<a name="line.461"></a>
-<span class="sourceLineNo">462</span><a name="line.462"></a>
-<span class="sourceLineNo">463</span>    if (replicaIdBytes != null) {<a name="line.463"></a>
-<span class="sourceLineNo">464</span>      b[offset++] = REPLICA_ID_DELIMITER;<a name="line.464"></a>
-<span class="sourceLineNo">465</span>      System.arraycopy(replicaIdBytes, 0, b, offset, replicaIdBytes.length);<a name="line.465"></a>
-<span class="sourceLineNo">466</span>      offset += replicaIdBytes.length;<a name="line.466"></a>
-<span class="sourceLineNo">467</span>    }<a name="line.467"></a>
-<span class="sourceLineNo">468</span><a name="line.468"></a>
-<span class="sourceLineNo">469</span>    if (newFormat) {<a name="line.469"></a>
-<span class="sourceLineNo">470</span>      //<a name="line.470"></a>
-<span class="sourceLineNo">471</span>      // Encoded name should be built into the region name.<a name="line.471"></a>
-<span class="sourceLineNo">472</span>      //<a name="line.472"></a>
-<span class="sourceLineNo">473</span>      // Use the region name thus far (namely, &lt;tablename&gt;,&lt;startKey&gt;,&lt;id&gt;_&lt;replicaId&gt;)<a name="line.473"></a>
-<span class="sourceLineNo">474</span>      // to compute a MD5 hash to be used as the encoded name, and append<a name="line.474"></a>
-<span class="sourceLineNo">475</span>      // it to the byte buffer.<a name="line.475"></a>
-<span class="sourceLineNo">476</span>      //<a name="line.476"></a>
-<span class="sourceLineNo">477</span>      String md5Hash = MD5Hash.getMD5AsHex(b, 0, offset);<a name="line.477"></a>
-<span class="sourceLineNo">478</span>      byte [] md5HashBytes = Bytes.toBytes(md5Hash);<a name="line.478"></a>
-<span class="sourceLineNo">479</span><a name="line.479"></a>
-<span class="sourceLineNo">480</span>      if (md5HashBytes.length != MD5_HEX_LENGTH) {<a name="line.480"></a>
-<span class="sourceLineNo">481</span>        LOG.error("MD5-hash length mismatch: Expected=" + MD5_HEX_LENGTH +<a name="line.481"></a>
-<span class="sourceLineNo">482</span>                  "; Got=" + md5HashBytes.length);<a name="line.482"></a>
-<span class="sourceLineNo">483</span>      }<a name="line.483"></a>
-<span class="sourceLineNo">484</span><a name="line.484"></a>
-<span class="sourceLineNo">485</span>      // now append the bytes '.&lt;encodedName&gt;.' to the end<a name="line.485"></a>
-<span class="sourceLineNo">486</span>      b[offset++] = ENC_SEPARATOR;<a name="line.486"></a>
-<span class="sourceLineNo">487</span>      System.arraycopy(md5HashBytes, 0, b, offset, MD5_HEX_LENGTH);<a name="line.487"></a>
-<span class="sourceLineNo">488</span>      offset += MD5_HEX_LENGTH;<a name="line.488"></a>
-<span class="sourceLineNo">489</span>      b[offset++] = ENC_SEPARATOR;<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 b;<a name="line.492"></a>
-<span class="sourceLineNo">493</span>  }<a name="line.493"></a>
-<span class="sourceLineNo">494</span><a name="line.494"></a>
-<span class="sourceLineNo">495</span>  /**<a name="line.495"></a>
-<span class="sourceLineNo">496</span>   * Gets the table name from the specified region name.<a name="line.496"></a>
-<span class="sourceLineNo">497</span>   * @param regionName to extract the table name from<a name="line.497"></a>
-<span class="sourceLineNo">498</span>   * @return Table name<a name="line.498"></a>
-<span class="sourceLineNo">499</span>   */<a name="line.499"></a>
-<span class="sourceLineNo">500</span>  public static TableName getTable(final byte [] regionName) {<a name="line.500"></a>
-<span class="sourceLineNo">501</span>    int offset = -1;<a name="line.501"></a>
-<span class="sourceLineNo">502</span>    for (int i = 0; i &lt; regionName.length; i++) {<a name="line.502"></a>
-<span class="sourceLineNo">503</span>      if (regionName[i] == HConstants.DELIMITER) {<a name="line.503"></a>
-<span class="sourceLineNo">504</span>        offset = i;<a name="line.504"></a>
-<span class="sourceLineNo">505</span>        break;<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>    byte[] buff  = new byte[offset];<a name="line.508"></a>
-<span class="sourceLineNo">509</span>    System.arraycopy(regionName, 0, buff, 0, offset);<a name="line.509"></a>
-<span class="sourceLineNo">510</span>    return TableName.valueOf(buff);<a name="line.510"></a>
-<span class="sourceLineNo">511</span>  }<a name="line.511"></a>
-<span class="sourceLineNo">512</span><a name="line.512"></a>
-<span class="sourceLineNo">513</span>  /**<a name="line.513"></a>
-<span class="sourceLineNo">514</span>   * Gets the start key from the specified region name.<a name="line.514"></a>
-<span class="sourceLineNo">515</span>   * @param regionName<a name="line.515"></a>
-<span class="sourceLineNo">516</span>   * @return Start key.<a name="line.516"></a>
-<span class="sourceLineNo">517</span>   */<a name="line.517"></a>
-<span class="sourceLineNo">518</span>  public static byte[] getStartKey(final byte[] regionName) throws IOException {<a name="line.518"></a>
-<span class="sourceLineNo">519</span>    return parseRegionName(regionName)[1];<a name="line.519"></a>
+<span class="sourceLineNo">372</span>   * @param replicaId<a name="line.372"></a>
+<span class="sourceLineNo">373</span>   * @param newFormat should we create the region name in the new format<a name="line.373"></a>
+<span class="sourceLineNo">374</span>   *                  (such that it contains its encoded name?).<a name="line.374"></a>
+<span class="sourceLineNo">375</span>   * @return Region name made of passed tableName, startKey, id and replicaId<a name="line.375"></a>
+<span class="sourceLineNo">376</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.376"></a>
+<span class="sourceLineNo">377</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], long, int, boolean)}.<a name="line.377"></a>
+<span class="sourceLineNo">378</span>   */<a name="line.378"></a>
+<span class="sourceLineNo">379</span>  @Deprecated<a name="line.379"></a>
+<span class="sourceLineNo">380</span>  @InterfaceAudience.Private<a name="line.380"></a>
+<span class="sourceLineNo">381</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.381"></a>
+<span class="sourceLineNo">382</span>      final byte [] startKey, final long regionid, int replicaId, boolean newFormat) {<a name="line.382"></a>
+<span class="sourceLineNo">383</span>    return RegionInfo.createRegionName(tableName, startKey, Bytes.toBytes(Long.toString(regionid)),<a name="line.383"></a>
+<span class="sourceLineNo">384</span>        replicaId, newFormat);<a name="line.384"></a>
+<span class="sourceLineNo">385</span>  }<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>   * Make a region name of passed parameters.<a name="line.388"></a>
+<span class="sourceLineNo">389</span>   * @param tableName<a name="line.389"></a>
+<span class="sourceLineNo">390</span>   * @param startKey Can be null<a name="line.390"></a>
+<span class="sourceLineNo">391</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.391"></a>
+<span class="sourceLineNo">392</span>   * @param newFormat should we create the region name in the new format<a name="line.392"></a>
+<span class="sourceLineNo">393</span>   *                  (such that it contains its encoded name?).<a name="line.393"></a>
+<span class="sourceLineNo">394</span>   * @return Region name made of passed tableName, startKey and id<a name="line.394"></a>
+<span class="sourceLineNo">395</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.395"></a>
+<span class="sourceLineNo">396</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], byte[], boolean)}.<a name="line.396"></a>
+<span class="sourceLineNo">397</span>   */<a name="line.397"></a>
+<span class="sourceLineNo">398</span>  @Deprecated<a name="line.398"></a>
+<span class="sourceLineNo">399</span>  @InterfaceAudience.Private<a name="line.399"></a>
+<span class="sourceLineNo">400</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.400"></a>
+<span class="sourceLineNo">401</span>      final byte [] startKey, final byte [] id, boolean newFormat) {<a name="line.401"></a>
+<span class="sourceLineNo">402</span>    return RegionInfo.createRegionName(tableName, startKey, id, DEFAULT_REPLICA_ID, newFormat);<a name="line.402"></a>
+<span class="sourceLineNo">403</span>  }<a name="line.403"></a>
+<span class="sourceLineNo">404</span>  /**<a name="line.404"></a>
+<span class="sourceLineNo">405</span>   * Make a region name of passed parameters.<a name="line.405"></a>
+<span class="sourceLineNo">406</span>   * @param tableName<a name="line.406"></a>
+<span class="sourceLineNo">407</span>   * @param startKey Can be null<a name="line.407"></a>
+<span class="sourceLineNo">408</span>   * @param id Region id (Usually timestamp from when region was created).<a name="line.408"></a>
+<span class="sourceLineNo">409</span>   * @param replicaId<a name="line.409"></a>
+<span class="sourceLineNo">410</span>   * @param newFormat should we create the region name in the new format<a name="line.410"></a>
+<span class="sourceLineNo">411</span>   * @return Region name made of passed tableName, startKey, id and replicaId<a name="line.411"></a>
+<span class="sourceLineNo">412</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.412"></a>
+<span class="sourceLineNo">413</span>   *             Use {@link RegionInfo#createRegionName(TableName, byte[], byte[], int, boolean)}.<a name="line.413"></a>
+<span class="sourceLineNo">414</span>   */<a name="line.414"></a>
+<span class="sourceLineNo">415</span>  @Deprecated<a name="line.415"></a>
+<span class="sourceLineNo">416</span>  @InterfaceAudience.Private<a name="line.416"></a>
+<span class="sourceLineNo">417</span>  public static byte [] createRegionName(final TableName tableName,<a name="line.417"></a>
+<span class="sourceLineNo">418</span>      final byte [] startKey, final byte [] id, final int replicaId, boolean newFormat) {<a name="line.418"></a>
+<span class="sourceLineNo">419</span>    return RegionInfo.createRegionName(tableName, startKey, id, replicaId, newFormat);<a name="line.419"></a>
+<span class="sourceLineNo">420</span>  }<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>   * Gets the table name from the specified region name.<a name="line.423"></a>
+<span class="sourceLineNo">424</span>   * @param regionName to extract the table name from<a name="line.424"></a>
+<span class="sourceLineNo">425</span>   * @return Table name<a name="line.425"></a>
+<span class="sourceLineNo">426</span>   * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0<a name="line.426"></a>
+<span class="sourceLineNo">427</span>   *             Use {@link org.apache.hadoop.hbase.client.RegionInfo#getTable(byte[])}.<a name="line.427"></a>
+<span class="sourceLineNo">428</span>   */<a name="line.428"></a>
+<span class="sourceLineNo">429</span>  @Deprecated<a name="line.429"></a>
+<span class="sourceLineNo">430</span>  public static TableName getTable(final byte [] regionName) {<a name="line.430"></a>
+<span class="sourceLineNo">431</span>    return RegionInfo.getTable(regionName);<a name="line.431"></a>
+<span class="sourceLineNo">432</span>  }<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>   * Gets the start

<TRUNCATED>

Mime
View raw message