You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/11/17 00:33:40 UTC
[3/3] mesos git commit: Tweaked parameter names in mesos.
Tweaked parameter names in mesos.
Ensure consistency between declaration and definition. Spotted via
clang-tidy.
Review: https://reviews.apache.org/r/53540/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/33f621bc
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/33f621bc
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/33f621bc
Branch: refs/heads/master
Commit: 33f621bce9f2dc032c7fc1dd4b5ee68858df4eda
Parents: aa17071
Author: Neil Conway <ne...@gmail.com>
Authored: Wed Nov 16 14:59:40 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Wed Nov 16 15:41:29 2016 -0800
----------------------------------------------------------------------
include/mesos/state/protobuf.hpp | 2 +-
src/common/http.hpp | 2 +-
src/common/protobuf_utils.cpp | 4 ++--
src/linux/capabilities.cpp | 12 +++++++-----
src/linux/capabilities.hpp | 2 +-
src/log/coordinator.hpp | 6 +++---
src/master/master.cpp | 2 +-
src/master/master.hpp | 14 +++++++-------
src/slave/slave.cpp | 2 +-
src/slave/slave.hpp | 6 +++---
src/tests/utils.cpp | 6 +++---
11 files changed, 30 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/include/mesos/state/protobuf.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/state/protobuf.hpp b/include/mesos/state/protobuf.hpp
index 47beb45..c15696a 100644
--- a/include/mesos/state/protobuf.hpp
+++ b/include/mesos/state/protobuf.hpp
@@ -94,7 +94,7 @@ private:
// constructor.
template <typename T>
static process::Future<Variable<T>> _fetch(
- const mesos::state::Variable& option);
+ const mesos::state::Variable& variable);
template <typename T>
static process::Future<Option<Variable<T>>> _store(
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/common/http.hpp
----------------------------------------------------------------------
diff --git a/src/common/http.hpp b/src/common/http.hpp
index c239817..378208b 100644
--- a/src/common/http.hpp
+++ b/src/common/http.hpp
@@ -180,7 +180,7 @@ bool approveViewRole(
*/
Try<Nothing> initializeHttpAuthenticators(
const std::string& realm,
- const std::vector<std::string>& authenticatorNames,
+ const std::vector<std::string>& httpAuthenticatorNames,
const Option<Credentials>& credentials);
} // namespace mesos {
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/common/protobuf_utils.cpp
----------------------------------------------------------------------
diff --git a/src/common/protobuf_utils.cpp b/src/common/protobuf_utils.cpp
index 7362b87..56e1664 100644
--- a/src/common/protobuf_utils.cpp
+++ b/src/common/protobuf_utils.cpp
@@ -382,7 +382,7 @@ ContainerLimitation createContainerLimitation(
ContainerState createContainerState(
const Option<ExecutorInfo>& executorInfo,
- const ContainerID& container_id,
+ const ContainerID& containerId,
pid_t pid,
const string& directory)
{
@@ -392,7 +392,7 @@ ContainerState createContainerState(
state.mutable_executor_info()->CopyFrom(executorInfo.get());
}
- state.mutable_container_id()->CopyFrom(container_id);
+ state.mutable_container_id()->CopyFrom(containerId);
state.set_pid(pid);
state.set_directory(directory);
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/linux/capabilities.cpp
----------------------------------------------------------------------
diff --git a/src/linux/capabilities.cpp b/src/linux/capabilities.cpp
index 3e30c4d..9f46bd0 100644
--- a/src/linux/capabilities.cpp
+++ b/src/linux/capabilities.cpp
@@ -428,14 +428,16 @@ ostream& operator<<(ostream& stream, const Type& type)
}
-ostream& operator<<(ostream& stream, const ProcessCapabilities& capabilities)
+ostream& operator<<(
+ ostream& stream,
+ const ProcessCapabilities& processCapabilities)
{
return stream
<< "{"
- << EFFECTIVE << ": " << stringify(capabilities.effective) << ", "
- << PERMITTED << ": " << stringify(capabilities.permitted) << ", "
- << INHERITABLE << ": " << stringify(capabilities.inheritable) << ", "
- << BOUNDING << ": " << stringify(capabilities.bounding)
+ << EFFECTIVE << ": " << stringify(processCapabilities.effective) << ", "
+ << PERMITTED << ": " << stringify(processCapabilities.permitted) << ", "
+ << INHERITABLE << ": " << stringify(processCapabilities.inheritable) << ", "
+ << BOUNDING << ": " << stringify(processCapabilities.bounding)
<< "}";
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/linux/capabilities.hpp
----------------------------------------------------------------------
diff --git a/src/linux/capabilities.hpp b/src/linux/capabilities.hpp
index 9c0bcf4..7c63427 100644
--- a/src/linux/capabilities.hpp
+++ b/src/linux/capabilities.hpp
@@ -101,7 +101,7 @@ public:
private:
friend std::ostream& operator<<(
std::ostream& stream,
- const ProcessCapabilities& set);
+ const ProcessCapabilities& processCapabilities);
std::set<Capability> effective;
std::set<Capability> permitted;
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/log/coordinator.hpp
----------------------------------------------------------------------
diff --git a/src/log/coordinator.hpp b/src/log/coordinator.hpp
index b5f9c96..a92ca4d 100644
--- a/src/log/coordinator.hpp
+++ b/src/log/coordinator.hpp
@@ -41,9 +41,9 @@ class Coordinator
{
public:
Coordinator(
- size_t _quorum,
- const process::Shared<Replica>& _replica,
- const process::Shared<Network>& _network);
+ size_t quorum,
+ const process::Shared<Replica>& replica,
+ const process::Shared<Network>& network);
~Coordinator();
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 4482d4c..7ed1d25 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -130,7 +130,7 @@ using mesos::master::contender::MasterContender;
using mesos::master::detector::MasterDetector;
-static bool isValidFailoverTimeout(const FrameworkInfo& frameworkinfo);
+static bool isValidFailoverTimeout(const FrameworkInfo& frameworkInfo);
class SlaveObserver : public ProtobufProcess<SlaveObserver>
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/master/master.hpp
----------------------------------------------------------------------
diff --git a/src/master/master.hpp b/src/master/master.hpp
index 2e95c26..7829f3f 100644
--- a/src/master/master.hpp
+++ b/src/master/master.hpp
@@ -537,16 +537,16 @@ public:
const process::Time& reregisteredTime);
void offer(
- const FrameworkID& framework,
+ const FrameworkID& frameworkId,
const hashmap<SlaveID, Resources>& resources);
void inverseOffer(
- const FrameworkID& framework,
+ const FrameworkID& frameworkId,
const hashmap<SlaveID, UnavailableResources>& resources);
// Invoked when there is a newly elected leading master.
// Made public for testing purposes.
- void detected(const process::Future<Option<MasterInfo>>& pid);
+ void detected(const process::Future<Option<MasterInfo>>& _leader);
// Invoked when the contender has lost the candidacy.
// Made public for testing purposes.
@@ -621,10 +621,10 @@ protected:
const std::vector<Task>& tasks,
const std::vector<FrameworkInfo>& frameworks);
- // 'authenticate' is the future returned by the authenticator.
+ // 'future' is the future returned by the authenticator.
void _authenticate(
const process::UPID& pid,
- const process::Future<Option<std::string>>& authenticate);
+ const process::Future<Option<std::string>>& future);
void authenticationTimeout(process::Future<Option<std::string>> future);
@@ -1157,7 +1157,7 @@ private:
process::Future<std::vector<WeightInfo>> _filterWeights(
const std::vector<WeightInfo>& weightInfos,
- const std::list<bool>& authorized) const;
+ const std::list<bool>& roleAuthorizations) const;
process::Future<std::vector<WeightInfo>> _getWeights(
const Option<std::string>& principal) const;
@@ -1168,7 +1168,7 @@ private:
const;
process::Future<process::http::Response> __updateWeights(
- const std::vector<WeightInfo>& updateWeightInfos) const;
+ const std::vector<WeightInfo>& weightInfos) const;
// Rescind all outstanding offers if any of the 'weightInfos' roles has
// an active framework.
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 2d91e1c..521f08d 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1500,7 +1500,7 @@ Future<bool> Slave::unschedule(const string& path)
void Slave::runTask(
const UPID& from,
const FrameworkInfo& frameworkInfo,
- const FrameworkID& frameworkId_,
+ const FrameworkID& frameworkId,
const UPID& pid,
const TaskInfo& task)
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/slave/slave.hpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index c0a1765..0cc1054 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -157,7 +157,7 @@ public:
// Made 'virtual' for Slave mocking.
virtual void runTaskGroup(
- const process::UPID& upid,
+ const process::UPID& from,
const FrameworkInfo& frameworkInfo,
const ExecutorInfo& executorInfo,
const TaskGroupInfo& taskGroupInfo);
@@ -243,7 +243,7 @@ public:
StatusUpdate update,
const Option<process::UPID>& pid,
const ExecutorID& executorId,
- const Future<ContainerStatus>& containerStatus);
+ const Future<ContainerStatus>& future);
// Continue handling the status update after optionally updating the
// container's resources.
@@ -305,7 +305,7 @@ public:
// Invoked whenever the detector detects a change in masters.
// Made public for testing purposes.
- void detected(const process::Future<Option<MasterInfo>>& pid);
+ void detected(const process::Future<Option<MasterInfo>>& _master);
enum State
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/33f621bc/src/tests/utils.cpp
----------------------------------------------------------------------
diff --git a/src/tests/utils.cpp b/src/tests/utils.cpp
index fc004a9..eb36616 100644
--- a/src/tests/utils.cpp
+++ b/src/tests/utils.cpp
@@ -119,12 +119,12 @@ string getTestHelperDir()
return path;
}
-string getTestScriptPath(const string& script)
+string getTestScriptPath(const string& name)
{
- string path = path::join(flags.source_dir, "src", "tests", script);
+ string path = path::join(flags.source_dir, "src", "tests", name);
if (!os::exists(path) && searchInstallationDirectory) {
- path = path::join(TESTLIBEXECDIR, script);
+ path = path::join(TESTLIBEXECDIR, name);
}
return path;