简述Mesos API–files
Below is a set of endpoints available on a Mesos agent. These endpoints are reachable at the address http://ip:port/endpoint.
For example, http://agent.com:5051/files/browse
files:
- /files/browse:通过主机ip:5051+/files/browse?path即可以获取当前服务的所有文件信息。
- /file/download:通过主机ip:5051+/files/download?path+filename即可以下载此文件
- /file/read:通过主机ip:5051+/files/read?path+stderr&length&offset即可以查看此服务的Log Viewer Error。
- /file/read:通过主机ip:5051+/file/read?path+stdout&length&offset既可以查看此服务的Log Viewer Output。
PS:
DESCRIPTION
This endpoint reads data from a file at a given offset and for a given length. Query parameters:
1
2
3
|
path=VALUE The path of directory to browse.
offset=VALUE Value added to base address to obtain a second address
length=VALUE Length of file to read.
|
个人理解:length是此次阅读的最大行数。
offset是从stderr/stdout文件的第几个字符(字符包含空格)开始阅读。