Differences between revisions 6 and 7
Revision 6 as of 2013-10-10 12:50:15
Size: 1399
Editor: ChiaHungLin
Comment:
Revision 7 as of 2013-10-20 14:33:00
Size: 1912
Editor: ChiaHungLin
Comment:
Deletions are marked like this. Additions are marked like this.
Line 29: Line 29:


== Task Management ==

The GroomServer

 * receives instructions from [[BSPMaste|BSPMasters]].
 * spawns one or more tasks as separated jvm processes where tasks are then executed.
 * monitors spawned processes via ''ping''; when a task is
  * out of contact (failure/ crashed): launch a new process and restart the task with '''max attempt''' set to '''3'''
  * exceeding '''max attempt''': update task status/ notify [[BSPMaster|BSPMasters]]
 * sends heartbeat to [[BSPMaster|BSPMasters]]

 

Introduction

GroomServer is a process whose main responsibility is to manage bsp tasks. In addition to task management, GroomServer collaborates with BSPMaster so that job execution can be done correctly. Works that GroomServer performs include:

  1. Check local disk:
    1. Check local disk if writable.
    2. Delete files under local dir (bsp.local.dir)

  2. Clear state table:
    1. Clean up tasks (Map[TaskAttemptID -> TaskInProgress])

    2. Initialize job (Map[BSPJobID -> RunningJob])

    3. Cleanup running tasks (Map[TaskAttemptID -> TaskInProgress])

    4. Configure max tasks, default to 3.

  3. Start http server: An embedded http service.
  4. Start task report server: Communication between GroomServer and spawned child task. See TaskRunner.BspChildRunner

  5. Start worker server: RPC service listens to master's direction.
  6. Register to BSPMaster: Enroll itself to BSPMaster with GroomServerStatus.

  7. Start message dispatcher (Instructor): (TODO: refactor needed)
  8. Start monitor service: A process export metrics, task status, etc. information.

State Diagram

GroomServer state includes

  • NORMAL: Everything works fine.
  • STALE: This happens when DiskErrorException is thrown.

  • DENIED: This indicates failing to establish connection to BSPMaster.

GroomServer state

Task Management

The GroomServer

  • receives instructions from BSPMasters.

  • spawns one or more tasks as separated jvm processes where tasks are then executed.
  • monitors spawned processes via ping; when a task is

    • out of contact (failure/ crashed): launch a new process and restart the task with max attempt set to 3

    • exceeding max attempt: update task status/ notify BSPMasters

  • sends heartbeat to BSPMasters

GroomServer (last edited 2014-03-25 06:09:11 by ChiaHungLin)