zoukankan      html  css  js  c++  java
  • 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 中。

  • 相关阅读:
    SELECT SCREEN 整理2 转载
    SELECT SCREEN 整理1 转载
    ABAP面向对象 转载
    [OO]ABAP OO 语法--实例看 "="与"?=" 的区别[转]
    cl_salv_table
    sapui5 组件重用
    sapui5 使用common(其他工程)的i18n 文件
    sapui5 app之间迁移
    导航与路由10-17(渣翻完结)
    导航与路由1-9 (渣翻)
  • 原文地址:https://www.cnblogs.com/basenet855x/p/6782673.html
Copyright © 2011-2022 走看看