public class TestStochasticBalancerJmxMetrics extends BalancerTestBase
BalancerTestBase.MockMapping
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.conf.Configuration |
conf |
private static int |
connectorPort |
private static org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer |
loadBalancer |
private static org.slf4j.Logger |
LOG |
private static int[] |
mockCluster_ensemble
a simple cluster for testing JMX.
|
private static int[] |
mockCluster_pertable_1 |
private static int[] |
mockCluster_pertable_2 |
private static int[] |
mockCluster_pertable_namespace |
private static String |
TABLE_NAME_1 |
private static String |
TABLE_NAME_2 |
private static String |
TABLE_NAME_NAMESPACE |
private static HBaseTestingUtility |
UTIL |
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, dummyMetricsStochasticBalancer, largeCluster, regionId
Constructor and Description |
---|
TestStochasticBalancerJmxMetrics() |
Modifier and Type | Method and Description |
---|---|
private Set<String> |
getExpectedJmxMetrics(String[] tableNames,
String[] functionNames)
Given the tables and functions, return metrics names that should exist in JMX
|
private Set<String> |
readJmxMetrics()
Read the attributes from Hadoop->HBase->Master->Balancer in JMX n
|
private Set<String> |
readJmxMetricsWithRetry() |
static void |
setupBeforeClass()
Setup the environment for the test.
|
static void |
tearDownAfterClass() |
void |
testJmxMetrics_EnsembleMode()
In Ensemble mode, there should be only one ensemble table
|
void |
testJmxMetrics_PerTableMode()
In per-table mode, each table has a set of metrics
|
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, beforeAllTests, convertToList, createRegions, createServerMap, mockCluster, mockClusterServers, mockClusterServers, mockClusterServers, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, testWithCluster, testWithCluster, testWithClusterWithIteration, testWithClusterWithIteration, uniformRegions, updateLoad
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static HBaseTestingUtility UTIL
private static int connectorPort
private static org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer loadBalancer
private static int[] mockCluster_ensemble
private static int[] mockCluster_pertable_1
private static int[] mockCluster_pertable_2
private static int[] mockCluster_pertable_namespace
private static final String TABLE_NAME_1
private static final String TABLE_NAME_2
private static final String TABLE_NAME_NAMESPACE
private static org.apache.hadoop.conf.Configuration conf
public TestStochasticBalancerJmxMetrics()
public static void setupBeforeClass() throws Exception
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void testJmxMetrics_EnsembleMode() throws Exception
Exception
public void testJmxMetrics_PerTableMode() throws Exception
Exception
private Set<String> readJmxMetricsWithRetry() throws IOException
IOException
private Set<String> readJmxMetrics() throws IOException
IOException
private Set<String> getExpectedJmxMetrics(String[] tableNames, String[] functionNames)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.