Apache Mesos
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
src
local
flags.hpp
Go to the documentation of this file.
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License. You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
17
#ifndef __LOCAL_FLAGS_HPP__
18
#define __LOCAL_FLAGS_HPP__
19
20
#include <
stout/flags.hpp
>
21
#include <
stout/os.hpp
>
22
#include <
stout/path.hpp
>
23
24
#include "
logging/flags.hpp
"
25
26
namespace
mesos
{
27
namespace
internal
{
28
namespace
local {
29
30
class
Flags
:
public
virtual
logging::Flags
31
{
32
public
:
33
Flags
()
34
{
35
add
(&
Flags::work_dir
,
36
"work_dir"
,
37
"Path of the master/agent work directory. This is where the\n"
38
"persistent information of the cluster will be stored.\n\n"
39
"NOTE: Locations like `/tmp` which are cleaned automatically\n"
40
"are not suitable for the work directory when running in\n"
41
"production, since long-running masters and agents could lose\n"
42
"data when cleanup occurs. Local mode is used explicitly for\n"
43
"non-production purposes, so this is the only case where having\n"
44
"a default `work_dir` flag is acceptable.\n"
45
"(Example: `/var/lib/mesos`)\n\n"
46
"Individual work directories for each master and agent will be\n"
47
"nested underneath the given work directory:\n"
48
"root (`work_dir` flag)\n"
49
"|-- agents\n"
50
"| |-- 0\n"
51
"| | |-- fetch (--fetcher_cache_dir)\n"
52
"| | |-- run (--runtime_dir)\n"
53
"| | |-- work (--work_dir)\n"
54
"| |-- 1\n"
55
"| | ...\n"
56
"|-- master"
,
57
path::join
(
os::temp
(),
"mesos"
,
"work"
));
58
59
add
(&
Flags::num_slaves
,
60
"num_slaves"
,
61
"Number of agents to launch for local cluster"
,
62
1);
63
}
64
65
std::string
work_dir
;
66
int
num_slaves
;
67
};
68
69
}
// namespace local {
70
}
// namespace internal {
71
}
// namespace mesos {
72
73
#endif // __LOCAL_FLAGS_HPP__
mesos::internal::logging::Flags
Definition:
flags.hpp:29
mesos::internal::local::Flags::num_slaves
int num_slaves
Definition:
flags.hpp:66
os.hpp
path::join
std::string join(const std::string &path1, const std::string &path2, const char _separator=os::PATH_SEPARATOR)
Definition:
path.hpp:116
mesos::internal::local::Flags::Flags
Flags()
Definition:
flags.hpp:33
mesos::internal::local::Flags::work_dir
std::string work_dir
Definition:
flags.hpp:65
path.hpp
mesos
Definition:
agent.hpp:25
flags.hpp
mesos::internal::local::Flags
Definition:
flags.hpp:30
internal
Definition:
attributes.hpp:24
flags::FlagsBase::add
void add(T1 Flags::*t1, const Name &name, const Option< Name > &alias, const std::string &help, const T2 *t2, F validate)
Definition:
flags.hpp:333
os::temp
std::string temp()
Definition:
temp.hpp:27
flags.hpp
Generated by
1.8.11