@InterfaceAudience.Private public class RegionGroupingProvider extends Object implements WALProvider
DELEGATE_PROVIDER
Region grouping is handled via RegionGroupingProvider.RegionGroupingStrategy and can be configured via the
property "hbase.wal.regiongrouping.strategy". Current strategy choices are
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
RegionGroupingProvider.RegionGroupingStrategy
Map identifiers to a group number.
|
WALProvider.AsyncWriter, WALProvider.Writer, WALProvider.WriterBase| 限定符和类型 | 字段和说明 |
|---|---|
static String |
DEFAULT_DELEGATE_PROVIDER |
static String |
DEFAULT_REGION_GROUPING_STRATEGY |
static String |
DELEGATE_PROVIDER
delegate provider for WAL creation/roll/close
|
static String |
REGION_GROUPING_STRATEGY |
| 构造器和说明 |
|---|
RegionGroupingProvider() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addWALActionsListener(WALActionsListener listener)
Add a
WALActionsListener. |
void |
close()
shutdown utstanding WALs and clean up any persisted state.
|
long |
getLogFileSize()
Get size of the log files this provider is managing
|
long |
getNumLogFiles()
Get number of the log files this provider is managing
|
WAL |
getWAL(RegionInfo region) |
List<WAL> |
getWALs() |
void |
init(WALFactory factory,
org.apache.hadoop.conf.Configuration conf,
String providerId)
Set up the provider to create wals. will only be called once per instance.
|
void |
shutdown()
persist outstanding WALs to storage and stop accepting new appends.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWALFileLengthProviderpublic static final String DEFAULT_REGION_GROUPING_STRATEGY
public static final String DELEGATE_PROVIDER
public static final String DEFAULT_DELEGATE_PROVIDER
public void init(WALFactory factory, org.apache.hadoop.conf.Configuration conf, String providerId) throws IOException
WALProviderinit 在接口中 WALProviderfactory - factory that made us may not be nullconf - may not be nullproviderId - differentiate between providers from one factory. may be nullIOExceptionpublic List<WAL> getWALs()
getWALs 在接口中 WALProviderpublic WAL getWAL(RegionInfo region) throws IOException
getWAL 在接口中 WALProviderregion - the region which we want to get a WAL for it. Could be null.IOExceptionpublic void shutdown()
throws IOException
WALProvidershutdown 在接口中 WALProviderIOExceptionpublic void close()
throws IOException
WALProviderclose 在接口中 WALProviderIOExceptionpublic long getNumLogFiles()
WALProvidergetNumLogFiles 在接口中 WALProviderpublic long getLogFileSize()
WALProvidergetLogFileSize 在接口中 WALProviderpublic void addWALActionsListener(WALActionsListener listener)
WALProviderWALActionsListener.
Notice that you must call this method before calling WALProvider.getWAL(RegionInfo) as this method
will not effect the WAL which has already been created. And as long as we can only it
when initialization, it is not thread safe.
addWALActionsListener 在接口中 WALProviderCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.