Mesos源码分析(13): MesosContainerier运行一个Task
MesosContainerizer的实现在文件src/slave/containerizer/mesos/containerizer.cpp中
|
转而调用MesosContainerizerProcess::launch,只有executorInfo.has_container()是Mesos的时候,才使用MesosContainerizer.
|
大家注意ExecutorInfo里面的ContainerInfo和TaskInfo里面的ContainerInfo不同。
如果大家看protocol buffer的定义文件include/mesos/mesos.proto里面,ExecutorInfo里面有一个ContainerInfo
|
如果ExecutorInfo的ContainerInfo有值,则executor会启动在这个container里面。
那marathon里面的container info放在哪里呢?
TaskInfo里面也有一个ContainerInfo
|
如果TaskInfo里面的ContainerInfo有值,才是真正的运行容器,容器里面运行任务。
最终会调用MesosContainerizerProcess::__launch
|
最终运行的二进制文件为const char MESOS_CONTAINERIZER[] = "mesos-containerizer";
Mesos-containerizer是一个独立运行的二进制文件,它的main函数在src/slave/containerizer/mesos/main.c
|
Src/slave/containerizer/mesos/launch.cpp中MesosContainerizerLaunch::execute()函数最终调用
|
来运行executor的二进制文件。
如果是前面叙述的TestFramework,则运行的executor是TestExecutor,也就要求mesos-slave的相应目录下有这个二进制文件。
Mesos源码分析(13): MesosContainerier运行一个Task的更多相关文章
- Mesos源码分析(14): DockerContainerier运行一个Task
DockerContainerizer的实现在文件src/slave/containerizer/docker.cpp中 Future<bool> DockerContainerize ...
- Mesos源码分析
Mesos源码分析(1): Mesos的启动过程总论 Mesos源码分析(2): Mesos Master的启动之一 Mesos源码分析(3): Mesos Master的启动之二 Mesos源码分析 ...
- Mesos源码分析(10): MesosSchedulerDriver的启动及运行一个Task
MesosSchedulerDriver的代码在src/sched/sched.cpp里面实现. Driver->run()调用start() 首先检测Mesos-Maste ...
- Mesos源码分析(12): Mesos-Slave接收到RunTask消息
在前文Mesos源码分析(8): Mesos-Slave的初始化中,Mesos-Slave接收到RunTaskMessage消息,会调用Slave::runTask. void Slave::ru ...
- Solr4.8.0源码分析(13)之LuceneCore的索引修复
Solr4.8.0源码分析(13)之LuceneCore的索引修复 题记:今天在公司研究elasticsearch,突然看到一篇博客说elasticsearch具有索引修复功能,顿感好奇,于是点进去看 ...
- Appium Server 源码分析之启动运行Express http服务器
通过上一个系列Appium Android Bootstrap源码分析我们了解到了appium在安卓目标机器上是如何通过bootstrap这个服务来接收appium从pc端发送过来的命令,并最终使用u ...
- Mesos源码分析(11): Mesos-Master接收到launchTasks消息
根据Mesos源码分析(6): Mesos Master的初始化中的代码分析,当Mesos-Master接收到launchTask消息的时候,会调用Master::launchTasks函数. v ...
- Appium Android Bootstrap源码分析之启动运行
通过前面的两篇文章<Appium Android Bootstrap源码分析之控件AndroidElement>和<Appium Android Bootstrap源码分析之命令解析 ...
- Mesos源码分析(5): Mesos Master的启动之四
5. Create an instance of allocator. 代码如下 Mesos源码中默认的Allocator,即HierarchicalDRFAllocator的位置在$ME ...
随机推荐
- Error occurred during initialization of VM Incompatible initial and maximum heap sizes specified
双击Tomcat server在eclipse弹出的Tomcat配置项里面选择open launch configuration 选择arguments在 vm arguments 里面添加 -Xms ...
- CentOS下MySQL安装失败,报socket '/tmp/mysql.sock错误解决方法
1.在centos里安装mysql数据库后,登录时提示‘/tmp/mysql.sock’ 第一种解决办法:采用ln链接方式进行处理 ln -s /var/lib/mysql/mysql.sock /t ...
- SVG初尝试(二)
基本图形 rect(矩形).circle.ellipse(椭圆).line(直线).polyline(折线).polygon(多边形).path(可以绘制任意图形) rect x,y定义矩形坐标,矩形 ...
- 软件工程作业-(third)
1.选题目(1) 最大连续子数组和(最大子段和) 问题:给定n个整数(可能为负数)组成的序列a[1],a[2],a[3],-,a[n],求该序列如a[i]+a[i+1]+-+a[j]的子段和的最大值. ...
- Docker commit 命令保存的镜像文件太大的问题
基础镜像: centos7.5 进入容器后, 先后安装了 jdk1.8, maven3.6.0, git, rocketmq4.3.2 安装完成后使用 docker commit 命令保存为镜像 结果 ...
- java gui 2
1,编写程序,随机生成两个数,用户输入两个数的和,并进行评判.程序的初始界面如下: 点击“获取题目”,随机生成两个100以内的int类型的数,界面如下: 提示: (1)使用java.util.Rand ...
- postgresql drop表后空间不释放
数据库执行drop table XXX后,查看du -sh 已下降,但df -h /pgdb没有减少,是有还有进程使用对应的文件句柄 1.通过表名确认文件ID select pg_relation_f ...
- 【WPF开发备忘】使用MVVM模式开发中列表控件内的按钮事件无法触发解决方法
实际使用MVVM进行WPF开发的时候,可能会用到列表控件中每行一个编辑或删除按钮,这时直接去绑定,发现无法响应: <DataGridTemplateColumn Header="操作& ...
- 配置plsql远程连接oracle数据库
1.首先安装plsql工具.(plsql如何安装就不说明了) 2.在plsql安装目录下新建“network”文件夹,在network文件夹中新建“admin”文件夹,在admin中新建“tnsnam ...
- 机器学习之--kmeans聚类简单算法实例
import numpy as np import sklearn.datasets #加载原数据 import matplotlib.pyplot as plt import random #点到各 ...