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
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.conf.Configurationprivate static intprivate static org.apache.hadoop.hbase.master.balancer.StochasticLoadBalancerprivate static final org.slf4j.Loggerprivate static int[]a simple cluster for testing JMX.private static int[]private static int[]private static int[]private static final Stringprivate static final Stringprivate static final Stringprivate static HBaseTestingUtilityFields inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
clusterStateMocks, clusterStateMocksWithNoSlop, clusterStateMocksWithSlop, dummyMetricsStochasticBalancer, largeCluster, regionId -
Constructor Summary
Constructors -
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 voidSetup the environment for the test.static voidvoidIn Ensemble mode, there should be only one ensemble tablevoidIn per-table mode, each table has a set of metricsMethods inherited from class org.apache.hadoop.hbase.master.balancer.BalancerTestBase
assertClusterAsBalanced, assertClusterOverallAsBalanced, assertRegionReplicaPlacement, beforeAllTests, convertToList, createRegions, createServerMap, mockCluster, mockClusterServers, mockClusterServers, mockClusterServers, mockClusterServersUnsorted, mockClusterServersWithTables, mockUniformClusterServers, printMock, printStats, randomRegions, randomRegions, randomServer, randomServers, reconcile, returnRegions, returnServer, returnServers, testWithCluster, testWithCluster, testWithClusterWithIteration, testWithClusterWithIteration, 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
-