Hama: GroomServer

GroomServer作为Apache Hama的一部分,主要负责管理bsptasks。它不仅检查本地磁盘是否可写,还清理指定目录下的文件,并初始化作业。此外,GroomServer能够启动HTTP服务器、任务报告服务器及工作服务器等组件。
摘要由CSDN通过智能技术生成

http://wiki.apache.org/hama/GroomServer

 

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.

 

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

 

Scenario

 

Normal Case

grom_start_task.png

  • A GroomServer forks a new task.

  • The spawned task ack with metrics to GroomServer.

  • Upon reception of task's ack, the GroomServer exports metrics to monitor system.

 

Failure Case

grom_restart_task.png

  • A task failure event happens.
  • A corresponded GroomServer detects the task failure.

  • The GroomServer tries to restart the task.

  • If failing restart, the GroomServer export by marking the task as failed.

 

Components

  • Registrator: Register to GroomManager

  • TaskManager: Perform tasks management.

    • Launch a task.
    • Stop a task.
    • Kill a task.
    • Resume a task.
  • Monitor: Report GroomServer and tasks related information.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值