private static int generateHashCode(final TableName tableName, final byte[] startKey,
    final byte[] endKey, final long regionId, final int replicaId, boolean offLine,
    byte[] regionName) {
    int result = Arrays.hashCode(regionName);
    result = (int) (result ^ regionId);
    result ^= Arrays.hashCode(checkStartKey(startKey));
    result ^= Arrays.hashCode(checkEndKey(endKey));
    result ^= Boolean.valueOf(offLine).hashCode();
    result ^= Arrays.hashCode(tableName.getName());
    result ^= replicaId;
    return result;
  }
The new format for a region name contains its encodedName at the end. The encoded name also
serves as the directory name for the region in the filesystem. New region name format:
&lt;tablename>,,&lt;startkey>,&lt;regionIdTimestamp>.&lt;encodedName>. where, &lt;encodedName>
is a hex version of the MD5 hash of &lt;tablename>,&lt;startkey>,&lt;regionIdTimestamp> The old
region name format: &lt;tablename>,&lt;startkey>,&lt;regionIdTimestamp> For region names in the
old format, the encoded name is a 32-bit JenkinsHash integer value (in its decimal notation,
string form).
<p>
**NOTE** The first hbase:meta region, and regions created by an older version of HBase (0.20 or
prior) will continue to use the old region name format.
hbase-client/src/main/java/org/apache/hadoop/hbase/client/MutableRegionInfo.java