@InterfaceAudience.Private public class BoundedRegionGroupingProvider extends RegionGroupingProvider
RegionGroupingProvider
.RegionGroupingProvider.IdentityGroupingStrategy, RegionGroupingProvider.RegionGroupingStrategy, RegionGroupingProvider.Strategies
WALProvider.Writer
Modifier and Type | Field and Description |
---|---|
private AtomicInteger |
counter |
(package private) static int |
DEFAULT_NUM_REGION_GROUPS |
private WALProvider[] |
delegates |
private static org.apache.commons.logging.Log |
LOG |
(package private) static String |
NUM_REGION_GROUPS |
cached, DEFAULT_DELEGATE_PROVIDER, DELEGATE_PROVIDER, strategy
Constructor and Description |
---|
BoundedRegionGroupingProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close()
shutdown utstanding WALs and clean up any persisted state.
|
static long |
getLogFileSize(WALFactory walFactory)
iff the given WALFactory is using the BoundedRegionGroupingProvider for meta and/or non-meta,
count the size of files (rolled and active).
|
static long |
getNumLogFiles(WALFactory walFactory)
iff the given WALFactory is using the BoundedRegionGroupingProvider for meta and/or non-meta,
count the number of files (rolled and active).
|
void |
init(WALFactory factory,
org.apache.hadoop.conf.Configuration conf,
List<WALActionsListener> listeners,
String providerId)
Set up the provider to create wals.
|
(package private) WALProvider |
populateCache(byte[] group)
Populate the cache for this group.
|
void |
shutdown()
persist outstanding WALs to storage and stop accepting new appends.
|
getStrategy, getWAL
private static final org.apache.commons.logging.Log LOG
static final String NUM_REGION_GROUPS
static final int DEFAULT_NUM_REGION_GROUPS
private WALProvider[] delegates
private AtomicInteger counter
public void init(WALFactory factory, org.apache.hadoop.conf.Configuration conf, List<WALActionsListener> listeners, String providerId) throws IOException
WALProvider
init
in interface WALProvider
init
in class RegionGroupingProvider
factory
- factory that made us may not be nullconf
- may not be nulllisteners
- may be nullproviderId
- differentiate between providers from one factory. may be nullIOException
WALProvider populateCache(byte[] group)
RegionGroupingProvider
populateCache
in class RegionGroupingProvider
public void shutdown() throws IOException
WALProvider
shutdown
in interface WALProvider
shutdown
in class RegionGroupingProvider
IOException
public void close() throws IOException
WALProvider
close
in interface WALProvider
close
in class RegionGroupingProvider
IOException
public static long getNumLogFiles(WALFactory walFactory)
walFactory
- may not be null.public static long getLogFileSize(WALFactory walFactory)
walFactory
- may not be null.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.