append
public long append(HTableDescriptor htd,
HRegionInfo info,
WALKey key,
WALEdit edits,
AtomicLong sequenceId,
boolean isInMemstore,
List<Cell> cells)
throws IOException
Description copied from interface: WAL
Append a set of edits to the WAL. The WAL is not flushed/sync'd after this transaction
completes BUT on return this edit must have its region edit/sequence id assigned
else it messes up our unification of mvcc and sequenceid. On return key
will
have the region edit/sequence id filled in.
- Specified by:
append
in interface WAL
- Overrides:
append
in class FSHLog
- Parameters:
htd
- used to give scope for replication TODO refactor out in favor of table name and info
key
- Modified by this call; we add to it this edits region edit/sequence id.
edits
- Edits to append. MAY CONTAIN NO EDITS for case where we want to get an edit
sequence id that is after all currently appended edits.
sequenceId
- A reference to the atomic long the info
region is using as
source of its incrementing edits sequence id. Inside in this call we will increment it and
attach the sequence to the edit we apply the WAL.
isInMemstore
- Always true except for case where we are writing a compaction completion
record into the WAL; in this case the entry is just so we can finish an unfinished compaction
-- it is not an edit for memstore.
cells
- list of KVs added into memstore
- Returns:
- Returns a 'transaction id' and
key
will have the region edit/sequence id
in it.
- Throws:
IOException