Package org.apache.hadoop.hbase.regionserver

Examples of org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapperStub


  public MetricsAssertHelper HELPER = CompatibilityFactory.getInstance(MetricsAssertHelper.class);

  @Test
  public void testWrapperSource() {
    MetricsRegionServer rsm = new MetricsRegionServer(new MetricsRegionServerWrapperStub());
    MetricsRegionServerSource serverSource = rsm.getMetricsSource();
    HELPER.assertTag("serverName", "test", serverSource);
    HELPER.assertTag("clusterId", "tClusterId", serverSource);
    HELPER.assertTag("zookeeperQuorum", "zk", serverSource);
    HELPER.assertGauge("regionServerStartTime", 100, serverSource);
View Full Code Here


    HELPER.assertCounter("updatesBlockedTime", 419, serverSource);
  }

  @Test
  public void testConstuctor() {
    MetricsRegionServer rsm = new MetricsRegionServer(new MetricsRegionServerWrapperStub());
    assertNotNull("There should be a hadoop1/hadoop2 metrics source", rsm.getMetricsSource() );
    assertNotNull("The RegionServerMetricsWrapper should be accessable", rsm.getRegionServerWrapper());
  }
View Full Code Here

    assertNotNull("The RegionServerMetricsWrapper should be accessable", rsm.getRegionServerWrapper());
  }

  @Test
  public void testSlowCount() {
    MetricsRegionServer rsm = new MetricsRegionServer(new MetricsRegionServerWrapperStub());
    MetricsRegionServerSource serverSource = rsm.getMetricsSource();
    for (int i=0; i < 12; i ++) {
      rsm.updateAppend(12);
      rsm.updateAppend(1002);
    }
View Full Code Here

    MasterAddressTracker tracker = Mockito.mock(MasterAddressTracker.class);
    Mockito.doReturn(tracker).when(master).getMasterAddressTracker();
    Mockito.doReturn(FAKE_HOST).when(tracker).getMasterAddress();

    MetricsRegionServer rms = Mockito.mock(MetricsRegionServer.class);
    Mockito.doReturn(new MetricsRegionServerWrapperStub()).when(rms).getRegionServerWrapper();
    Mockito.doReturn(rms).when(master).getRegionServerMetrics();

    // Mock admin
    admin = Mockito.mock(HBaseAdmin.class);
  }
View Full Code Here

    MasterAddressTracker tracker = Mockito.mock(MasterAddressTracker.class);
    Mockito.doReturn(tracker).when(master).getMasterAddressTracker();
    Mockito.doReturn(FAKE_HOST).when(tracker).getMasterAddress();

    MetricsRegionServer rms = Mockito.mock(MetricsRegionServer.class);
    Mockito.doReturn(new MetricsRegionServerWrapperStub()).when(rms).getRegionServerWrapper();
    Mockito.doReturn(rms).when(master).getRegionServerMetrics();

    // Mock admin
    admin = Mockito.mock(HBaseAdmin.class);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapperStub

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.