You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/06/20 22:52:38 UTC

mesos git commit: Added missing comments for operator API protos.

Repository: mesos
Updated Branches:
  refs/heads/master e3a825a5c -> 78ba129a6


Added missing comments for operator API protos.

Review: https://reviews.apache.org/r/48905/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/78ba129a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/78ba129a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/78ba129a

Branch: refs/heads/master
Commit: 78ba129a6150cd809102bc8b99ea5fde51f13605
Parents: e3a825a
Author: haosdent huang <ha...@gmail.com>
Authored: Mon Jun 20 15:52:25 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Jun 20 15:52:25 2016 -0700

----------------------------------------------------------------------
 include/mesos/agent/agent.proto      | 31 +++++++++------
 include/mesos/master/master.proto    | 63 +++++++++++++++++++++----------
 include/mesos/v1/agent/agent.proto   | 31 +++++++++------
 include/mesos/v1/master/master.proto | 63 +++++++++++++++++++++----------
 4 files changed, 128 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/78ba129a/include/mesos/agent/agent.proto
----------------------------------------------------------------------
diff --git a/include/mesos/agent/agent.proto b/include/mesos/agent/agent.proto
index b305ff5..1792d40 100644
--- a/include/mesos/agent/agent.proto
+++ b/include/mesos/agent/agent.proto
@@ -36,13 +36,13 @@ message Call {
    enum Type {
     UNKNOWN = 0;
 
-    GET_HEALTH = 1;
-    GET_FLAGS = 2;
-    GET_VERSION = 3;
-    GET_METRICS = 4;                   // See 'GetMetrics' below.
+    GET_HEALTH = 1;         // Retrieves the agent's health status.
+    GET_FLAGS = 2;          // Retrieves the agent's flag configuration.
+    GET_VERSION = 3;        // Retrieves the agent's version information.
+    GET_METRICS = 4;        // See 'GetMetrics' below.
 
-    GET_LOGGING_LEVEL = 5;
-    SET_LOGGING_LEVEL = 6;             // See 'SetLoggingLevel' below.
+    GET_LOGGING_LEVEL = 5;  // Retrieves the agent's logging level.
+    SET_LOGGING_LEVEL = 6;  // See 'SetLoggingLevel' below.
 
     LIST_FILES = 7;
     READ_FILE = 8;
@@ -101,12 +101,12 @@ message Response {
   enum Type {
     UNKNOWN = 0;
 
-    GET_HEALTH = 1;
-    GET_FLAGS = 2;
-    GET_VERSION = 3;
-    GET_METRICS = 4;              // See 'GetMetrics' below.
+    GET_HEALTH = 1;                // See 'GetHealth' below.
+    GET_FLAGS = 2;                 // See 'GetFlags' below.
+    GET_VERSION = 3;               // See 'GetVersion' below.
+    GET_METRICS = 4;               // See 'GetMetrics' below.
 
-    GET_LOGGING_LEVEL = 5;
+    GET_LOGGING_LEVEL = 5;         // See 'GetLoggingLevel' below.
 
     LIST_FILES = 6;
     GET_FILE_CONTENTS = 7;
@@ -118,14 +118,21 @@ message Response {
     GET_CONTAINERS = 10;
   }
 
+  // The response for 'Call::GET_HEALTH', `healthy` would be true if the agent
+  // is healthy. Delayed responses are also indicative of the poor health of the
+  // agent.
   message GetHealth {
     required bool healthy = 1;
   }
 
+  // The response for 'Call::GET_FLAGS', contains the flag configuration of the
+  // agent.
   message GetFlags {
     repeated Flag flags = 1;
   }
 
+  // The response for 'Call::GET_VERSION', contains the version information of
+  // the agent.
   message GetVersion {
     required VersionInfo version_info = 1;
   }
@@ -136,6 +143,8 @@ message Response {
     repeated Metric metrics = 1;
   }
 
+  // The response for 'Call::GET_LOGGING_LEVEL', contains the logging level of
+  // the agent.
   message GetLoggingLevel {
     required uint32 level = 1;
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/78ba129a/include/mesos/master/master.proto
----------------------------------------------------------------------
diff --git a/include/mesos/master/master.proto b/include/mesos/master/master.proto
index b3ce61d..66e01c6 100644
--- a/include/mesos/master/master.proto
+++ b/include/mesos/master/master.proto
@@ -42,13 +42,13 @@ message Call {
    // a streaming response of `Event`.
     UNKNOWN = 0;
 
-    GET_HEALTH = 1;
-    GET_FLAGS = 2;
-    GET_VERSION = 3;
-    GET_METRICS = 4;                   // See 'GetMetrics' below.
+    GET_HEALTH = 1;         // Retrieves the master's health status.
+    GET_FLAGS = 2;          // Retrieves the master's flag configuration.
+    GET_VERSION = 3;        // Retrieves the master's version information.
+    GET_METRICS = 4;        // See 'GetMetrics' below.
 
-    GET_LOGGING_LEVEL = 5;
-    SET_LOGGING_LEVEL = 6;             // See 'SetLoggingLevel' below.
+    GET_LOGGING_LEVEL = 5;  // Retrieves the master's logging level.
+    SET_LOGGING_LEVEL = 6;  // See 'SetLoggingLevel' below.
 
     LIST_FILES = 7;
     READ_FILE = 8;
@@ -58,13 +58,13 @@ message Call {
 
     GET_AGENTS = 11;
     GET_FRAMEWORKS = 12;
-    GET_TASKS = 13;
+    GET_TASKS = 13;         // See 'GetTasks' below.
     GET_ROLES = 14;
 
     GET_WEIGHTS = 15;
     UPDATE_WEIGHTS = 16;
 
-    GET_LEADING_MASTER = 17;
+    GET_LEADING_MASTER = 17; // Retrieves the leading master information.
 
     SUBSCRIBE = 18;
 
@@ -74,11 +74,13 @@ message Call {
     CREATE_VOLUMES = 21;
     DESTROY_VOLUMES = 22;
 
+    // Retrieves the cluster's maintenance status.
     GET_MAINTENANCE_STATUS = 23;
+    // Retrieves the cluster's maintenance schedule.
     GET_MAINTENANCE_SCHEDULE = 24;
-    UPDATE_MAINTENANCE_SCHEDULE = 25;
-    START_MAINTENANCE = 26;
-    STOP_MAINTENANCE = 27;
+    UPDATE_MAINTENANCE_SCHEDULE = 25; // See 'UpdateMaintenanceSchedule' below.
+    START_MAINTENANCE = 26;           // See 'StartMaintenance' below.
+    STOP_MAINTENANCE = 27;            // See 'StopMaintenance' below.
 
     GET_QUOTA = 28;
     SET_QUOTA = 29;
@@ -149,14 +151,19 @@ message Call {
     repeated Resource volumes = 2;
   }
 
+  // Updates the cluster's maintenance schedule.
   message UpdateMaintenanceSchedule {
     required maintenance.Schedule schedule = 1;
   }
 
+  // Starts the maintenance of the cluster, this would bring a set of machines
+  // down.
   message StartMaintenance {
     repeated MachineID machines = 1;
   }
 
+  // Stops the maintenance of the cluster, this would bring a set of machines
+  // back up.
   message StopMaintenance {
     repeated MachineID machines = 1;
   }
@@ -197,12 +204,12 @@ message Response {
   enum Type {
     UNKNOWN = 0;
 
-    GET_HEALTH = 1;
-    GET_FLAGS = 2;
-    GET_VERSION = 3;
-    GET_METRICS = 4;              // See 'GetMetrics' below.
+    GET_HEALTH = 1;                // See 'GetHealth' below.
+    GET_FLAGS = 2;                 // See 'GetFlags' below.
+    GET_VERSION = 3;               // See 'GetVersion' below.
+    GET_METRICS = 4;               // See 'GetMetrics' below.
 
-    GET_LOGGING_LEVEL = 5;
+    GET_LOGGING_LEVEL = 5;         // See 'GetLoggingLevel' below.
 
     LIST_FILES = 6;
     GET_FILE_CONTENTS = 7;
@@ -217,22 +224,29 @@ message Response {
 
     GET_WEIGHTS = 14;
 
-    GET_LEADING_MASTER = 15;
+    GET_LEADING_MASTER = 15;       // See 'GetLeadingMaster' below.
 
-    GET_MAINTENANCE_STATUS = 16;
-    GET_MAINTENANCE_SCHEDULE = 17;
+    GET_MAINTENANCE_STATUS = 16;   // See 'GetMaintenanceStatus' below.
+    GET_MAINTENANCE_SCHEDULE = 17; // See 'GetMaintenanceSchedule' below.
 
     GET_QUOTA = 18;
   }
 
+  // The response for 'Call::GET_HEALTH', `healthy` would be true if the master
+  // is healthy. Delayed responses are also indicative of the poor health of the
+  // master.
   message GetHealth {
     required bool healthy = 1;
   }
 
+  // The response for 'Call::GET_FLAGS', contains the flag configuration of the
+  // master.
   message GetFlags {
     repeated Flag flags = 1;
   }
 
+  // The response for 'Call::GET_VERSION', contains the version information of
+  // the master.
   message GetVersion {
     required VersionInfo version_info = 1;
   }
@@ -243,6 +257,8 @@ message Response {
     repeated Metric metrics = 1;
   }
 
+  // The response for 'Call::GET_LOGGING_LEVEL', contains the logging level of
+  // the master.
   message GetLoggingLevel {
     required uint32 level = 1;
   }
@@ -298,14 +314,23 @@ message Response {
     repeated WeightInfo weight_infos = 1;
   }
 
+  // The response for 'Call::GET_LEADING_MASTER', contains the leading master
+  // information.
+  // NOTE: This is broken currently "on the cloud" (e.g. EC2) as it stores the
+  // private IP address, unless advertise_ip points to an externally accessible
+  // IP.
   message GetLeadingMaster {
     optional MasterInfo master_info = 1;
   }
 
+  // The response for 'Call::GET_MAINTENANCE_STATUS', contains the cluster's
+  // maintenance status.
   message GetMaintenanceStatus {
     required maintenance.ClusterStatus status = 1;
   }
 
+  // The response for 'Call::GET_MAINTENANCE_SCHEDULE', contains the cluster's
+  // maintenance schedule.
   message GetMaintenanceSchedule {
     required maintenance.Schedule schedule = 1;
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/78ba129a/include/mesos/v1/agent/agent.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/agent/agent.proto b/include/mesos/v1/agent/agent.proto
index 5ac6d4c..7b5988f 100644
--- a/include/mesos/v1/agent/agent.proto
+++ b/include/mesos/v1/agent/agent.proto
@@ -36,13 +36,13 @@ message Call {
    enum Type {
     UNKNOWN = 0;
 
-    GET_HEALTH = 1;
-    GET_FLAGS = 2;
-    GET_VERSION = 3;
-    GET_METRICS = 4;                   // See 'GetMetrics' below.
+    GET_HEALTH = 1;         // Retrieves the agent's health status.
+    GET_FLAGS = 2;          // Retrieves the agent's flag configuration.
+    GET_VERSION = 3;        // Retrieves the agent's version information.
+    GET_METRICS = 4;        // See 'GetMetrics' below.
 
-    GET_LOGGING_LEVEL = 5;
-    SET_LOGGING_LEVEL = 6;             // See 'SetLoggingLevel' below.
+    GET_LOGGING_LEVEL = 5;  // Retrieves the agent's logging level.
+    SET_LOGGING_LEVEL = 6;  // See 'SetLoggingLevel' below.
 
     LIST_FILES = 7;
     READ_FILE = 8;
@@ -101,12 +101,12 @@ message Response {
   enum Type {
     UNKNOWN = 0;
 
-    GET_HEALTH = 1;
-    GET_FLAGS = 2;
-    GET_VERSION = 3;
-    GET_METRICS = 4;              // See 'GetMetrics' below.
+    GET_HEALTH = 1;                // See 'GetHealth' below.
+    GET_FLAGS = 2;                 // See 'GetFlags' below.
+    GET_VERSION = 3;               // See 'GetVersion' below.
+    GET_METRICS = 4;               // See 'GetMetrics' below.
 
-    GET_LOGGING_LEVEL = 5;
+    GET_LOGGING_LEVEL = 5;         // See 'GetLoggingLevel' below.
 
     LIST_FILES = 6;
     GET_FILE_CONTENTS = 7;
@@ -118,14 +118,21 @@ message Response {
     GET_CONTAINERS = 10;
   }
 
+  // The response for 'Call::GET_HEALTH', `healthy` would be true if the agent
+  // is healthy. Delayed responses are also indicative of the poor health of the
+  // agent.
   message GetHealth {
     required bool healthy = 1;
   }
 
+  // The response for 'Call::GET_FLAGS', contains the flag configuration of the
+  // agent.
   message GetFlags {
     repeated Flag flags = 1;
   }
 
+  // The response for 'Call::GET_VERSION', contains the version information of
+  // the agent.
   message GetVersion {
     required VersionInfo version_info = 1;
   }
@@ -136,6 +143,8 @@ message Response {
     repeated Metric metrics = 1;
   }
 
+  // The response for 'Call::GET_LOGGING_LEVEL', contains the logging level of
+  // the agent.
   message GetLoggingLevel {
     required uint32 level = 1;
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/78ba129a/include/mesos/v1/master/master.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/master/master.proto b/include/mesos/v1/master/master.proto
index abcf628..dfa55fa 100644
--- a/include/mesos/v1/master/master.proto
+++ b/include/mesos/v1/master/master.proto
@@ -42,13 +42,13 @@ message Call {
    // a streaming response of `Event`.
     UNKNOWN = 0;
 
-    GET_HEALTH = 1;
-    GET_FLAGS = 2;
-    GET_VERSION = 3;
-    GET_METRICS = 4;                   // See 'GetMetrics' below.
+    GET_HEALTH = 1;         // Retrieves the master's health status.
+    GET_FLAGS = 2;          // Retrieves the master's flag configuration.
+    GET_VERSION = 3;        // Retrieves the master's version information.
+    GET_METRICS = 4;        // See 'GetMetrics' below.
 
-    GET_LOGGING_LEVEL = 5;
-    SET_LOGGING_LEVEL = 6;             // See 'SetLoggingLevel' below.
+    GET_LOGGING_LEVEL = 5;  // Retrieves the master's logging level.
+    SET_LOGGING_LEVEL = 6;  // See 'SetLoggingLevel' below.
 
     LIST_FILES = 7;
     READ_FILE = 8;
@@ -58,13 +58,13 @@ message Call {
 
     GET_AGENTS = 11;
     GET_FRAMEWORKS = 12;
-    GET_TASKS = 13;
+    GET_TASKS = 13;         // See 'GetTasks' below.
     GET_ROLES = 14;
 
     GET_WEIGHTS = 15;
     UPDATE_WEIGHTS = 16;
 
-    GET_LEADING_MASTER = 17;
+    GET_LEADING_MASTER = 17; // Retrieves the leading master information.
 
     SUBSCRIBE = 18;
 
@@ -74,11 +74,13 @@ message Call {
     CREATE_VOLUMES = 21;
     DESTROY_VOLUMES = 22;
 
+    // Retrieves the cluster's maintenance status.
     GET_MAINTENANCE_STATUS = 23;
+    // Retrieves the cluster's maintenance schedule.
     GET_MAINTENANCE_SCHEDULE = 24;
-    UPDATE_MAINTENANCE_SCHEDULE = 25;
-    START_MAINTENANCE = 26;
-    STOP_MAINTENANCE = 27;
+    UPDATE_MAINTENANCE_SCHEDULE = 25; // See 'UpdateMaintenanceSchedule' below.
+    START_MAINTENANCE = 26;           // See 'StartMaintenance' below.
+    STOP_MAINTENANCE = 27;            // See 'StopMaintenance' below.
 
     GET_QUOTA = 28;
     SET_QUOTA = 29;
@@ -149,14 +151,19 @@ message Call {
     repeated Resource volumes = 2;
   }
 
+  // Updates the cluster's maintenance schedule.
   message UpdateMaintenanceSchedule {
     required maintenance.Schedule schedule = 1;
   }
 
+  // Starts the maintenance of the cluster, this would bring a set of machines
+  // down.
   message StartMaintenance {
     repeated MachineID machines = 1;
   }
 
+  // Stops the maintenance of the cluster, this would bring a set of machines
+  // back up.
   message StopMaintenance {
     repeated MachineID machines = 1;
   }
@@ -197,12 +204,12 @@ message Response {
   enum Type {
     UNKNOWN = 0;
 
-    GET_HEALTH = 1;
-    GET_FLAGS = 2;
-    GET_VERSION = 3;
-    GET_METRICS = 4;              // See 'GetMetrics' below.
+    GET_HEALTH = 1;                // See 'GetHealth' below.
+    GET_FLAGS = 2;                 // See 'GetFlags' below.
+    GET_VERSION = 3;               // See 'GetVersion' below.
+    GET_METRICS = 4;               // See 'GetMetrics' below.
 
-    GET_LOGGING_LEVEL = 5;
+    GET_LOGGING_LEVEL = 5;         // See 'GetLoggingLevel' below.
 
     LIST_FILES = 6;
     GET_FILE_CONTENTS = 7;
@@ -217,22 +224,29 @@ message Response {
 
     GET_WEIGHTS = 14;
 
-    GET_LEADING_MASTER = 15;
+    GET_LEADING_MASTER = 15;       // See 'GetLeadingMaster' below.
 
-    GET_MAINTENANCE_STATUS = 16;
-    GET_MAINTENANCE_SCHEDULE = 17;
+    GET_MAINTENANCE_STATUS = 16;   // See 'GetMaintenanceStatus' below.
+    GET_MAINTENANCE_SCHEDULE = 17; // See 'GetMaintenanceSchedule' below.
 
     GET_QUOTA = 18;
   }
 
+  // The response for 'Call::GET_HEALTH', `healthy` would be true if the master
+  // is healthy. Delayed responses are also indicative of the poor health of the
+  // master.
   message GetHealth {
     required bool healthy = 1;
   }
 
+  // The response for 'Call::GET_FLAGS', contains the flag configuration of the
+  // master.
   message GetFlags {
     repeated Flag flags = 1;
   }
 
+  // The response for 'Call::GET_VERSION', contains the version information of
+  // the master.
   message GetVersion {
     required VersionInfo version_info = 1;
   }
@@ -243,6 +257,8 @@ message Response {
     repeated Metric metrics = 1;
   }
 
+  // The response for 'Call::GET_LOGGING_LEVEL', contains the logging level of
+  // the master.
   message GetLoggingLevel {
     required uint32 level = 1;
   }
@@ -294,14 +310,23 @@ message Response {
     repeated WeightInfo weight_infos = 1;
   }
 
+  // The response for 'Call::GET_LEADING_MASTER', contains the leading master
+  // information.
+  // NOTE: This is broken currently "on the cloud" (e.g. EC2) as it stores the
+  // private IP address, unless advertise_ip points to an externally accessible
+  // IP.
   message GetLeadingMaster {
     optional MasterInfo master_info = 1;
   }
 
+  // The response for 'Call::GET_MAINTENANCE_STATUS', contains the cluster's
+  // maintenance status.
   message GetMaintenanceStatus {
     required maintenance.ClusterStatus status = 1;
   }
 
+  // The response for 'Call::GET_MAINTENANCE_SCHEDULE', contains the cluster's
+  // maintenance schedule.
   message GetMaintenanceSchedule {
     required maintenance.Schedule schedule = 1;
   }