mesos 1.2.0实验性的支持了一个框架多个role.

message FrameworkInfo {

...

// Roles are the entities to which allocations are made.
// The framework must have at least one role in order to
// be offered resources. Note that `role` is deprecated
// in favor of `roles` and only one of these fields must
// be used. Since we cannot distinguish between empty
// `roles` and the default unset `role`, we require that
// frameworks set the `MULTI_ROLE` capability if
// setting the `roles` field.
//
// NOTE: The implmentation for supporting `roles`
// is not complete, DO NOT USE the `roles` field.
optional string role = 6 [default = "*", deprecated=true];
repeated string roles = 12; // EXPERIMENTAL.

...

message Capability {

enum Type {

...

// This expresses the ability for the framework to be
// "multi-tenant" via using the newly introduced `roles`
// field, and examining `Offer.allocation_info` to determine
// which role the offers are being made to. We also
// expect that "single-tenant" schedulers eventually
// provide this and move away from the deprecated
// `role` field.
//
// NOTE: The implementation for supporting multiple
// roles is not complete, DO NOT USE THIS.
MULTI_ROLE = 6; // EXPERIMENTAL.

    }

  optional Type type = 1;

  }

}

Roles是进行分配的实体。框架必须至少有一个role才能提供资源。 请注意,如果使用了“role”就不赞成使用“roles”,只能使用其中一个字段。

由于我们无法区分空的“roles”和默认的未设置的“role”,所以如果设置“roles”字段,我们要求框架设置“MULTI_ROLE”功能。

MULTI_ROLE表示框架通过使用新引入的“roles”字段“多租户”的能力,并检查“Offer.allocation_info”以确定提供的role。 我们也期望“单租户”调度人员最终提供这种安排,并远离已弃用的“role”字段。

注册试验:

生成FrameworkInfo:

framework = mesos_pb2.FrameworkInfo()
framework.user = 'root'
framework.name = 'mhc'
framework.checkpoint = True
framework.roles.append("mhc1")
framework.roles.append("mhc2")
capability = framework.capabilities.add()
capability.type = 6

通过mesos /frameworks 查看框架信息

{
"id": "9270833d-e7f7-4e74-a396-6f70a63676f0-0002",
"name": "mhc",
"pid": "scheduler-11316f0f-8fa3-4af9-b0a3-46587a68bc31@192.168.111.120:34883",
"used_resources": {
"disk": 0.0,
"mem": 0.0,
"gpus": 0.0,
"cpus": 0.0
},
"offered_resources": {
"disk": 455.0,
"mem": 911.0,
"gpus": 0.0,
"cpus": 1.0,
"ports": "[31000-32000]"
},
"capabilities": [
"MULTI_ROLE"
],
"hostname": "webtest",
"webui_url": "",
"active": true,
"connected": true,
"recovered": false,
"user": "root",
"failover_timeout": 0.0,
"checkpoint": true,
"registered_time": 1492104533.63482,
"unregistered_time": 0.0,
"resources": {
"disk": 455.0,
"mem": 911.0,
"gpus": 0.0,
"cpus": 1.0,
"ports": "[31000-32000]"
},
"roles": [
"mhc1",
"mhc2"
],
"tasks": [],
"unreachable_tasks": [],
"completed_tasks": [],
"offers": [
{
"id": "9270833d-e7f7-4e74-a396-6f70a63676f0-O6",
"framework_id": "9270833d-e7f7-4e74-a396-6f70a63676f0-0002",
"slave_id": "9270833d-e7f7-4e74-a396-6f70a63676f0-S0",
"resources": {
"disk": 455.0,
"mem": 911.0,
"gpus": 0.0,
"cpus": 1.0,
"ports": "[31000-32000]"
}
}
],
"executors": []
}

