@Deprecated @InterfaceAudience.Private class WALProcedureMap extends Object
add(ProcedureProtos.Procedure)
and remove(long)
. It is used
when reading a proc wal file. In these methods, for the same procedure, typically the one comes
later should win, please see the comment for
isIncreasing(ProcedureProtos.Procedure, ProcedureProtos.Procedure)
to see the
exceptions.
The second group is merge(WALProcedureMap)
. We will have a global
WALProcedureMap
to hold global the active procedures, and a local WALProcedureMap
to hold the active procedures for the current proc wal file. And when we finish reading a proc
wal file, we will merge the local one into the global one, by calling the
merge(WALProcedureMap)
method of the global one and pass the local one in. In this
method, for the same procedure, the one comes earlier will win, as we read the proc wal files
from new to old(the reverse order).Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG
Deprecated.
|
private long |
maxModifiedProcId
Deprecated.
|
private long |
minModifiedProcId
Deprecated.
|
private Map<Long,org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure> |
procMap
Deprecated.
|
Constructor and Description |
---|
WALProcedureMap()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure proc)
Deprecated.
|
boolean |
contains(long procId)
Deprecated.
|
long |
getMaxModifiedProcId()
Deprecated.
|
long |
getMinModifiedProcId()
Deprecated.
|
Collection<org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure> |
getProcedures()
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
private static boolean |
isIncreasing(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure current,
org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure candidate)
Deprecated.
|
void |
merge(WALProcedureMap other)
Deprecated.
Merge the given
WALProcedureMap into this one. |
void |
remove(long procId)
Deprecated.
|
private void |
trackProcId(long procId)
Deprecated.
|
private static final org.slf4j.Logger LOG
private final Map<Long,org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure> procMap
private long minModifiedProcId
private long maxModifiedProcId
WALProcedureMap()
private void trackProcId(long procId)
private static boolean isIncreasing(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure current, org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure candidate)
public void add(org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure proc)
public void remove(long procId)
public boolean isEmpty()
public boolean contains(long procId)
public void merge(WALProcedureMap other)
WALProcedureMap
into this one. The WALProcedureMap
passed in
will be cleared after merging.public Collection<org.apache.hadoop.hbase.shaded.protobuf.generated.ProcedureProtos.Procedure> getProcedures()
public long getMinModifiedProcId()
public long getMaxModifiedProcId()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.