After setting up all the Mesos Master, Slave, ZooKeeper, Marathon.
I have click the Green Button "Create App"
Once it is running on Mesos-Master and the completed task state Fnished.
Where can I get the json file? From which folder ??

- 165
- 1
- 6
- 21
-
Hi there, do you mean the app definition, or are you looking for output generated by the task you ran? – Connor Doyle Feb 03 '15 at 00:26
-
If your task is expected to run only once and create a result (i.e. a batch processing job) you should rather use Chronos. Marathon has been created to run and monitor long running services. – drexin Feb 03 '15 at 07:08
1 Answers
It's unclear what JSON you're referring too, so I'll answer both the case where you want the JSON that describes the application itself (1) (which is used by Marathon) and the case where you're looking to retrieve some JSON output of an application once it has run (2).
1) If you're looking to get the application definition JSON
You can easily get the JSON that describes the Marathon application from the Marathon REST API but only while the application is still running.
For example, let me create a test application that runs the sleep command for a long time:
Once it has deployed and is running, the Marathon UI looks something like this:
We can go to the <marathon-ip>
/v2/apps endpoint to see a full list of running applications (full documentation for these endpoints is available on the Marathon docs site):
Alternatively, going to the <marathon-ip>
/v2/apps/<app-id>
endpoint (in this case, <app-id>
is test-app) will just show the running application's JSON, albeit in more depth, with task information too:
2) If you're looking for the output of the application task that you've just run
Tasks are individual instantiations of an application, so if you tell Marathon to run 10 instances of your application, this will show up as 10 Mesos tasks.
Mesos stores the stdout and stderr for each running task and a certain number of finished tasks (I think for up to 1,000 finished tasks). You can view these by going to the Mesos web console and clicking on the "Sandbox" link next to the task in question. Using the example from the first part of this answer, we see a currently running task here with a Sandbox link next to it:
Clicking the Sandbox link takes us to this page, which links to the stderr and stdout output of the task:
Any other working files created by that task will be shown here too. So, for instance, if your application is generating output files, they'll be accessible via this interface.
Clicking on the stdout link shows the following stdout output for our sleep application:
(Note that the Mesos command line interface also provides a very easy and developer friendly way to access the stdout, stderr and contents of individual task sandboxes too.)
Hope this helps :).

- 188
- 7