multi role
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的更多相关文章
- Video Codecs by FOURCC 视频格式编码
FOURCC Name Summary 1978 A.M.Paredes predictor This is a LossLess video codec. >>> 2VUY 2VU ...
- BusinessUnit, User, Role 中常用的APIs
前段时间为了做项目调研,写了一些测试API的例子.这些API主要涉及这些模块: BusinessUnit, User, Role.把它分享出来,希望对大家的工作有所帮助. APIs No Module ...
- 解决: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 ...
- html中role的作用
role 是增强语义性,当现有的HTML标签不能充分表达语义性的时候,就可以借助role来说明. 通常这种情况出现在一些自定义的组件上,这样可增强组件的可访问性.可用性和可交互性. role的作用是描 ...
- jedis支持哨兵主从配置role为slave
jedis功能强大,但是不能像nodejs一样指定从slave中读数据,使数据量读写量较大时读写分离,减少redis压力. 我们可以利用jedis中的方法封装一个类似于此的方法. github地址: ...
- RBAC中 permission , role, rule 的理解
Role Based Access Control (RBAC)——基于角色的权限控制 permission e.g. creating posts, updating posts role A ro ...
- Security8:删除Role 和 User
数据库的Role 和 User都是基于Specified DB的,在删除这些Principal之前,必须使用Use clause,切换到指定的DB中. sys.database_role_member ...
- 使用 fixed role 授予权限
今天下午,Leader 发mail给我,要求授予某个User对数据库只读的权限. Step1,在SQL Server中为该用户创建一个Login和User,在创建User时,建立Login 和 Use ...
- ABP 初探 之User、Role、Permission数据库设计 (EntityFramework 继承的另一种使用方法)
最近群里(134710707)的朋友都在讨论ABP源码,我把最近学习的内容记录下来,同时也分享给大家,希望正在研究ABP源码的朋友有一定帮助. 上篇介绍ABP的多语言,本篇主要介绍权限的数据库设计,用 ...
随机推荐
- MySQL C API(23)
C API 提供了对 MySQL c/s 模型的底层访问.C API 代码在 mysqlclient 库中实现.可以从该库中引用到的变量及含义: 环境变量 含义 MYSQL_UNIX_PORT 本地连 ...
- tpc资料汇总
官方资料 TPC官网 http://www.tpc.org/ 配置文档 大家一起来测试,benchmark起来(MySQL下的TPC-C,TPC-H,TPC-W) http://www.itpub ...
- 36.scrapy框架采集全球玻璃网数据
1.采集目标地址 https://www.glass.cn/gongying/sellindex.aspx 网站比较简单,没什么大的需要注意的问题.2.通过分析测试 https://www.glass ...
- nodejs操作monggodb数据库封装
var MongoClient=require('mongodb').MongoClient; var DbUrl='mongodb://localhost:27017/productmanage'; ...
- Flex4学习笔记1---基本语法
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...
- 2018年1月21日--2月4日 NAS
二十号去比赛时,与同事闲聊时说起家庭服务器,后来搜到nas(网络附着存储器),找到freenas,突然觉得很有用,手机拍了大量的照片视频,存储在电脑,已经换过几次硬盘了,对于这些珍贵的资料,万一硬盘坏 ...
- python大法好——
1.字符串 字符串是 Python 中最常用的数据类型.我们可以使用引号('或")来创建字符串. Python的字符串内建函数 Python 的字符串常用内建函数如下: 1.大小写转换: & ...
- vue语法小练习
实现功能:新增/删除 学生 <html> <head> <script src="https://cdn.staticfile.org/vue/2.2.2/vu ...
- delphi RTTI 四 获取类属性列表
delphi RTTI 四 获取类属性列表 GetPropList(btn1.ClassInfo, tkAny, PropList) PropCount := GetTypeData(btn1.Cla ...
- UI5-Fiori初学者导航
正文 你是UI5和Fiori的新手?来对地方了. 对我来说,今年是不得不“跟上时代”去提升自己ABAP世界以外的技术技能的困难的一年.幸运的是,有很多可免费获得的信息和课程可以帮你实现这个跳跃.不要等 ...