You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2014/08/12 20:03:11 UTC

[jira] [Created] (MESOS-1695) The stats.json endpoint on the slave exposes "registered" as a string.

Benjamin Mahler created MESOS-1695:
--------------------------------------

             Summary: The stats.json endpoint on the slave exposes "registered" as a string.
                 Key: MESOS-1695
                 URL: https://issues.apache.org/jira/browse/MESOS-1695
             Project: Mesos
          Issue Type: Bug
          Components: slave
            Reporter: Benjamin Mahler
            Assignee: Vinod Kone
            Priority: Minor


The slave is currently exposing a string value for the "registered" statistic, this should be a number:

{code}
slave:5051/stats.json
{
  "recovery_errors": 0,
  "registered": "1",
  "slave/executors_registering": 0,
  ...
}
{code}

Should be a pretty straightforward fix, looks like this first originated back in 2013:

{code}
commit b8291304e1523eb67ea8dc5f195cdb0d8e7d8348
Author: Vinod Kone <vi...@twitter.com>
Date:   Wed Jul 3 12:37:36 2013 -0700

    Added a "registered" key/value pair to slave's stats.json.

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

diff --git a/src/slave/http.cpp b/src/slave/http.cpp
index dc2955f..dd51516 100644
--- a/src/slave/http.cpp
+++ b/src/slave/http.cpp
@@ -281,6 +281,8 @@ Future<Response> Slave::Http::stats(const Request& request)
   object.values["lost_tasks"] = slave.stats.tasks[TASK_LOST];
   object.values["valid_status_updates"] = slave.stats.validStatusUpdates;
   object.values["invalid_status_updates"] = slave.stats.invalidStatusUpdates;
+  object.values["registered"] = slave.master ? "1" : "0";
+

   return OK(object, request.query.get("jsonp"));
 }
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)