Interface SplitLogWorkerCoordination

All Known Implementing Classes:
ZkSplitLogWorkerCoordination

@Deprecated @Private public interface SplitLogWorkerCoordination
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

    Nested Classes
    Modifier and Type
    Interface
    Description
    static 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 Type
    Method
    Description
    void
    Deprecated.
    Notify coordination engine that splitting task has completed.
    int
    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
    Deprecated.
    Check whether the log splitter is ready to supply tasks
    boolean
    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
    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 exit
    void
    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 with
      conf - is current configuration.
      splitTaskExecutor - split executor from SplitLogWorker
      worker - instance of SplitLogWorker
    • 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 log
      name - of the log
      fs - file system
    • isReady

      boolean isReady() throws InterruptedException
      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

      Deprecated.
      Used by unit tests to check how many tasks were processed
      Returns:
      number of tasks
    • registerListener

      Deprecated.
      set the listener for task changes. Implementation specific
    • removeListener

      Deprecated.
      remove the listener for task changes. Implementation specific
    • endTask

      Deprecated.
      Notify coordination engine that splitting task has completed.
      Parameters:
      slt - See SplitLogTask
      ctr - counter to be updated
      splitTaskDetails - details about log split task (specific to coordination engine being used).