@InterfaceAudience.Private class RegionGroupingProvider extends Object implements WALProvider
RegionGroupingProvider.RegionGroupingStrategy and can be configured via the
property "hbase.wal.regiongrouping.strategy". Current strategy choices are
WALFactory) and defaults to the defaultProvider.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
RegionGroupingProvider.IdentityGroupingStrategy |
static interface |
RegionGroupingProvider.RegionGroupingStrategy
Map identifiers to a group number.
|
(package private) static class |
RegionGroupingProvider.Strategies
Maps between configuration names for strategies and implementation classes.
|
WALProvider.Writer| Modifier and Type | Field and Description |
|---|---|
protected ConcurrentMap<byte[],WALProvider> |
cached |
(package private) static String |
DEFAULT_DELEGATE_PROVIDER |
private static String |
DEFAULT_REGION_GROUPING_STRATEGY |
(package private) static String |
DELEGATE_PROVIDER |
private WALFactory |
factory |
private List<WALActionsListener> |
listeners |
private static org.apache.commons.logging.Log |
LOG |
private String |
providerId |
private static String |
REGION_GROUPING_STRATEGY |
protected RegionGroupingProvider.RegionGroupingStrategy |
strategy |
| Constructor and Description |
|---|
RegionGroupingProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
shutdown utstanding WALs and clean up any persisted state.
|
(package private) RegionGroupingProvider.RegionGroupingStrategy |
getStrategy(org.apache.hadoop.conf.Configuration conf,
String key,
String defaultValue)
instantiate a strategy from a config property.
|
WAL |
getWAL(byte[] identifier) |
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.
|
private static final org.apache.commons.logging.Log LOG
private static final String REGION_GROUPING_STRATEGY
private static final String DEFAULT_REGION_GROUPING_STRATEGY
static final String DELEGATE_PROVIDER
static final String DEFAULT_DELEGATE_PROVIDER
protected final ConcurrentMap<byte[],WALProvider> cached
protected RegionGroupingProvider.RegionGroupingStrategy strategy
private WALFactory factory
private List<WALActionsListener> listeners
private String providerId
RegionGroupingProvider.RegionGroupingStrategy getStrategy(org.apache.hadoop.conf.Configuration conf, String key, String defaultValue) throws IOException
IOExceptionpublic void init(WALFactory factory, org.apache.hadoop.conf.Configuration conf, List<WALActionsListener> listeners, String providerId) throws IOException
WALProviderinit in interface WALProviderfactory - factory that made us may not be nullconf - may not be nulllisteners - may be nullproviderId - differentiate between providers from one factory. may be nullIOExceptionWALProvider populateCache(byte[] group) throws IOException
IOExceptionpublic WAL getWAL(byte[] identifier) throws IOException
getWAL in interface WALProvideridentifier - may not be null. contents will not be altered.IOExceptionpublic void shutdown()
throws IOException
WALProvidershutdown in interface WALProviderIOExceptionpublic void close()
throws IOException
WALProviderclose in interface WALProviderIOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.