@InterfaceAudience.Private class DisabledWALProvider extends Object implements WALProvider
WALProvider
used when the WAL is disabled.
Should only be used when severe data loss is acceptable.Modifier and Type | Class and Description |
---|---|
private static class |
DisabledWALProvider.DisabledWAL |
WALProvider.Writer
Modifier and Type | Field and Description |
---|---|
(package private) WAL |
disabled |
private static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
DisabledWALProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close()
shutdown utstanding WALs and clean up any persisted state.
|
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.
|
void |
shutdown()
persist outstanding WALs to storage and stop accepting new appends.
|
private static final org.apache.commons.logging.Log LOG
WAL disabled
public void init(WALFactory factory, org.apache.hadoop.conf.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 WAL getWAL(byte[] identifier) throws IOException
getWAL
in interface WALProvider
identifier
- may not be null. contents will not be altered.IOException
public void close() throws IOException
WALProvider
close
in interface WALProvider
IOException
public void shutdown() throws IOException
WALProvider
shutdown
in interface WALProvider
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.