public interface WalFilter
Modifier and Type | Interface and Description |
---|---|
static class |
WalFilter.LogRecordFoundResult |
Modifier and Type | Method and Description |
---|---|
void |
columnFamilyLogNumberMap(java.util.Map<java.lang.Integer,java.lang.Long> cfLognumber,
java.util.Map<java.lang.String,java.lang.Integer> cfNameId)
Provide ColumnFamily->LogNumber map to filter
so that filter can determine whether a log number applies to a given
column family (i.e.
|
WalFilter.LogRecordFoundResult |
logRecordFound(long logNumber,
java.lang.String logFileName,
WriteBatch batch,
WriteBatch newBatch)
LogRecord is invoked for each log record encountered for all the logs
during replay on logs on recovery.
|
java.lang.String |
name()
Returns a name that identifies this WAL filter.
|
void columnFamilyLogNumberMap(java.util.Map<java.lang.Integer,java.lang.Long> cfLognumber, java.util.Map<java.lang.String,java.lang.Integer> cfNameId)
cfLognumber
- column_family_id to lognumber mapcfNameId
- column_family_name to column_family_id mapWalFilter.LogRecordFoundResult logRecordFound(long logNumber, java.lang.String logFileName, WriteBatch batch, WriteBatch newBatch)
logNumber
- log number of the current log.
Filter might use this to determine if the log
record is applicable to a certain column family.logFileName
- log file name - only for informational purposesbatch
- batch encountered in the log during recoverynewBatch
- new batch to populate if filter wants to change
the batch (for example to filter some records out, or alter some
records). Please note that the new batch MUST NOT contain
more records than original, else recovery would be failed.java.lang.String name()