github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/servermaster/README.md (about)

     1  # Structure of Master
     2  
     3  ## Structure
     4  
     5  The master module consists of several components:
     6  
     7  - Master Server.
     8    - provide Grpc/http api, including
     9      - operate cluster
    10        - register/delete executor server
    11        - handle heartbeat (keep alive)
    12      - user interface
    13        - submit job
    14        - query job(s)
    15        - cancel job
    16      - schedule and failover jobs
    17  - ExecutorManager
    18    - Handle Heartbeat
    19      - Notify Resource Manager updates the status infos
    20    - Maintain the aliveness of Executors.
    21      - Check liveness
    22        - Executor Manager check every executor whether the heartbeat has been timeout.
    23        - Once an executor is offline by `heartbeat timeout`, it should notify the job manager to reschedule all the tasks on it.
    24  - Executor Client
    25    - Embeds two independent interfaces
    26        - `ExecutorServiceClient`, which is used to dispatch task to executor.
    27        - `BrokerServiceClient`, which is used to manage resource belongs to an executor.
    28  - JobManager
    29    - Receive SubmitJob Request, Check the type of Job, Create the JobMaster.
    30    - JobMaster (per job)
    31      - Generate the Tasks for the job
    32      - Schedule and Dispatch Tasks