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的多语言,本篇主要介绍权限的数据库设计,用 ...
随机推荐
- es6(9)--Symbol
//Symbol生成一个独一无二的值,生成的值不会相等 { //声明1 let a1=Symbol(); let a2=Symbol(); console.log(a1===a2);//false / ...
- python requests 发起http POST 请求
python requests 发起http POST 请求,带参数,带请求头: #!/usr/bin/env python # -*- coding: utf-8 -*- import reques ...
- [Unity工具]CSV工具类
参考链接: https://www.cnblogs.com/lulianqi/p/6385503.html http://blog.csdn.net/paul342/article/details/2 ...
- couchdb
http://docs.couchdb.org/en/2.0.0/api/database/find.html#find-selectors
- 重识linux-常见压缩和解压缩命令
重识linux-常见压缩和解压缩命令 1 compress 目前已经很少使用,知道有个 不重点学习 2 gzip和zcat 目前应用最广泛 gzip [-cdtv#] 文件名 zcat 文件名.gz ...
- 10.Appium驱动app报错
1.首先手机使用usb连接电脑端接受控制 2.打开appium,配置Desired Capabilities 参数: Appium驱动打开微信App 参数配置如下: start session 报错: ...
- Mapper的.xml文件的delete的参数问题
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-// ...
- javascript自定义简单map对象功能
这里介绍一种js创建简单map对象的方法: function Map() { //创建object对象, 并给object对象添加key和value属性 var obj1=new Object(); ...
- BlockingQueue之DelayQueue的学习使用
DelayQueue 是一中阻塞队列,需要实现接口Delayed定义的方法.做下使用记录和心得吧, @Datapublic class DelayQueueExample implements Del ...
- mui init 出现无法引入子页面问题
1. 检查项目中是否重复出现了 mui.init() 函数; mui.init({ subpages: [{ styles: { // top: "44px", top: &quo ...