Class SplitLogWorker

java.lang.Object
org.apache.hadoop.hbase.regionserver.SplitLogWorker
All Implemented Interfaces:
Runnable

@Deprecated @Private public class SplitLogWorker extends Object implements Runnable
Deprecated.
since 2.4.0 and in 3.0.0, to be removed in 4.0.0, replaced by procedure-based distributed WAL splitter, see SplitWALRemoteProcedure
This worker is spawned in every regionserver, including master. The Worker waits for log splitting tasks to be put up by the SplitLogManager running in the master and races with other workers in other serves to acquire those tasks. The coordination is done via coordination engine.

If a worker has successfully moved the task from state UNASSIGNED to OWNED then it owns the task. It keeps heart beating the manager by periodically moving the task from UNASSIGNED to OWNED state. On success it moves the task to TASK_DONE. On unrecoverable error it moves task state to ERR. If it cannot continue but wants the master to retry the task then it moves the task state to RESIGNED.

The manager can take a task away from a worker by moving the task from OWNED to UNASSIGNED. In the absence of a global lock there is a unavoidable race here - a worker might have just finished its task when it is stripped of its ownership. Here we rely on the idempotency of the log splitting task for correctness