Class TestStochasticBalancerJmxMetrics
java.lang.Object
org.apache.hadoop.hbase.master.balancer.BalancerTestBase
org.apache.hadoop.hbase.master.balancer.TestStochasticBalancerJmxMetrics
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
BalancerTestBase.MockMapping
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static org.apache.hadoop.conf.Configuration
private static int
private static org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancer
private static final org.slf4j.Logger
private static int[]
a simple cluster for testing JMX.private static int[]
private static int[]
private static int[]
private static final String
private static final String
private static final String
private static HBaseTestingUtil
Fields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, largeCluster, regionId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetExpectedJmxMetrics
(String[] tableNames, String[] functionNames) Given the tables and functions, return metrics names that should exist in JMXRead the attributes from Hadoop->HBase->Master->Balancer in JMXstatic void
Setup the environment for the test.static void
void
In Ensemble mode, there should be only one ensemble tablevoid
In per-table mode, each table has a set of metricsMethods inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, convertToList, createRegions, createServerMap, mockCluster, mockClusterServers, mockClusterServers, mockClusterServers, mockClusterServersUnsorted, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, uniformRegions, updateLoad
-
Field Details
-
CLASS_RULE
-
LOG
-
UTIL
-
connectorPort
-
loadBalancer
-
mockCluster_ensemble
a simple cluster for testing JMX. -
mockCluster_pertable_1
-
mockCluster_pertable_2
-
mockCluster_pertable_namespace
-
TABLE_NAME_1
- See Also:
-
TABLE_NAME_2
- See Also:
-
TABLE_NAME_NAMESPACE
- See Also:
-
conf
-
-
Constructor Details
-
TestStochasticBalancerJmxMetrics
public TestStochasticBalancerJmxMetrics()
-
-
Method Details
-
setupBeforeClass
Setup the environment for the test.- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
testJmxMetrics_EnsembleMode
In Ensemble mode, there should be only one ensemble table- Throws:
Exception
-
testJmxMetrics_PerTableMode
In per-table mode, each table has a set of metrics- Throws:
Exception
-
readJmxMetricsWithRetry
- Throws:
IOException
-
readJmxMetrics
Read the attributes from Hadoop->HBase->Master->Balancer in JMX- Throws:
IOException
-
getExpectedJmxMetrics
Given the tables and functions, return metrics names that should exist in JMX
-