@InterfaceAudience.Private
public interface WALProvider
See FSHLogProvider for an example implementation.
A single WALProvider will be used for retrieving multiple WALs in a particular region server
and must be threadsafe.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
WALProvider.AsyncWriter |
static interface |
WALProvider.Writer |
static interface |
WALProvider.WriterBase |
| Modifier and Type | Method and Description |
|---|---|
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,
List<WALActionsListener> listeners,
String providerId)
Set up the provider to create wals.
|
void |
shutdown()
persist outstanding WALs to storage and stop accepting new appends.
|
void init(WALFactory factory, org.apache.hadoop.conf.Configuration conf, List<WALActionsListener> listeners, String providerId) throws IOException
factory - factory that made us may not be nullconf - may not be nulllisteners - may be nullproviderId - differentiate between providers from one factory. may be nullIOExceptionWAL getWAL(RegionInfo region) throws IOException
region - the region which we want to get a WAL for it. Could be null.IOExceptionvoid shutdown()
throws IOException
IOExceptionvoid close()
throws IOException
IOExceptionlong getNumLogFiles()
long getLogFileSize()
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.