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 classes/interfaces inherited from interface org.apache.hadoop.hbase.wal.WALProvider
WALProvider.AsyncWriter, WALProvider.Writer, WALProvider.WriterBase
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addWALActionsListener
(WALActionsListener listener) Add aWALActionsListener
.void
close()
shutdown utstanding WALs and clean up any persisted state.long
Get size of the log files this provider is managinglong
Get number of the log files this provider is managinggetWAL
(RegionInfo region) getWALs()
Returns the List of WALs that are used by this servervoid
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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.wal.WALProvider
getPeerActionListener, getWALFileLengthProvider, setSyncReplicationPeerInfoProvider
-
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:WALProvider
Set up the provider to create wals. will only be called once per instance.- Specified by:
init
in 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:WALProvider
Returns the List of WALs that are used by this server- Specified by:
getWALs
in interfaceWALProvider
-
getWAL
- Specified by:
getWAL
in 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:WALProvider
shutdown 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:
close
in interfaceWALProvider
- Throws:
IOException
-
shutdown
Description copied from interface:WALProvider
persist 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:
shutdown
in interfaceWALProvider
- Throws:
IOException
-
getNumLogFiles
Description copied from interface:WALProvider
Get number of the log files this provider is managing- Specified by:
getNumLogFiles
in interfaceWALProvider
-
getLogFileSize
Description copied from interface:WALProvider
Get size of the log files this provider is managing- Specified by:
getLogFileSize
in interfaceWALProvider
-
addWALActionsListener
Description copied from interface:WALProvider
Add aWALActionsListener
.Notice that you must call this method before calling
WALProvider.getWAL(RegionInfo)
as this method will not effect theWAL
which has already been created. And as long as we can only it when initialization, it is not thread safe.- Specified by:
addWALActionsListener
in interfaceWALProvider
-