@InterfaceAudience.Private public class BoundedRegionGroupingProvider extends Object
RegionGroupingProvider
.Modifier and Type | Class and Description |
---|---|
static interface |
org.apache.hadoop.hbase.wal.RegionGroupingProvider.RegionGroupingStrategy
Map identifiers to a group number.
|
WALProvider.Writer
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap<byte[],WALProvider> |
cached |
protected org.apache.hadoop.hbase.wal.RegionGroupingProvider.RegionGroupingStrategy |
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).
|
WAL |
getWAL(byte[] identifier) |
void |
init(WALFactory factory,
Configuration conf,
List<WALActionsListener> listeners,
String providerId)
Set up the provider to create wals.
|
void |
shutdown()
persist outstanding WALs to storage and stop accepting new appends.
|
protected final ConcurrentMap<byte[],WALProvider> cached
protected org.apache.hadoop.hbase.wal.RegionGroupingProvider.RegionGroupingStrategy strategy
public void init(WALFactory factory, Configuration conf, List<WALActionsListener> listeners, String providerId) throws IOException
WALProvider
init
in interface WALProvider
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
public void shutdown() throws IOException
WALProvider
shutdown
in interface WALProvider
IOException
public void close() throws IOException
WALProvider
close
in interface WALProvider
IOException
public static long getNumLogFiles(WALFactory walFactory)
walFactory
- may not be null.public static long getLogFileSize(WALFactory walFactory)
walFactory
- may not be null.public WAL getWAL(byte[] identifier) throws IOException
getWAL
in interface WALProvider
identifier
- may not be null. contents will not be altered.IOException