Interface SplitLogWorkerCoordination
- All Known Implementing Classes:
ZkSplitLogWorkerCoordination
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 SplitWALManager
Coordinated operations for
SplitLogWorker
and
WALSplitterHandler
Important methods for
SplitLogWorker: isReady()
called from SplitLogWorker.run()
to check whether the coordination is
ready to supply the tasks taskLoop()
loop for new tasks until the worker is stopped isStop()
a flag indicates whether worker should finish registerListener()
called from SplitLogWorker.run()
and could register listener
for external changes in coordination (if required) endTask(SplitLogTask, LongAdder, SplitTaskDetails)
notify coordination engine that
Important methods for WALSplitterHandler:
splitting task has completed.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Deprecated.Interface for log-split tasks Used to carry implementation details in encapsulated way through Handlers to the coordination API. -
Method Summary
Modifier and TypeMethodDescriptionvoid
endTask
(SplitLogTask slt, LongAdder ctr, SplitLogWorkerCoordination.SplitTaskDetails splitTaskDetails) Deprecated.Notify coordination engine that splitting task has completed.int
Deprecated.Used by unit tests to check how many tasks were processedvoid
init
(RegionServerServices server, org.apache.hadoop.conf.Configuration conf, SplitLogWorker.TaskExecutor splitTaskExecutor, SplitLogWorker worker) Deprecated.Initialize internal values.boolean
isReady()
Deprecated.Check whether the log splitter is ready to supply tasksboolean
isStop()
Deprecated.Returns the current value of exitWorkervoid
markCorrupted
(org.apache.hadoop.fs.Path rootDir, String name, org.apache.hadoop.fs.FileSystem fs) Deprecated.marks log file as corruptedvoid
Deprecated.set the listener for task changes.void
Deprecated.remove the listener for task changes.void
Deprecated.called when Coordination should stop processing tasks and exitvoid
taskLoop()
Deprecated.Wait for the new tasks and grab one
-
Method Details
-
init
void init(RegionServerServices server, org.apache.hadoop.conf.Configuration conf, SplitLogWorker.TaskExecutor splitTaskExecutor, SplitLogWorker worker) Deprecated.Initialize internal values. This method should be used when corresponding SplitLogWorker instance is created- Parameters:
server
- instance of RegionServerServices to work withconf
- is current configuration.splitTaskExecutor
- split executor from SplitLogWorkerworker
- instance of SplitLogWorker
-
stopProcessingTasks
void stopProcessingTasks()Deprecated.called when Coordination should stop processing tasks and exit -
isStop
boolean isStop()Deprecated.Returns the current value of exitWorker -
taskLoop
Deprecated.Wait for the new tasks and grab one- Throws:
InterruptedException
- if the SplitLogWorker was stopped
-
markCorrupted
void markCorrupted(org.apache.hadoop.fs.Path rootDir, String name, org.apache.hadoop.fs.FileSystem fs) Deprecated.marks log file as corrupted- Parameters:
rootDir
- where to find the logname
- of the logfs
- file system
-
isReady
Deprecated.Check whether the log splitter is ready to supply tasks- Returns:
- false if there is no tasks
- Throws:
InterruptedException
- if the SplitLogWorker was stopped
-
getTaskReadySeq
int getTaskReadySeq()Deprecated.Used by unit tests to check how many tasks were processed- Returns:
- number of tasks
-
registerListener
void registerListener()Deprecated.set the listener for task changes. Implementation specific -
removeListener
void removeListener()Deprecated.remove the listener for task changes. Implementation specific -
endTask
void endTask(SplitLogTask slt, LongAdder ctr, SplitLogWorkerCoordination.SplitTaskDetails splitTaskDetails) Deprecated.Notify coordination engine that splitting task has completed.- Parameters:
slt
- SeeSplitLogTask
ctr
- counter to be updatedsplitTaskDetails
- details about log split task (specific to coordination engine being used).
-