Package org.apache.hadoop.hbase.wal
Class DisabledWALProvider
java.lang.Object
org.apache.hadoop.hbase.wal.DisabledWALProvider
- All Implemented Interfaces:
WALProvider
No-op implementation of
WALProvider used when the WAL is disabled. Should only be used
when severe data loss is acceptable.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.hadoop.hbase.wal.WALProvider
WALProvider.AsyncWriter, WALProvider.Writer, WALProvider.WriterBase -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWALActionsListener(WALActionsListener listener) Add aWALActionsListener.voidclose()shutdown utstanding WALs and clean up any persisted state.longGet size of the log files this provider is managinglongGet number of the log files this provider is managinggetWAL(RegionInfo region) getWALs()Returns the List of WALs that are used by this servervoidinit(WALFactory factory, org.apache.hadoop.conf.Configuration conf, String providerId, Abortable abortable) Set up the provider to create wals.voidshutdown()persist outstanding WALs to storage and stop accepting new appends.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.wal.WALProvider
getWALFileLengthProvider
-
Field Details
-
LOG
-
disabled
-
-
Constructor Details
-
DisabledWALProvider
-
-
Method Details
-
init
public void init(WALFactory factory, org.apache.hadoop.conf.Configuration conf, String providerId, Abortable abortable) throws IOException Description copied from interface:WALProviderSet up the provider to create wals. will only be called once per instance.- Specified by:
initin interfaceWALProvider- Parameters:
factory- factory that made us may not be nullconf- may not be nullproviderId- differentiate between providers from one factory. may be null- Throws:
IOException
-
getWALs
Description copied from interface:WALProviderReturns the List of WALs that are used by this server- Specified by:
getWALsin interfaceWALProvider
-
getWAL
- Specified by:
getWALin interfaceWALProvider- Parameters:
region- the region which we want to get a WAL for it. Could be null.- Returns:
- a WAL for writing entries for the given region.
- Throws:
IOException
-
close
Description copied from interface:WALProvidershutdown utstanding WALs and clean up any persisted state. Call this method only when you will not need to replay any of the edits to the WALs from this provider. After this call completes, the underlying resources should have been reclaimed.- Specified by:
closein interfaceWALProvider- Throws:
IOException
-
shutdown
Description copied from interface:WALProviderpersist outstanding WALs to storage and stop accepting new appends. This method serves as shorthand for sending a sync to every WAL provided by a given implementation. Those WALs will also stop accepting new writes.- Specified by:
shutdownin interfaceWALProvider- Throws:
IOException
-
getNumLogFiles
Description copied from interface:WALProviderGet number of the log files this provider is managing- Specified by:
getNumLogFilesin interfaceWALProvider
-
getLogFileSize
Description copied from interface:WALProviderGet size of the log files this provider is managing- Specified by:
getLogFileSizein interfaceWALProvider
-
addWALActionsListener
Description copied from interface:WALProviderAdd aWALActionsListener.Notice that you must call this method before calling
WALProvider.getWAL(RegionInfo)as this method will not effect theWALwhich has already been created. And as long as we can only it when initialization, it is not thread safe.- Specified by:
addWALActionsListenerin interfaceWALProvider
-