Class TestReplicationStatus

java.lang.Object
org.apache.hadoop.hbase.replication.TestReplicationBase
org.apache.hadoop.hbase.replication.TestReplicationStatus

  • Field Details

  • Constructor Details

  • Method Details

    • insertRowsOnSource

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

      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