@InterfaceAudience.Private public interface WALProvider
See DefaultWALProvider 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.Writer |
| 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(byte[] identifier,
byte[] namespace) |
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(byte[] identifier, byte[] namespace) throws IOException
identifier - may not be null. contents will not be altered.namespace - could be null, and will use default namespace if nullIOExceptionList<WAL> getWALs() throws IOException
IOExceptionvoid shutdown()
throws IOException
IOExceptionvoid close()
throws IOException
IOExceptionlong getNumLogFiles()
long getLogFileSize()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.