@InterfaceAudience.Private public class SplitWALCallable extends BaseRSProcedureCallable
SplitWALRemoteProcedure
from master and executed
by executor service which is in charge of executing the events of EventType.RS_LOG_REPLAY When
execute this callable, it will call SplitLogWorker.splitLog() to split the WAL. If the return
value is SplitLogWorker.TaskExecutor.Status.DONE, it means the task is successful and it will
return null to end the call. Otherwise it will throw an exception and let
SplitWALRemoteProcedure
to handle this problem.
This class is to replace the zk-based WAL splitting related code, SplitLogWorker
,
SplitLogWorkerCoordination
and
ZkSplitLogWorkerCoordination
can be removed after we
switch to procedure-based WAL splitting.Modifier and Type | Class and Description |
---|---|
static class |
SplitWALCallable.ErrorWALSplitException |
static class |
SplitWALCallable.PreemptedWALSplitException |
static class |
SplitWALCallable.ResignedWALSplitException |
Modifier and Type | Field and Description |
---|---|
private Lock |
splitWALLock |
private KeyLocker<String> |
splitWALLocks |
private String |
walPath |
rs
Constructor and Description |
---|
SplitWALCallable() |
Modifier and Type | Method and Description |
---|---|
protected void |
doCall() |
EventType |
getEventType()
Event type used to select thread pool.
|
String |
getWalPath() |
protected void |
initParameter(byte[] parameter) |
call, init
private final KeyLocker<String> splitWALLocks
private volatile Lock splitWALLock
public SplitWALCallable()
protected void initParameter(byte[] parameter) throws org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException
initParameter
in class BaseRSProcedureCallable
org.apache.hbase.thirdparty.com.google.protobuf.InvalidProtocolBufferException
public EventType getEventType()
RSProcedureCallable
protected void doCall() throws Exception
doCall
in class BaseRSProcedureCallable
Exception
public String getWalPath()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.