static void updateStats(Optional<ServerStatisticTracker> optStats,
    Optional<MetricsConnection> optMetrics, ServerName serverName, MultiResponse resp) {
    if (!optStats.isPresent() && !optMetrics.isPresent()) {
      // ServerStatisticTracker and MetricsConnection are both not present, just return
      return;
    }
    resp.getResults().forEach((regionName, regionResult) -> {
      ClientProtos.RegionLoadStats stat = regionResult.getStat();
      if (stat == null) {
        if (LOG.isDebugEnabled()) {
          LOG.debug("No ClientProtos.RegionLoadStats found for server={}, region={}", serverName,
            Bytes.toStringBinary(regionName));
        }
        return;
      }
      RegionLoadStats regionLoadStats = ProtobufUtil.createRegionLoadStats(stat);
      optStats.ifPresent(
        stats -> ResultStatsUtil.updateStats(stats, serverName, regionName, regionLoadStats));
      optMetrics.ifPresent(
        metrics -> ResultStatsUtil.updateStats(metrics, serverName, regionName, regionLoadStats));
    });
  }
Select the priority for the rpc call.
<p/>
The rules are:
<ol>
<li>If user set a priority explicitly, then just use it.</li>
<li>For system table, use {@link HConstants#SYSTEMTABLE_QOS}.</li>
<li>For other tables, use {@link HConstants#NORMAL_QOS}.</li>
</ol>
@param priority  the priority set by user, can be {@link HConstants#PRIORITY_UNSET}.
@param tableName the table we operate on
hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionUtils.java