You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (Jira)" <ji...@apache.org> on 2022/08/03 14:50:00 UTC

[jira] [Created] (HBASE-27269) The implementation of TestReplicationStatus.waitOnMetricsReport is incorrect

Duo Zhang created HBASE-27269:
---------------------------------

             Summary: The implementation of TestReplicationStatus.waitOnMetricsReport is incorrect
                 Key: HBASE-27269
                 URL: https://issues.apache.org/jira/browse/HBASE-27269
             Project: HBase
          Issue Type: Bug
          Components: Replication, test
            Reporter: Duo Zhang


{code}
  private List<ReplicationLoadSource> waitOnMetricsReport(int greaterThan, ServerName serverName)
    throws IOException {
    ClusterMetrics metrics = hbaseAdmin.getClusterMetrics(EnumSet.of(Option.LIVE_SERVERS));
    List<ReplicationLoadSource> list =
      metrics.getLiveServerMetrics().get(serverName).getReplicationLoadSourceList();
    while (list.size() <= greaterThan) {
      Threads.sleep(1000);
    }
    return list;
  }
{code}

Obviously the while loop is just a dummy one as the list will not be updated in the loop...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)