• Ambari Agent 架构


    Ambari Agent 架构图,由图中看,主要有3部分:

    HeartBeatHandler:发送 HTTP 请求和 Ambari Server 进行交互。
    ActionExecutor:Command 执行器。
    AlertSchedulerHandler:Alert 处理器。

    4个数据容器:

    CommandQueue:存储需要执行的 Command。
    ResultMap:存储 Command 的执行结果。
    Alert definitions file:是一个文件,保存所有的 Alert 定义。
    AlertCollect:存储 Alert 的检查结果。

    简述一下 Ambari Agent 的工作流程:

    1、HeartBeatHandler:收集组件当前状态(通过ResultMap)、Command 执行结果(通过ResultMap)、Alert 检查结果(通过 AlertCollect)等,封装到 HTTP Request 当中,发送给 Ambari Server;Ambari Server 响应请求,通过 HTTP Response 带回来需要执行的 Command、需要终止的 Command、发生修改的 Config、发生修改的 Alert 定义等,并把 Comand 和 修改的 Config 封装为 Agent Command 对象,存储到 CommandQueue 中;把修改的 Alert 定义,更新到 Alert definitions 文件中(如果 Alert definitions 文件发生了变化,需要通知 AlertSchedulerHandler 重新加载一遍)。
    2、ActionExecutor:定期从 CommandQueue 中加载需要执行的 Command,找到 Command 对应的 Python 脚本,执行脚本,并把结果存储到 ResultMap 中。
    3、AlertSchedulerHandler:从 Alert definitions 文件中加载所有 Alert 定义,根据 Alert 定义,找到对应的 Python 脚本,周期性执行,并把结果存储到 AlertCollect 中。

  • 相关阅读:
    一些常用的代码规范
    策略模式学习,使用go实现策略模式
    数据库作业3:第二章课后题
    数据库作业4:SQL练习1
    对数据库相关的概念自己的理解
    SQL server的初步使用
    对于高德地图SDK的开发使用
    滑稽(好像会动)!
    羊车门作业
    对Python课的看法
  • 原文地址:https://www.cnblogs.com/basenet855x/p/6782673.html
Copyright © 2020-2023  润新知