Search in sources :

Example 6 with ExecutorService

use of org.apache.hadoop.hbase.executor.ExecutorService in project hbase by apache.

the class TestReplicateToReplica method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() {
    Configuration conf = UTIL.getConfiguration();
    conf.setInt("hbase.region.read-replica.sink.flush.min-interval.secs", 1);
    conf.setBoolean(ServerRegionReplicaUtil.REGION_REPLICA_REPLICATION_CONF_KEY, true);
    conf.setBoolean(ServerRegionReplicaUtil.REGION_REPLICA_REPLICATION_CATALOG_CONF_KEY, true);
    conf.setClass(HConstants.REGION_IMPL, HRegionForTest.class, HRegion.class);
    EXEC = new ExecutorService("test");
    EXEC.startExecutorService(EXEC.new ExecutorConfig().setCorePoolSize(1).setExecutorType(ExecutorType.RS_COMPACTED_FILES_DISCHARGER));
    ChunkCreator.initialize(MemStoreLAB.CHUNK_SIZE_DEFAULT, false, 0, 0, 0, null, MemStoreLAB.INDEX_CHUNK_SIZE_PERCENTAGE_DEFAULT);
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) ExecutorService(org.apache.hadoop.hbase.executor.ExecutorService) BeforeClass(org.junit.BeforeClass)

Aggregations

ExecutorService (org.apache.hadoop.hbase.executor.ExecutorService)6 Before (org.junit.Before)3 ArrayList (java.util.ArrayList)2 Configuration (org.apache.hadoop.conf.Configuration)2 Path (org.apache.hadoop.fs.Path)2 ExecutorConfig (org.apache.hadoop.hbase.executor.ExecutorService.ExecutorConfig)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 HBaseConfiguration (org.apache.hadoop.hbase.HBaseConfiguration)1 HColumnDescriptor (org.apache.hadoop.hbase.HColumnDescriptor)1 HRegionInfo (org.apache.hadoop.hbase.HRegionInfo)1 HTableDescriptor (org.apache.hadoop.hbase.HTableDescriptor)1 TableDescriptorBuilder (org.apache.hadoop.hbase.client.TableDescriptorBuilder)1 TestEventHandler (org.apache.hadoop.hbase.executor.TestExecutorService.TestEventHandler)1 MetricsRegionServerSource (org.apache.hadoop.hbase.regionserver.MetricsRegionServerSource)1 MetricsRegionServerSourceFactory (org.apache.hadoop.hbase.regionserver.MetricsRegionServerSourceFactory)1 MetricsRegionServerSourceImpl (org.apache.hadoop.hbase.regionserver.MetricsRegionServerSourceImpl)1 WALFactory (org.apache.hadoop.hbase.wal.WALFactory)1 ZKWatcher (org.apache.hadoop.hbase.zookeeper.ZKWatcher)1 BeforeClass (org.junit.BeforeClass)1