multi role的更多相关文章

  1. Video Codecs by FOURCC 视频格式编码

    FOURCC Name Summary 1978 A.M.Paredes predictor This is a LossLess video codec. >>> 2VUY 2VU ...

  2. BusinessUnit, User, Role 中常用的APIs

    前段时间为了做项目调研,写了一些测试API的例子.这些API主要涉及这些模块: BusinessUnit, User, Role.把它分享出来,希望对大家的工作有所帮助. APIs No Module ...

  3. 解决:win10_x64 VMware Workstation and Hyper-V are not compatible. Remove the Hyper-V role from the system before running VMware Workstation

    bcdedit /set hypervisorlaunchtype off A reboot of of the Windows OS is necessary  必须重启才能生效   To enab ...

  4. html中role的作用

    role 是增强语义性,当现有的HTML标签不能充分表达语义性的时候,就可以借助role来说明. 通常这种情况出现在一些自定义的组件上,这样可增强组件的可访问性.可用性和可交互性. role的作用是描 ...

  5. jedis支持哨兵主从配置role为slave

    jedis功能强大,但是不能像nodejs一样指定从slave中读数据,使数据量读写量较大时读写分离,减少redis压力. 我们可以利用jedis中的方法封装一个类似于此的方法. github地址: ...

  6. RBAC中 permission , role, rule 的理解

    Role Based Access Control (RBAC)——基于角色的权限控制 permission e.g. creating posts, updating posts role A ro ...

  7. Security8:删除Role 和 User

    数据库的Role 和 User都是基于Specified DB的,在删除这些Principal之前,必须使用Use clause,切换到指定的DB中. sys.database_role_member ...

  8. 使用 fixed role 授予权限

    今天下午,Leader 发mail给我,要求授予某个User对数据库只读的权限. Step1,在SQL Server中为该用户创建一个Login和User,在创建User时,建立Login 和 Use ...

  9. ABP 初探 之User、Role、Permission数据库设计 (EntityFramework 继承的另一种使用方法)

    最近群里(134710707)的朋友都在讨论ABP源码,我把最近学习的内容记录下来,同时也分享给大家,希望正在研究ABP源码的朋友有一定帮助. 上篇介绍ABP的多语言,本篇主要介绍权限的数据库设计,用 ...

随机推荐

  1. JMeter性能(压力)测试--使用解锁

    1. 首先去官网下载JMeter:  http://jmeter.apache.org/download_jmeter.cgi 2. 解压缩后到目录 \apache-jmeter-5.0\bin 下找 ...

  2. h5项目如何打成war包

    有着java的运行环境,进入到h5工作目录,运行: jar -cvf projectname.war ./* projectname为项目的名称.

  3. Error building Player: UnityException: Bundle Identifier has not been set up correctly

    错误提示: Error building Player: UnityException: Bundle Identifier has not been set up correctlyPlease s ...

  4. Notes on Noise Contrastive Estimation and Negative Sampling

    Notes on Noise Contrastive Estimation and Negative Sampling ## 生成负样本 在常见的关系抽取应用中,我们经常需要生成负样本来训练一个好的系 ...

  5. spark sql运行原理

    Spark sql 对SQL语句的处理,先将SQL语句进行解析(parse)形成一个tree,然后使用Rule对Tree进行绑定,优化等处理过程,通过模式匹配对不同类型的节点采用不同操作.查询优化器是 ...

  6. 3. orcle导入导出dmp文件并更改表空间

    0.数据泵导入导出: expdp  test/test@10.0.0.11/orcl schemas=test dumpfile=test.dmp directory=DPDATA  logfile= ...

  7. nosql数据库:mongodb,redis,memcached,其优缺点和使用应用场景

    1.mongodb (1)是文档型的非关系型数据库,使用bson结构.其优势在于查询功能比较强大,能存储海量数据,缺点是比较消耗内存. (2)一般可以用来存放评论等半结构化数据,支持二级索引. 适合存 ...

  8. Redis 密码

  9. java的原子类 AtomicInteger 实现原理是什么?

    采用硬件提供原子操作指令实现的,即CAS.每次调用都会先判断预期的值是否符合,才进行写操作,保证数据安全. CAS机制 CAS是英文单词Compare And Swap的缩写,翻译过来就是比较并替换. ...

  10. APP-8.2-Postman应用

    用户在开发或者调试网络程序或者是网页B/S模式的程序的时候是需要一些方法来跟踪网页请求的,用户可以使用一些网络的监视工具比如著名的Firebug等网页调试工具.今天给大家介绍的这款网页调试工具不仅可以 ...