博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Ambari Agent 架构
阅读量:7030 次
发布时间:2019-06-28

本文共 978 字,大约阅读时间需要 3 分钟。

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 中。

转载于:https://www.cnblogs.com/basenet855x/p/6782673.html

你可能感兴趣的文章
hdu 三部曲 Contestants Division
查看>>
day22——创建表、增加数据、查询数据
查看>>
css伪元素实现tootip提示框
查看>>
关于函数指针的总结
查看>>
采用PHP函数uniqid生成一个唯一的ID
查看>>
Centos7安装32位库用来安装32位软件程序
查看>>
【HMOI】小C的填数游戏 DP+线段树维护
查看>>
java中23种设计模式之6-适配器模式(adapter pattern)
查看>>
Easy C 编程 in Linux
查看>>
poj3761(反序表)
查看>>
x86寄存器总结
查看>>
jquery easyui ajax data属性传值方式
查看>>
封装了些文件相关的操作
查看>>
什么是Solr
查看>>
poj2386(简单dfs)
查看>>
双链表的基本操作
查看>>
走进异步编程的世界 - 剖析异步方法(上)
查看>>
[HAOI2006]受欢迎的牛
查看>>
docker-maven-plugin 完全免Dockerfile 文件
查看>>
day20 Python 装饰器
查看>>