@Deprecated @InterfaceAudience.Private public interface SplitLogWorkerCoordination
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.
Modifier and Type | Interface and Description |
---|---|
static interface |
SplitLogWorkerCoordination.SplitTaskDetails
Deprecated.
Interface for log-split tasks Used to carry implementation details in encapsulated way through
Handlers to the coordination API.
|
Modifier and Type | Method and Description |
---|---|
void |
endTask(SplitLogTask slt,
LongAdder ctr,
SplitLogWorkerCoordination.SplitTaskDetails splitTaskDetails)
Deprecated.
Notify coordination engine that splitting task has completed.
|
int |
getTaskReadySeq()
Deprecated.
Used by unit tests to check how many tasks were processed
|
void |
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 tasks
|
boolean |
isStop()
Deprecated.
Returns the current value of exitWorker
|
void |
markCorrupted(org.apache.hadoop.fs.Path rootDir,
String name,
org.apache.hadoop.fs.FileSystem fs)
Deprecated.
marks log file as corrupted
|
void |
registerListener()
Deprecated.
set the listener for task changes.
|
void |
removeListener()
Deprecated.
remove the listener for task changes.
|
void |
stopProcessingTasks()
Deprecated.
called when Coordination should stop processing tasks and exit
|
void |
taskLoop()
Deprecated.
Wait for the new tasks and grab one
|
void init(RegionServerServices server, org.apache.hadoop.conf.Configuration conf, SplitLogWorker.TaskExecutor splitTaskExecutor, SplitLogWorker worker)
server
- instance of RegionServerServices to work withconf
- is current configuration.splitTaskExecutor
- split executor from SplitLogWorkerworker
- instance of SplitLogWorkervoid stopProcessingTasks()
boolean isStop()
void taskLoop() throws InterruptedException
InterruptedException
- if the SplitLogWorker was stoppedvoid markCorrupted(org.apache.hadoop.fs.Path rootDir, String name, org.apache.hadoop.fs.FileSystem fs)
rootDir
- where to find the logname
- of the logfs
- file systemboolean isReady() throws InterruptedException
InterruptedException
- if the SplitLogWorker was stoppedint getTaskReadySeq()
void registerListener()
void removeListener()
void endTask(SplitLogTask slt, LongAdder ctr, SplitLogWorkerCoordination.SplitTaskDetails splitTaskDetails)
slt
- See SplitLogTask
ctr
- counter to be updatedsplitTaskDetails
- details about log split task (specific to coordination engine being
used).Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.