@Deprecated @InterfaceAudience.Private class ProcedureWALFormatReader extends Object
Modifier and Type | Field and Description |
---|---|
private ProcedureWALFormat.Loader |
loader
Deprecated.
|
private WALProcedureMap |
localProcedureMap
Deprecated.
We will use the localProcedureMap to track the active procedures for the current proc wal file,
and when we finished reading one proc wal file, we will merge he localProcedureMap to the
procedureMap, which tracks the global active procedures.
|
private ProcedureStoreTracker |
localTracker
Deprecated.
If tracker for a log file is partial (see
ProcedureStoreTracker.partial ), we re-build
the list of procedures modified in that WAL because we need it for log cleaning purposes. |
private static org.slf4j.Logger |
LOG
Deprecated.
|
private long |
maxProcId
Deprecated.
|
private WALProcedureMap |
procedureMap
Deprecated.
|
private ProcedureStoreTracker |
tracker
Deprecated.
Global tracker that will be used by the WALProcedureStore after load.
|
Constructor and Description |
---|
ProcedureWALFormatReader(ProcedureStoreTracker tracker,
ProcedureWALFormat.Loader loader)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private void |
deleteEntry(long procId)
Deprecated.
|
void |
finish()
Deprecated.
|
private void |
insertIfPartial(ProcedureStoreTracker tracker,
org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure proc)
Deprecated.
|
private boolean |
isDeleted(long procId)
Deprecated.
|
private boolean |
isRequired(long procId)
Deprecated.
|
private void |
loadProcedure(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry,
org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure proc)
Deprecated.
|
void |
read(ProcedureWALFile log)
Deprecated.
|
private void |
readDeleteEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry)
Deprecated.
|
private void |
readInitEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry)
Deprecated.
|
private void |
readInsertEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry)
Deprecated.
|
private void |
readUpdateEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry)
Deprecated.
|
private void |
setDeletedIfPartial(ProcedureStoreTracker tracker,
long procId)
Deprecated.
|
private static final org.slf4j.Logger LOG
private final WALProcedureMap localProcedureMap
WALProcedureMap
for more details.
After reading all the proc wal files, we will use the procedures in the procedureMap to build a
ProcedureTree
, and then give the result to the upper layer. See the comments of
ProcedureTree
and the code in finish()
for more details.private final WALProcedureMap procedureMap
private final ProcedureWALFormat.Loader loader
private final ProcedureStoreTracker tracker
private ProcedureStoreTracker localTracker
ProcedureStoreTracker.partial
), we re-build
the list of procedures modified in that WAL because we need it for log cleaning purposes. If
all procedures modified in a WAL are found to be obsolete, it can be safely deleted. (see
WALProcedureStore.removeInactiveLogs()
).
Notice that, the deleted part for this tracker will not be global valid as we can only count
the deletes in the current file, but it is not big problem as finally, the above tracker will
have the global state of deleted, and it will also be used to build the cleanup tracker.private long maxProcId
public ProcedureWALFormatReader(ProcedureStoreTracker tracker, ProcedureWALFormat.Loader loader)
public void read(ProcedureWALFile log) throws IOException
IOException
public void finish() throws IOException
IOException
private void setDeletedIfPartial(ProcedureStoreTracker tracker, long procId)
private void insertIfPartial(ProcedureStoreTracker tracker, org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure proc)
private void loadProcedure(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry, org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure proc)
private void readInitEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry)
private void readInsertEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry)
private void readUpdateEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry)
private void readDeleteEntry(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.ProcedureWALEntry entry)
private void deleteEntry(long procId)
private boolean isDeleted(long procId)
private boolean isRequired(long procId)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.