@InterfaceAudience.Private public class SplitWALCallable extends Object implements RSProcedureCallable
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.构造器和说明 |
---|
SplitWALCallable() |
限定符和类型 | 方法和说明 |
---|---|
Void |
call() |
EventType |
getEventType()
Event type used to select thread pool.
|
String |
getWalPath() |
void |
init(byte[] parameter,
HRegionServer rs)
Initialize the callable
|
public void init(byte[] parameter, HRegionServer rs)
RSProcedureCallable
init
在接口中 RSProcedureCallable
parameter
- the parameter passed from master.rs
- the regionserver instancepublic EventType getEventType()
RSProcedureCallable
getEventType
在接口中 RSProcedureCallable
public String getWalPath()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.