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. python requests 发起http POST 请求

    python requests 发起http POST 请求,带参数,带请求头: #!/usr/bin/env python # -*- coding: utf-8 -*- import reques ...

  2. flask 之cbv ,flash闪现,Flask_Session,WTForms - MoudelForm

    1.CBV : from flask import views  class LoginView(views.MethodView):  def get(self):   return     def ...

  3. python-requests数据驱动延伸

    在 python-requests模块的讲解和应用 基础上进行数据驱动的延伸 task_01_requests.py #-*- coding:utf-8 -*- #task_01_requests.p ...

  4. python2和python3的内存使用情况

    python2 对回收后的整数复用内存不作处理 python3则改进了改设计,极大的减少了内存占用 例如 a = range(1000000000000) del a 此时: python2 对于a占 ...

  5. 23.模拟登录cookies请求速询网站数据

    采集速询网站数据: 网站地址:http://www.suxun0752.com/index.html 网站是需要账号登录才给返回信息的,我这里是直接拿的登录后的cookies请求的数据,cookies ...

  6. 6.简单提取小红书app数据(简单初步试采集与分析)-1

    采集小红书数据爬虫:1.本来是要通过app端的接口去直接采集数据,但是app接口手机端设置本地代理这边开启抓包后就不能正常访问数据.所以就采用了微信小程序里的小红书app接口去采集数据. 2.通过 f ...

  7. Android开发中常见的设计模式(二)——Builder模式

    了解了单例模式,接下来介绍另一个常见的模式--Builder模式. 那么什么是Builder模式呢.通过搜索,会发现大部分网上的定义都是 将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建 ...

  8. leetcode990

    class Finder: def __init__(self): self.Parent = [i for i in range(26)] def union(self, p, q): self.P ...

  9. NRF51822之FICR

    uint32_t deviceID[2];union{    uint32_t  DW;    uint8_t   B[4];} device_ID;//read device ID deviceID ...

  10. Spring boot 自定义starter

    以下配置来自尚硅谷.. 常用如何配置 @Configuration //指定这个类是一个配置类 @ConditionalOnXXX //在指定条件成立的情况下自动配置类生效 @AutoConfigur ...