@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.AsyncWriter, WALProvider.Writer, WALProvider.WriterBase| Modifier and Type | Field and Description | 
|---|---|
| (package private) WAL | disabled | 
| private static org.slf4j.Logger | LOG | 
| Constructor and Description | 
|---|
| DisabledWALProvider() | 
| Modifier and Type | Method and Description | 
|---|---|
| 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,
    Abortable abortable)Set up the provider to create wals. | 
| void | shutdown()persist outstanding WALs to storage and stop accepting new appends. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWALFileLengthProviderDisabledWALProvider()
public void init(WALFactory factory, org.apache.hadoop.conf.Configuration conf, String providerId, Abortable abortable) throws IOException
WALProviderinit in interface 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 in interface WALProviderpublic WAL getWAL(RegionInfo region) throws IOException
getWAL in interface WALProviderregion - the region which we want to get a WAL for it. Could be null.IOExceptionpublic void close() throws IOException
WALProviderclose in interface WALProviderIOExceptionpublic void shutdown() throws IOException
WALProvidershutdown in interface WALProviderIOExceptionpublic long getNumLogFiles()
WALProvidergetNumLogFiles in interface WALProviderpublic long getLogFileSize()
WALProvidergetLogFileSize in interface 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 in interface WALProviderCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.