Class FSWALEntry
java.lang.Object
org.apache.hadoop.hbase.wal.WAL.Entry
org.apache.hadoop.hbase.regionserver.wal.FSWALEntry
A WAL Entry for
AbstractFSWAL
implementation. Immutable. A subclass of WAL.Entry
that
carries extra info across the ring buffer such as region sequenceid (we want to use this later,
just before we write the WAL to ensure region edits maintain order). The extra info added here is
not 'serialized' as part of the WALEdit hence marked 'transient' to underline this fact. It also
adds mechanism so we can wait on the assign of the region sequence id. See
#stampRegionSequenceId().-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
Set if this is a meta edit and it is of close region type.private final Set<byte[]>
private final boolean
If false, means this is a meta edit written by the hbase system itself.private final RegionInfo
private final ServerCall<?>
private final long
-
Constructor Summary
ConstructorDescriptionFSWALEntry
(long txid, WALKeyImpl key, WALEdit edit, RegionInfo regionInfo, boolean inMemstore, ServerCall<?> rpcCall) -
Method Summary
Modifier and TypeMethodDescription(package private) static Set<byte[]>
collectFamilies
(List<ExtendedCell> cells) (package private) Set<byte[]>
Returns the family names which are effected by this edit.(package private) RegionInfo
(package private) long
getTxid()
Returns The transaction id of this edit.(package private) boolean
(package private) boolean
(package private) void
release()
(package private) long
Here is where a WAL edit gets its sequenceid.toString()
-
Field Details
-
txid
-
inMemstore
If false, means this is a meta edit written by the hbase system itself. It was not in memstore. HBase uses these edit types to note in the log operational transitions such as compactions, flushes, or region open/closes. -
closeRegion
Set if this is a meta edit and it is of close region type. -
regionInfo
-
familyNames
-
rpcCall
-
-
Constructor Details
-
FSWALEntry
FSWALEntry(long txid, WALKeyImpl key, WALEdit edit, RegionInfo regionInfo, boolean inMemstore, ServerCall<?> rpcCall) - Parameters:
inMemstore
- If true, then this is a data edit, one that came from client. If false, it is a meta edit made by the hbase system itself and is for the WAL only.
-
-
Method Details
-
collectFamilies
-
toString
-
isInMemStore
boolean isInMemStore() -
isCloseRegion
boolean isCloseRegion() -
getRegionInfo
-
getTxid
long getTxid()Returns The transaction id of this edit. -
stampRegionSequenceId
Here is where a WAL edit gets its sequenceid. SIDE-EFFECT is our stamping the sequenceid into every Cell AND setting the sequenceid into the MVCC WriteEntry!!!!- Returns:
- The sequenceid we stamped on this edit.
- Throws:
IOException
-
getFamilyNames
Set<byte[]> getFamilyNames()Returns the family names which are effected by this edit. -
release
void release()
-