You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Sammy Steele <sa...@stanford.edu> on 2014/08/13 23:07:11 UTC
Getting sandbox data from Web UI
Hi,
I am writing a framework that needs to collect data from the sandboxes of
all currently running Mesos tasks. I've been looking into the
master/state.json but haven't been able to find a url that records the
actual contents of the sandbox. Is there an easy way of doing this without
piecing together the long URL generated when you manually download the
sandbox (e.g.
hotbox-34.stanford.edu:5051/files/download.json?path=%2Ftmp%2Fmesos%2Fslaves%2F20140807-141905-1174818570-5050-30003-0%2Fframeworks%2F20140813-113406-1174818570-5050-30755-0035%2Fexecutors%2Fdefault%2Fruns%2Fa85ffcd0-f6db-4510-8722-e9209f081af9%2Fstdout).
Thanks!
Sammy
Re: Getting sandbox data from Web UI
Posted by Sammy Steele <sa...@stanford.edu>.
Thanks so much! Yes that is exactly what I need to do.
Sent from my iPhone
On Aug 13, 2014, at 5:06 PM, Benjamin Mahler <be...@gmail.com>
wrote:
Just to confirm I understand correctly:
You have a framework, it needs to be a framework because it launches tasks
in the cluster. As part of this framework, you need to look into all of the
sandboxes of all currently running mesos tasks. This includes those tasks
that don't belong to your particular framework.
At the current time, unfortunately, the master does not have the necessary
information for constructing sandbox URLs. I would recommend the following:
(1) Hit master:5050/state.json endpoint to obtain all the slaves.
(2) For each slave, hit slave:5051/state.json.
(3) For each executor on the slave, extract at the 'directory'.
(4) Use the /files endpoints to browse each directory.
Unfortunately there is no information available in /help yet, but the
following are available:
/files/browse.json (takes a 'path' parameter)
/files/debug.json
/files/download.json (takes a 'path' parameter)
/files/read.json (lets you read the contents of a file using 'path',
'offset', 'length')
Hope this helps!
On Wed, Aug 13, 2014 at 2:07 PM, Sammy Steele <sa...@stanford.edu>
wrote:
> Hi,
>
> I am writing a framework that needs to collect data from the sandboxes of
> all currently running Mesos tasks. I've been looking into the
> master/state.json but haven't been able to find a url that records the
> actual contents of the sandbox. Is there an easy way of doing this without
> piecing together the long URL generated when you manually download the
> sandbox (e.g.
> hotbox-34.stanford.edu:5051/files/download.json?path=%2Ftmp%2Fmesos%2Fslaves%2F20140807-141905-1174818570-5050-30003-0%2Fframeworks%2F20140813-113406-1174818570-5050-30755-0035%2Fexecutors%2Fdefault%2Fruns%2Fa85ffcd0-f6db-4510-8722-e9209f081af9%2Fstdout).
> Thanks!
>
> Sammy
>
Re: Getting sandbox data from Web UI
Posted by Benjamin Mahler <be...@gmail.com>.
Just to confirm I understand correctly:
You have a framework, it needs to be a framework because it launches tasks
in the cluster. As part of this framework, you need to look into all of the
sandboxes of all currently running mesos tasks. This includes those tasks
that don't belong to your particular framework.
At the current time, unfortunately, the master does not have the necessary
information for constructing sandbox URLs. I would recommend the following:
(1) Hit master:5050/state.json endpoint to obtain all the slaves.
(2) For each slave, hit slave:5051/state.json.
(3) For each executor on the slave, extract at the 'directory'.
(4) Use the /files endpoints to browse each directory.
Unfortunately there is no information available in /help yet, but the
following are available:
/files/browse.json (takes a 'path' parameter)
/files/debug.json
/files/download.json (takes a 'path' parameter)
/files/read.json (lets you read the contents of a file using 'path',
'offset', 'length')
Hope this helps!
On Wed, Aug 13, 2014 at 2:07 PM, Sammy Steele <sa...@stanford.edu>
wrote:
> Hi,
>
> I am writing a framework that needs to collect data from the sandboxes of
> all currently running Mesos tasks. I've been looking into the
> master/state.json but haven't been able to find a url that records the
> actual contents of the sandbox. Is there an easy way of doing this without
> piecing together the long URL generated when you manually download the
> sandbox (e.g.
> hotbox-34.stanford.edu:5051/files/download.json?path=%2Ftmp%2Fmesos%2Fslaves%2F20140807-141905-1174818570-5050-30003-0%2Fframeworks%2F20140813-113406-1174818570-5050-30755-0035%2Fexecutors%2Fdefault%2Fruns%2Fa85ffcd0-f6db-4510-8722-e9209f081af9%2Fstdout).
> Thanks!
>
> Sammy
>