Repository: mesos Updated Branches: refs/heads/master 69d4cf654 -> 1d52baf18
Added oversubscription.proto for QoS Controller and slave communication. This proto describes a QoS correction message for particular executor or task. It is a generic message between QoS Controller and slave. Additionaly, updated Makefile to include this proto during compilation. Review: https://reviews.apache.org/r/34581 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1d52baf1 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1d52baf1 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1d52baf1 Branch: refs/heads/master Commit: 1d52baf1839382a9052a3ede4cd2f071d1c5e517 Parents: 69d4cf6 Author: Bartek Plotka <[email protected]> Authored: Tue May 26 19:19:57 2015 -0700 Committer: Niklas Q. Nielsen <[email protected]> Committed: Wed May 27 08:23:06 2015 -0700 ---------------------------------------------------------------------- include/mesos/slave/oversubscription.proto | 51 +++++++++++++++++++++++++ src/Makefile.am | 21 ++++++++-- 2 files changed, 69 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/1d52baf1/include/mesos/slave/oversubscription.proto ---------------------------------------------------------------------- diff --git a/include/mesos/slave/oversubscription.proto b/include/mesos/slave/oversubscription.proto new file mode 100644 index 0000000..fa69a95 --- /dev/null +++ b/include/mesos/slave/oversubscription.proto @@ -0,0 +1,51 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import "mesos/mesos.proto"; + +package mesos.slave; + +option java_package = "org.apache.mesos"; +option java_outer_classname = "Protos"; + + +/** + * The QoS Controller informs the slave that particular corrective + * actions need to be made. Each corrective action contains + * information about executor or task and the type of action to + * perform. + */ +message QoSCorrection { + // NOTE: In the future we can define more actions like + // freeze and resize. + enum Type { + KILL = 1; // Terminate an executor. + } + + // Kill action which will be performed on an executor. + // NOTE: The framework id must be set for the specified executor. + // NOTE: In the future we may also kill individual tasks by + // specifying an optional 'task_id'. + message Kill { + optional FrameworkID framework_id = 1; + optional ExecutorID executor_id = 2; + } + + required Type type = 1; + optional Kill kill = 2; +} http://git-wip-us.apache.org/repos/asf/mesos/blob/1d52baf1/src/Makefile.am ---------------------------------------------------------------------- diff --git a/src/Makefile.am b/src/Makefile.am index 814468e..28669f6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -158,6 +158,9 @@ MODULE_PROTO = \ SCHEDULER_PROTO = \ $(top_srcdir)/include/mesos/scheduler/scheduler.proto +OVERSUBSCRIPTION_PROTO = \ + $(top_srcdir)/include/mesos/slave/oversubscription.proto + CXX_PROTOS = \ mesos.pb.cc \ ../include/mesos/mesos.pb.h \ @@ -172,7 +175,9 @@ CXX_PROTOS = \ module/module.pb.cc \ ../include/mesos/module/module.pb.h \ scheduler/scheduler.pb.cc \ - ../include/mesos/scheduler/scheduler.pb.h + ../include/mesos/scheduler/scheduler.pb.h \ + slave/oversubscription.pb.cc \ + ../include/mesos/slave/oversubscription.pb.h JAVA_PROTOS = \ java/generated/org/apache/mesos/Protos.java \ @@ -249,6 +254,12 @@ scheduler/%.pb.cc ../include/mesos/scheduler/%.pb.h: $(SCHEDULER_PROTO) $(PROTOC) $(PROTOCFLAGS) --cpp_out=../include $^ mv ../include/mesos/scheduler/*.pb.cc $(@D) +slave/%.pb.cc ../include/mesos/slave/%.pb.h: $(OVERSUBSCRIPTION_PROTO) + $(MKDIR_P) $(@D) + $(MKDIR_P) ../include/mesos/slave + $(PROTOC) $(PROTOCFLAGS) --cpp_out=../include $^ + mv ../include/mesos/slave/*.pb.cc $(@D) + %.pb.cc %.pb.h: %.proto $(MKDIR_P) $(@D) $(PROTOC) $(PROTOCFLAGS) --cpp_out=. $^ @@ -455,7 +466,10 @@ slavedir = $(pkgincludedir)/slave slave_HEADERS = \ $(top_srcdir)/include/mesos/slave/isolator.hpp \ - $(top_srcdir)/include/mesos/slave/resource_estimator.hpp + $(top_srcdir)/include/mesos/slave/resource_estimator.hpp \ + $(top_srcdir)/include/mesos/slave/oversubscription.proto + +nodist_slave_HEADERS = ../include/mesos/slave/oversubscription.pb.h if OS_LINUX libmesos_no_3rdparty_la_SOURCES += linux/cgroups.cpp @@ -722,7 +736,8 @@ libmesos_la_SOURCES = \ $(FETCHER_PROTO) \ $(MESOS_PROTO) \ $(MODULE_PROTO) \ - $(SCHEDULER_PROTO) + $(SCHEDULER_PROTO) \ + $(OVERSUBSCRIPTION_PROTO) libmesos_la_LDFLAGS = -release $(PACKAGE_VERSION)
