public class TestRegionNormalizerManagerConfigurationObserver extends Object
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.hbase.master.normalizer.RegionNormalizerChore |
chore |
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.conf.Configuration |
conf |
private org.apache.hadoop.hbase.conf.ConfigurationManager |
configurationManager |
private org.apache.hadoop.hbase.master.MasterServices |
masterServices |
private org.apache.hadoop.hbase.master.normalizer.SimpleRegionNormalizer |
normalizer |
private org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorkQueue<org.apache.hadoop.hbase.TableName> |
queue |
private static Pattern |
rateLimitPattern |
private static HBaseTestingUtility |
testUtil |
private org.apache.hadoop.hbase.zookeeper.RegionNormalizerTracker |
tracker |
private org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorker |
worker |
Constructor and Description |
---|
TestRegionNormalizerManagerConfigurationObserver() |
Modifier and Type | Method and Description |
---|---|
void |
before() |
private static long |
parseConfiguredRateLimit(org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter rateLimiter)
The
RateLimiter class does not publicly expose its currently configured rate. |
void |
test() |
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtility testUtil
private static final Pattern rateLimitPattern
private org.apache.hadoop.conf.Configuration conf
private org.apache.hadoop.hbase.master.normalizer.SimpleRegionNormalizer normalizer
@Mock private org.apache.hadoop.hbase.master.MasterServices masterServices
@Mock private org.apache.hadoop.hbase.zookeeper.RegionNormalizerTracker tracker
@Mock private org.apache.hadoop.hbase.master.normalizer.RegionNormalizerChore chore
@Mock private org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorkQueue<org.apache.hadoop.hbase.TableName> queue
private org.apache.hadoop.hbase.master.normalizer.RegionNormalizerWorker worker
private org.apache.hadoop.hbase.conf.ConfigurationManager configurationManager
public TestRegionNormalizerManagerConfigurationObserver()
public void before()
public void test()
private static long parseConfiguredRateLimit(org.apache.hbase.thirdparty.com.google.common.util.concurrent.RateLimiter rateLimiter)
RateLimiter
class does not publicly expose its currently configured rate. It does
offer this information in the RateLimiter.toString()
method. It's fragile, but parse
this value. The alternative would be to track the value explicitly in the worker, and the
associated coordination overhead paid at runtime. See the related note on
RegionNormalizerWorker.getRateLimiter()
.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.