private static void updateLocation(Connection connection, RegionInfo regionInfo, ServerName sn,
    long openSeqNum, long masterSystemTime) throws IOException {
    // region replicas are kept in the primary region's row
    Put put = new Put(CatalogFamilyFormat.getMetaKeyForRegion(regionInfo), masterSystemTime);
    addRegionInfo(put, regionInfo);
    addLocation(put, sn, openSeqNum, regionInfo.getReplicaId());
    putToMetaTable(connection, put);
    LOG.info("Updated row {} with server=", regionInfo.getRegionNameAsString(), sn);
  }
Updates the location of the specified region to be the specified server.
<p>
Connects to the specified server which should be hosting the specified catalog region name to
perform the edit.
@param connection       connection we're using
@param regionInfo       region to update location of
@param sn               Server name
@param openSeqNum       the latest sequence number obtained when the region was open
@param masterSystemTime wall clock time from master if passed in the open region RPC
@throws IOException In particular could throw {@link java.net.ConnectException} if the server
                    is down on other end.
hbase-server/src/main/java/org/apache/hadoop/hbase/MetaTableAccessor.java