Class TestReplicationStatus


@Tag("org.apache.hadoop.hbase.testclassification.ReplicationTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests") public class TestReplicationStatus extends TestReplicationBase
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
  • Constructor Details

  • Method Details

    • insertRowsOnSource

      static void insertRowsOnSource() throws IOException
      Throws:
      IOException
    • testReplicationStatus

      @Test public void testReplicationStatus() throws Exception
      Test for HBASE-9531.

      put a few rows into htable1, which should be replicated to htable2
      create a ClusterStatus instance 'status' from HBaseAdmin
      test : status.getLoad(server).getReplicationLoadSourceList()
      test : status.getLoad(server).getReplicationLoadSink()

      Throws:
      Exception
    • waitOnMetricsReport

      private List<org.apache.hadoop.hbase.replication.ReplicationLoadSource> waitOnMetricsReport(int greaterThan, org.apache.hadoop.hbase.ServerName serverName) throws Exception
      Wait until Master shows metrics counts for ReplicationLoadSourceList that are greater than greaterThan for serverName before returning. We want to avoid case where RS hasn't yet updated Master before allowing test proceed.
      Parameters:
      greaterThan - size of replicationLoadSourceList must be greater before we proceed
      Throws:
      Exception