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/08/10 17:58:12 UTC
[1/4] mesos git commit: Trimmed unneeded extra space between right
angle brackets.
Repository: mesos
Updated Branches:
refs/heads/master 705896003 -> 0d3793e94
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/master_contender_detector_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_contender_detector_tests.cpp b/src/tests/master_contender_detector_tests.cpp
index 2970986..2a7d713 100644
--- a/src/tests/master_contender_detector_tests.cpp
+++ b/src/tests/master_contender_detector_tests.cpp
@@ -125,7 +125,7 @@ TEST_F(MasterContenderDetectorTest, File)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers));
@@ -148,7 +148,7 @@ TEST(BasicMasterContenderDetectorTest, Contender)
contender->initialize(internal::protobuf::createMasterInfo(master));
- Future<Future<Nothing> > contended = contender->contend();
+ Future<Future<Nothing>> contended = contender->contend();
AWAIT_READY(contended);
Future<Nothing> lostCandidacy = contended.get();
@@ -171,7 +171,7 @@ TEST(BasicMasterContenderDetectorTest, Detector)
StandaloneMasterDetector detector;
- Future<Option<MasterInfo> > detected = detector.detect();
+ Future<Option<MasterInfo>> detected = detector.detect();
// No one has appointed the leader so we are pending.
EXPECT_TRUE(detected.isPending());
@@ -200,7 +200,7 @@ TEST(BasicMasterContenderDetectorTest, MasterInfo)
StandaloneMasterDetector detector;
- Future<Option<MasterInfo> > detected = detector.detect();
+ Future<Option<MasterInfo>> detected = detector.detect();
detector.appoint(master);
@@ -238,12 +238,12 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterContender)
MasterInfo master = internal::protobuf::createMasterInfo(pid);
contender.initialize(master);
- Future<Future<Nothing> > contended = contender.contend();
+ Future<Future<Nothing>> contended = contender.contend();
AWAIT_READY(contended);
ZooKeeperMasterDetector detector(url.get());
- Future<Option<MasterInfo> > leader = detector.detect();
+ Future<Option<MasterInfo>> leader = detector.detect();
AWAIT_READY(leader);
EXPECT_SOME_EQ(master, leader.get());
@@ -269,7 +269,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterContender)
Future<Nothing> lostCandidacy = contended.get();
leader = detector.detect(leader.get());
- Future<Option<int64_t> > sessionId = group.get()->session();
+ Future<Option<int64_t>> sessionId = group.get()->session();
AWAIT_READY(sessionId);
server->expireSession(sessionId.get().get());
@@ -301,7 +301,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, ContenderPendingElection)
// Drop Group::join so that 'contended' will stay pending.
Future<Nothing> join = DROP_DISPATCH(_, &GroupProcess::join);
- Future<Future<Nothing> > contended = contender.contend();
+ Future<Future<Nothing>> contended = contender.contend();
AWAIT_READY(join);
Clock::pause();
@@ -355,12 +355,12 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterContenders)
contender1->initialize(master1);
- Future<Future<Nothing> > contended1 = contender1->contend();
+ Future<Future<Nothing>> contended1 = contender1->contend();
AWAIT_READY(contended1);
ZooKeeperMasterDetector detector1(url.get());
- Future<Option<MasterInfo> > leader1 = detector1.detect();
+ Future<Option<MasterInfo>> leader1 = detector1.detect();
AWAIT_READY(leader1);
EXPECT_SOME_EQ(master1, leader1.get());
@@ -374,11 +374,11 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterContenders)
contender2.initialize(master2);
- Future<Future<Nothing> > contended2 = contender2.contend();
+ Future<Future<Nothing>> contended2 = contender2.contend();
AWAIT_READY(contended2);
ZooKeeperMasterDetector detector2(url.get());
- Future<Option<MasterInfo> > leader2 = detector2.detect();
+ Future<Option<MasterInfo>> leader2 = detector2.detect();
AWAIT_READY(leader2);
EXPECT_SOME_EQ(master1, leader2.get());
@@ -387,7 +387,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterContenders)
// Destroying detector1 (below) causes leadership change.
contender1.reset();
- Future<Option<MasterInfo> > leader3 = detector2.detect(master1);
+ Future<Option<MasterInfo>> leader3 = detector2.detect(master1);
AWAIT_READY(leader3);
EXPECT_SOME_EQ(master2, leader3.get());
}
@@ -479,13 +479,13 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, ContenderDetectorShutdownNetwork)
contender.initialize(master);
- Future<Future<Nothing> > contended = contender.contend();
+ Future<Future<Nothing>> contended = contender.contend();
AWAIT_READY(contended);
Future<Nothing> lostCandidacy = contended.get();
ZooKeeperMasterDetector detector(url.get());
- Future<Option<MasterInfo> > leader = detector.detect();
+ Future<Option<MasterInfo>> leader = detector.detect();
AWAIT_READY(leader);
EXPECT_SOME_EQ(master, leader.get());
@@ -556,13 +556,13 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterDetectorTimedoutSession)
leaderContender.initialize(leader);
- Future<Future<Nothing> > contended = leaderContender.contend();
+ Future<Future<Nothing>> contended = leaderContender.contend();
AWAIT_READY(contended);
Future<Nothing> leaderLostCandidacy = contended.get();
ZooKeeperMasterDetector leaderDetector(leaderGroup);
- Future<Option<MasterInfo> > detected = leaderDetector.detect();
+ Future<Option<MasterInfo>> detected = leaderDetector.detect();
AWAIT_READY(detected);
EXPECT_SOME_EQ(leader, detected.get());
@@ -617,11 +617,11 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterDetectorTimedoutSession)
AWAIT_READY(nonContenderReconnecting);
// Now the detectors re-detect.
- Future<Option<MasterInfo> > leaderDetected =
+ Future<Option<MasterInfo>> leaderDetected =
leaderDetector.detect(leader);
- Future<Option<MasterInfo> > followerDetected =
+ Future<Option<MasterInfo>> followerDetected =
followerDetector.detect(leader);
- Future<Option<MasterInfo> > nonContenderDetected =
+ Future<Option<MasterInfo>> nonContenderDetected =
nonContenderDetector.detect(leader);
Clock::pause();
@@ -674,19 +674,19 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
leaderContender.initialize(leader);
- Future<Future<Nothing> > leaderContended = leaderContender.contend();
+ Future<Future<Nothing>> leaderContended = leaderContender.contend();
AWAIT_READY(leaderContended);
Future<Nothing> leaderLostLeadership = leaderContended.get();
ZooKeeperMasterDetector leaderDetector(url.get());
- Future<Option<MasterInfo> > detected = leaderDetector.detect();
+ Future<Option<MasterInfo>> detected = leaderDetector.detect();
AWAIT_READY(detected);
EXPECT_SOME_EQ(leader, detected.get());
// Keep detecting.
- Future<Option<MasterInfo> > newLeaderDetected =
+ Future<Option<MasterInfo>> newLeaderDetected =
leaderDetector.detect(detected.get());
// Simulate a following master.
@@ -700,7 +700,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
ZooKeeperMasterContender followerContender(url.get());
followerContender.initialize(follower);
- Future<Future<Nothing> > followerContended = followerContender.contend();
+ Future<Future<Nothing>> followerContended = followerContender.contend();
AWAIT_READY(followerContended);
LOG(INFO) << "The follower now is detecting the leader";
@@ -709,7 +709,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
EXPECT_SOME_EQ(leader, detected.get());
// Now expire the leader's zk session.
- Future<Option<int64_t> > session = group->session();
+ Future<Option<int64_t>> session = group->session();
AWAIT_READY(session);
EXPECT_SOME(session.get());
@@ -747,7 +747,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterDetectorExpireSlaveZKSession)
ZooKeeperMasterContender masterContender(url.get());
masterContender.initialize(master);
- Future<Future<Nothing> > leaderContended = masterContender.contend();
+ Future<Future<Nothing>> leaderContended = masterContender.contend();
AWAIT_READY(leaderContended);
// Simulate a slave.
@@ -756,14 +756,14 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterDetectorExpireSlaveZKSession)
ZooKeeperMasterDetector slaveDetector(group);
- Future<Option<MasterInfo> > detected = slaveDetector.detect();
+ Future<Option<MasterInfo>> detected = slaveDetector.detect();
AWAIT_READY(detected);
EXPECT_SOME_EQ(master, detected.get());
detected = slaveDetector.detect(master);
// Now expire the slave's zk session.
- Future<Option<int64_t> > session = group->session();
+ Future<Option<int64_t>> session = group->session();
AWAIT_READY(session);
server->expireSession(session.get().get());
@@ -808,10 +808,10 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
leaderContender.initialize(leader);
- Future<Future<Nothing> > contended = leaderContender.contend();
+ Future<Future<Nothing>> contended = leaderContender.contend();
AWAIT_READY(contended);
- Future<Option<MasterInfo> > detected = leaderDetector.detect(None());
+ Future<Option<MasterInfo>> detected = leaderDetector.detect(None());
AWAIT_READY(detected);
EXPECT_SOME_EQ(leader, detected.get());
@@ -849,10 +849,10 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
// Now expire the slave's and leading master's zk sessions.
// NOTE: Here we assume that slave stays disconnected from the ZK
// when the leading master loses its session.
- Future<Option<int64_t> > slaveSession = nonContenderGroup->session();
+ Future<Option<int64_t>> slaveSession = nonContenderGroup->session();
AWAIT_READY(slaveSession);
- Future<Option<int64_t> > masterSession = leaderGroup->session();
+ Future<Option<int64_t>> masterSession = leaderGroup->session();
AWAIT_READY(masterSession);
server->expireSession(slaveSession.get().get());
@@ -899,7 +899,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterDetectorUsesJson)
// Our detector should now "discover" the JSON, parse it
// and derive the correct MasterInfo PB.
ZooKeeperMasterDetector leaderDetector(url.get());
- Future<Option<MasterInfo> > detected = leaderDetector.detect(None());
+ Future<Option<MasterInfo>> detected = leaderDetector.detect(None());
AWAIT_READY(detected);
ASSERT_SOME_EQ(leader, detected.get());
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/master_slave_reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_slave_reconciliation_tests.cpp b/src/tests/master_slave_reconciliation_tests.cpp
index 03405e3..7dda6f6 100644
--- a/src/tests/master_slave_reconciliation_tests.cpp
+++ b/src/tests/master_slave_reconciliation_tests.cpp
@@ -185,7 +185,7 @@ TEST_F(MasterSlaveReconciliationTest, ReconcileLostTask)
EXPECT_CALL(sched, registered(&driver, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -290,7 +290,7 @@ TEST_F(MasterSlaveReconciliationTest, ReconcileRace)
EXPECT_CALL(sched, registered(&driver, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -412,7 +412,7 @@ TEST_F(MasterSlaveReconciliationTest, SlaveReregisterPendingTask)
EXPECT_CALL(sched, registered(&driver, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -481,7 +481,7 @@ TEST_F(MasterSlaveReconciliationTest, SlaveReregisterTerminalTask)
EXPECT_CALL(sched, registered(&driver, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -569,7 +569,7 @@ TEST_F(MasterSlaveReconciliationTest, SlaveReregisterFrameworks)
EXPECT_CALL(sched, registered(&driver, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index 9174a38..59688dc 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -145,7 +145,7 @@ protected:
// TODO(bmahler): Consider adding a builder style interface, e.g.
//
- // Try<PID<Slave> > slave =
+ // Try<PID<Slave>> slave =
// Slave().With(flags)
// .With(executor)
// .With(containerizer)
@@ -160,7 +160,7 @@ protected:
// injections.containerizer = containerizer;
// injections.detector = detector;
// injections.gc = gc;
- // Try<PID<Slave> > slave = StartSlave(injections);
+ // Try<PID<Slave>> slave = StartSlave(injections);
// Starts a slave with the specified detector and flags.
virtual Try<process::Owned<cluster::Slave>> StartSlave(
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reconciliation_tests.cpp b/src/tests/reconciliation_tests.cpp
index 492560c..8e438bf 100644
--- a/src/tests/reconciliation_tests.cpp
+++ b/src/tests/reconciliation_tests.cpp
@@ -625,7 +625,7 @@ TEST_F(ReconciliationTest, PendingTask)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/registrar_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_tests.cpp b/src/tests/registrar_tests.cpp
index ba7c66f..9a71d8f 100644
--- a/src/tests/registrar_tests.cpp
+++ b/src/tests/registrar_tests.cpp
@@ -1011,7 +1011,7 @@ TEST_P(RegistrarTest, Bootstrap)
class MockStorage : public Storage
{
public:
- MOCK_METHOD1(get, Future<Option<Entry> >(const string&));
+ MOCK_METHOD1(get, Future<Option<Entry>>(const string&));
MOCK_METHOD2(set, Future<bool>(const Entry&, const UUID&));
MOCK_METHOD1(expunge, Future<bool>(const Entry&));
MOCK_METHOD0(names, Future<std::set<string>>());
@@ -1028,7 +1028,7 @@ TEST_P(RegistrarTest, FetchTimeout)
Future<Nothing> get;
EXPECT_CALL(storage, get(_))
.WillOnce(DoAll(FutureSatisfy(&get),
- Return(Future<Option<Entry> >())));
+ Return(Future<Option<Entry>>())));
Registrar registrar(flags, &state);
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/registrar_zookeeper_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_zookeeper_tests.cpp b/src/tests/registrar_zookeeper_tests.cpp
index 98a5e31..598a930 100644
--- a/src/tests/registrar_zookeeper_tests.cpp
+++ b/src/tests/registrar_zookeeper_tests.cpp
@@ -78,7 +78,7 @@ TEST_F(RegistrarZooKeeperTest, TaskRunning)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index af442ca..59859f5 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -191,7 +191,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverSlaveState)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(SaveArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -369,7 +369,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverStatusUpdateManager)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -459,7 +459,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconnectHTTPExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -546,7 +546,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconnectExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -645,7 +645,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverUnregisteredHTTPExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -679,7 +679,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverUnregisteredHTTPExecutor)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -758,7 +758,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverUnregisteredExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -793,7 +793,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverUnregisteredExecutor)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -872,7 +872,7 @@ TYPED_TEST(SlaveRecoveryTest, KillTaskUnregisteredExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -984,7 +984,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverTerminatedHTTPExecutor)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -1050,7 +1050,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverTerminatedHTTPExecutor)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1126,7 +1126,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverTerminatedExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -1170,7 +1170,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverTerminatedExecutor)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1256,7 +1256,7 @@ TYPED_TEST(SlaveRecoveryTest, DISABLED_RecoveryTimeout)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1349,7 +1349,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverCompletedExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1385,7 +1385,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverCompletedExecutor)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1444,7 +1444,7 @@ TYPED_TEST(SlaveRecoveryTest, CleanupHTTPExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1546,7 +1546,7 @@ TYPED_TEST(SlaveRecoveryTest, CleanupExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1648,7 +1648,7 @@ TYPED_TEST(SlaveRecoveryTest, RemoveNonCheckpointingFramework)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1713,7 +1713,7 @@ TYPED_TEST(SlaveRecoveryTest, RemoveNonCheckpointingFramework)
// Destroy all the containers before we destroy the containerizer. We need to
// do this manually because there are no slaves left in the cluster.
- Future<hashset<ContainerID> > containers = containerizer.get()->containers();
+ Future<hashset<ContainerID>> containers = containerizer.get()->containers();
AWAIT_READY(containers);
foreach (const ContainerID& containerId, containers.get()) {
@@ -1760,7 +1760,7 @@ TYPED_TEST(SlaveRecoveryTest, NonCheckpointingFramework)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(SaveArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1848,7 +1848,7 @@ TYPED_TEST(SlaveRecoveryTest, KillTaskWithHTTPExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1897,7 +1897,7 @@ TYPED_TEST(SlaveRecoveryTest, KillTaskWithHTTPExecutor)
.WillOnce(FutureArg<1>(&status))
.WillRepeatedly(Return()); // Ignore subsequent updates.
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1964,7 +1964,7 @@ TYPED_TEST(SlaveRecoveryTest, KillTask)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2019,7 +2019,7 @@ TYPED_TEST(SlaveRecoveryTest, KillTask)
.WillOnce(FutureArg<1>(&status))
.WillRepeatedly(Return()); // Ignore subsequent updates.
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2085,7 +2085,7 @@ TYPED_TEST(SlaveRecoveryTest, Reboot)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -2121,7 +2121,7 @@ TYPED_TEST(SlaveRecoveryTest, Reboot)
AWAIT_READY(status);
// Capture the container ID.
- Future<hashset<ContainerID> > containers = containerizer->containers();
+ Future<hashset<ContainerID>> containers = containerizer->containers();
AWAIT_READY(containers);
EXPECT_EQ(1u, containers.get().size());
@@ -2145,7 +2145,7 @@ TYPED_TEST(SlaveRecoveryTest, Reboot)
Try<pid_t> pid = numify<pid_t>(read.get());
ASSERT_SOME(pid);
- Future<Option<int> > executorStatus = process::reap(pid.get());
+ Future<Option<int>> executorStatus = process::reap(pid.get());
// Shut down the executor manually and wait until it's been reaped.
process::post(executorPid, ShutdownExecutorMessage());
@@ -2165,7 +2165,7 @@ TYPED_TEST(SlaveRecoveryTest, Reboot)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2220,7 +2220,7 @@ TYPED_TEST(SlaveRecoveryTest, GCExecutor)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -2276,7 +2276,7 @@ TYPED_TEST(SlaveRecoveryTest, GCExecutor)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2358,8 +2358,8 @@ TYPED_TEST(SlaveRecoveryTest, ShutdownSlave)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers1;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1)) // Initial offer.
.WillOnce(FutureArg<1>(&offers2)); // Task resources re-offered.
@@ -2418,7 +2418,7 @@ TYPED_TEST(SlaveRecoveryTest, ShutdownSlave)
slave.get()->shutdown();
slave->reset();
- Future<vector<Offer> > offers3;
+ Future<vector<Offer>> offers3;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers3))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2478,7 +2478,7 @@ TYPED_TEST(SlaveRecoveryTest, ShutdownSlaveSIGUSR1)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers)) // Initial offer.
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2587,7 +2587,7 @@ TYPED_TEST(SlaveRecoveryTest, RegisterDisconnectedSlave)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2647,7 +2647,7 @@ TYPED_TEST(SlaveRecoveryTest, RegisterDisconnectedSlave)
// Destroy all the containers before we destroy the containerizer. We need to
// do this manually because there are no slaves left in the cluster.
- Future<hashset<ContainerID> > containers = containerizer.get()->containers();
+ Future<hashset<ContainerID>> containers = containerizer.get()->containers();
AWAIT_READY(containers);
foreach (const ContainerID& containerId, containers.get()) {
@@ -2697,7 +2697,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileKillTask)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -2738,7 +2738,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileKillTask)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2798,7 +2798,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileShutdownFramework)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2905,7 +2905,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileTasksMissingFromSlave)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2983,7 +2983,7 @@ TYPED_TEST(SlaveRecoveryTest, ReconcileTasksMissingFromSlave)
.WillOnce(FutureArg<1>(&status))
.WillRepeatedly(Return()); // Ignore subsequent updates.
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3070,7 +3070,7 @@ TYPED_TEST(SlaveRecoveryTest, SchedulerFailover)
EXPECT_CALL(sched1, registered(&driver1, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched1, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -3150,7 +3150,7 @@ TYPED_TEST(SlaveRecoveryTest, SchedulerFailover)
.WillOnce(FutureArg<1>(&status))
.WillRepeatedly(Return()); // Ignore subsequent updates.
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched2, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3230,7 +3230,7 @@ TYPED_TEST(SlaveRecoveryTest, PartitionedSlave)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return());
@@ -3363,7 +3363,7 @@ TYPED_TEST(SlaveRecoveryTest, MasterFailover)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -3439,7 +3439,7 @@ TYPED_TEST(SlaveRecoveryTest, MasterFailover)
.WillOnce(FutureArg<1>(&status))
.WillRepeatedly(Return()); // Ignore subsequent updates.
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3503,7 +3503,7 @@ TYPED_TEST(SlaveRecoveryTest, MultipleFrameworks)
EXPECT_CALL(sched1, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched1, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(DeclineOffers()); // Ignore subsequent offers.
@@ -3544,7 +3544,7 @@ TYPED_TEST(SlaveRecoveryTest, MultipleFrameworks)
EXPECT_CALL(sched2, registered(_, _, _));
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched2, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(DeclineOffers()); // Ignore subsequent offers.
@@ -3659,7 +3659,7 @@ TYPED_TEST(SlaveRecoveryTest, MultipleSlaves)
driver.start();
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -3704,7 +3704,7 @@ TYPED_TEST(SlaveRecoveryTest, MultipleSlaves)
// Wait for the ACK to be checkpointed.
AWAIT_READY(_statusUpdateAcknowledgement1);
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers2));
@@ -3798,7 +3798,7 @@ TYPED_TEST(SlaveRecoveryTest, MultipleSlaves)
Future<Nothing> executorTerminated1 =
FUTURE_DISPATCH(_, &Slave::executorTerminated);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3851,7 +3851,7 @@ TYPED_TEST(SlaveRecoveryTest, RestartBeforeContainerizerLaunch)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3954,7 +3954,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, ResourceStatistics)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3992,7 +3992,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, ResourceStatistics)
// Wait until the containerizer is updated.
AWAIT_READY(update);
- Future<hashset<ContainerID> > containers = containerizer->containers();
+ Future<hashset<ContainerID>> containers = containerizer->containers();
AWAIT_READY(containers);
EXPECT_EQ(1u, containers.get().size());
@@ -4060,7 +4060,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PERF_RollForward)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -4112,7 +4112,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PERF_RollForward)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -4207,7 +4207,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceForward)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -4230,7 +4230,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceForward)
AWAIT_READY(registerExecutorMessage);
- Future<hashset<ContainerID> > containers = containerizer->containers();
+ Future<hashset<ContainerID>> containers = containerizer->containers();
AWAIT_READY(containers);
EXPECT_EQ(1u, containers.get().size());
@@ -4246,7 +4246,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceForward)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -4312,7 +4312,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceBackward)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -4335,7 +4335,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceBackward)
AWAIT_READY(registerExecutorMessage);
- Future<hashset<ContainerID> > containers = containerizer->containers();
+ Future<hashset<ContainerID>> containers = containerizer->containers();
AWAIT_READY(containers);
EXPECT_EQ(1u, containers.get().size());
@@ -4352,7 +4352,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceBackward)
ASSERT_SOME(_containerizer);
containerizer.reset(_containerizer.get());
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/state_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/state_tests.cpp b/src/tests/state_tests.cpp
index 4ba4267..d200768 100644
--- a/src/tests/state_tests.cpp
+++ b/src/tests/state_tests.cpp
@@ -89,7 +89,7 @@ typedef mesos::internal::Registry::Slave Slave;
void FetchAndStoreAndFetch(State* state)
{
- Future<Variable<Slaves> > future1 = state->fetch<Slaves>("slaves");
+ Future<Variable<Slaves>> future1 = state->fetch<Slaves>("slaves");
AWAIT_READY(future1);
Variable<Slaves> variable = future1.get();
@@ -102,7 +102,7 @@ void FetchAndStoreAndFetch(State* state)
variable = variable.mutate(slaves1);
- Future<Option<Variable<Slaves> > > future2 = state->store(variable);
+ Future<Option<Variable<Slaves>>> future2 = state->store(variable);
AWAIT_READY(future2);
ASSERT_SOME(future2.get());
@@ -119,7 +119,7 @@ void FetchAndStoreAndFetch(State* state)
void FetchAndStoreAndStoreAndFetch(State* state)
{
- Future<Variable<Slaves> > future1 = state->fetch<Slaves>("slaves");
+ Future<Variable<Slaves>> future1 = state->fetch<Slaves>("slaves");
AWAIT_READY(future1);
Variable<Slaves> variable = future1.get();
@@ -132,7 +132,7 @@ void FetchAndStoreAndStoreAndFetch(State* state)
variable = variable.mutate(slaves1);
- Future<Option<Variable<Slaves> > > future2 = state->store(variable);
+ Future<Option<Variable<Slaves>>> future2 = state->store(variable);
AWAIT_READY(future2);
ASSERT_SOME(future2.get());
@@ -155,7 +155,7 @@ void FetchAndStoreAndStoreAndFetch(State* state)
void FetchAndStoreAndStoreFailAndFetch(State* state)
{
- Future<Variable<Slaves> > future1 = state->fetch<Slaves>("slaves");
+ Future<Variable<Slaves>> future1 = state->fetch<Slaves>("slaves");
AWAIT_READY(future1);
Variable<Slaves> variable1 = future1.get();
@@ -168,7 +168,7 @@ void FetchAndStoreAndStoreFailAndFetch(State* state)
Variable<Slaves> variable2 = variable1.mutate(slaves1);
- Future<Option<Variable<Slaves> > > future2 = state->store(variable2);
+ Future<Option<Variable<Slaves>>> future2 = state->store(variable2);
AWAIT_READY(future2);
ASSERT_SOME(future2.get());
@@ -197,7 +197,7 @@ void FetchAndStoreAndStoreFailAndFetch(State* state)
void FetchAndStoreAndExpungeAndFetch(State* state)
{
- Future<Variable<Slaves> > future1 = state->fetch<Slaves>("slaves");
+ Future<Variable<Slaves>> future1 = state->fetch<Slaves>("slaves");
AWAIT_READY(future1);
Variable<Slaves> variable = future1.get();
@@ -210,7 +210,7 @@ void FetchAndStoreAndExpungeAndFetch(State* state)
variable = variable.mutate(slaves1);
- Future<Option<Variable<Slaves> > > future2 = state->store(variable);
+ Future<Option<Variable<Slaves>>> future2 = state->store(variable);
AWAIT_READY(future2);
ASSERT_SOME(future2.get());
@@ -232,7 +232,7 @@ void FetchAndStoreAndExpungeAndFetch(State* state)
void FetchAndStoreAndExpungeAndExpunge(State* state)
{
- Future<Variable<Slaves> > future1 = state->fetch<Slaves>("slaves");
+ Future<Variable<Slaves>> future1 = state->fetch<Slaves>("slaves");
AWAIT_READY(future1);
Variable<Slaves> variable = future1.get();
@@ -245,7 +245,7 @@ void FetchAndStoreAndExpungeAndExpunge(State* state)
variable = variable.mutate(slaves1);
- Future<Option<Variable<Slaves> > > future2 = state->store(variable);
+ Future<Option<Variable<Slaves>>> future2 = state->store(variable);
AWAIT_READY(future2);
ASSERT_SOME(future2.get());
@@ -263,7 +263,7 @@ void FetchAndStoreAndExpungeAndExpunge(State* state)
void FetchAndStoreAndExpungeAndStoreAndFetch(State* state)
{
- Future<Variable<Slaves> > future1 = state->fetch<Slaves>("slaves");
+ Future<Variable<Slaves>> future1 = state->fetch<Slaves>("slaves");
AWAIT_READY(future1);
Variable<Slaves> variable = future1.get();
@@ -276,7 +276,7 @@ void FetchAndStoreAndExpungeAndStoreAndFetch(State* state)
variable = variable.mutate(slaves1);
- Future<Option<Variable<Slaves> > > future2 = state->store(variable);
+ Future<Option<Variable<Slaves>>> future2 = state->store(variable);
AWAIT_READY(future2);
ASSERT_SOME(future2.get());
@@ -303,7 +303,7 @@ void FetchAndStoreAndExpungeAndStoreAndFetch(State* state)
void Names(State* state)
{
- Future<Variable<Slaves> > future1 = state->fetch<Slaves>("slaves");
+ Future<Variable<Slaves>> future1 = state->fetch<Slaves>("slaves");
AWAIT_READY(future1);
Variable<Slaves> variable = future1.get();
@@ -316,11 +316,11 @@ void Names(State* state)
variable = variable.mutate(slaves1);
- Future<Option<Variable<Slaves> > > future2 = state->store(variable);
+ Future<Option<Variable<Slaves>>> future2 = state->store(variable);
AWAIT_READY(future2);
ASSERT_SOME(future2.get());
- Future<set<string> > names = state->names();
+ Future<set<string>> names = state->names();
AWAIT_READY(names);
ASSERT_EQ(1u, names.get().size());
EXPECT_NE(names.get().find("slaves"), names.get().end());
@@ -570,8 +570,8 @@ TEST_F(LogStateTest, Names)
}
-Future<Option<Variable<Slaves> > > timeout(
- Future<Option<Variable<Slaves> > > future)
+Future<Option<Variable<Slaves>>> timeout(
+ Future<Option<Variable<Slaves>>> future)
{
future.discard();
return Failure("Timeout");
@@ -582,7 +582,7 @@ TEST_F(LogStateTest, Timeout)
{
Clock::pause();
- Future<Variable<Slaves> > future1 = state->fetch<Slaves>("slaves");
+ Future<Variable<Slaves>> future1 = state->fetch<Slaves>("slaves");
AWAIT_READY(future1);
Variable<Slaves> variable = future1.get();
@@ -599,9 +599,9 @@ TEST_F(LogStateTest, Timeout)
terminate(replica2->pid());
wait(replica2->pid());
- Future<Option<Variable<Slaves> > > future2 = state->store(variable);
+ Future<Option<Variable<Slaves>>> future2 = state->store(variable);
- Future<Option<Variable<Slaves> > > future3 =
+ Future<Option<Variable<Slaves>>> future3 =
future2.after(Seconds(5), lambda::bind(&timeout, lambda::_1));
ASSERT_TRUE(future2.isPending());
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/status_update_manager_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/status_update_manager_tests.cpp b/src/tests/status_update_manager_tests.cpp
index f5313a1..7b6fe31 100644
--- a/src/tests/status_update_manager_tests.cpp
+++ b/src/tests/status_update_manager_tests.cpp
@@ -117,7 +117,7 @@ TEST_F(StatusUpdateManagerTest, CheckpointStatusUpdate)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -209,7 +209,7 @@ TEST_F(StatusUpdateManagerTest, RetryStatusUpdate)
EXPECT_CALL(sched, registered(_, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -281,7 +281,7 @@ TEST_F(StatusUpdateManagerTest, IgnoreDuplicateStatusUpdateAck)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(SaveArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -393,7 +393,7 @@ TEST_F(StatusUpdateManagerTest, IgnoreUnexpectedStatusUpdateAck)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(SaveArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -484,7 +484,7 @@ TEST_F(StatusUpdateManagerTest, DuplicateTerminalUpdateBeforeAck)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(SaveArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -595,7 +595,7 @@ TEST_F(StatusUpdateManagerTest, DuplicateTerminalUpdateAfterAck)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(SaveArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -690,7 +690,7 @@ TEST_F(StatusUpdateManagerTest, DuplicateUpdateBeforeAck)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(SaveArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -875,7 +875,7 @@ TEST_F(StatusUpdateManagerTest, DuplicatedTerminalStatusUpdate)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(SaveArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/zookeeper.cpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper.cpp b/src/tests/zookeeper.cpp
index d29b100..b34ed3a 100644
--- a/src/tests/zookeeper.cpp
+++ b/src/tests/zookeeper.cpp
@@ -61,7 +61,7 @@ void ZooKeeperTest::SetUpTestCase()
path::join(zkHome, "zookeeper-" ZOOKEEPER_VERSION ".jar");
// Now add all the libraries in 'lib' too.
- Try<list<string> > jars = fs::list(path::join(zkHome, "lib", "*.jar"));
+ Try<list<string>> jars = fs::list(path::join(zkHome, "lib", "*.jar"));
CHECK_SOME(jars);
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/zookeeper/detector.cpp
----------------------------------------------------------------------
diff --git a/src/zookeeper/detector.cpp b/src/zookeeper/detector.cpp
index c9fa49c..973f5f2 100644
--- a/src/zookeeper/detector.cpp
+++ b/src/zookeeper/detector.cpp
@@ -43,7 +43,7 @@ public:
virtual void initialize();
// LeaderDetector implementation.
- Future<Option<Group::Membership> > detect(
+ Future<Option<Group::Membership>> detect(
const Option<Group::Membership>& previous);
private:
@@ -51,11 +51,11 @@ private:
void watch(const set<Group::Membership>& expected);
// Invoked when the group memberships have changed.
- void watched(const Future<set<Group::Membership> >& memberships);
+ void watched(const Future<set<Group::Membership>>& memberships);
Group* group;
Option<Group::Membership> leader;
- set<Promise<Option<Group::Membership> >*> promises;
+ set<Promise<Option<Group::Membership>>*> promises;
// Potential non-retryable error.
Option<Error> error;
@@ -70,7 +70,7 @@ LeaderDetectorProcess::LeaderDetectorProcess(Group* _group)
LeaderDetectorProcess::~LeaderDetectorProcess()
{
- foreach (Promise<Option<Group::Membership> >* promise, promises) {
+ foreach (Promise<Option<Group::Membership>>* promise, promises) {
promise->future().discard();
delete promise;
}
@@ -84,7 +84,7 @@ void LeaderDetectorProcess::initialize()
}
-Future<Option<Group::Membership> > LeaderDetectorProcess::detect(
+Future<Option<Group::Membership>> LeaderDetectorProcess::detect(
const Option<Group::Membership>& previous)
{
// Return immediately if the detector is no longer operational due
@@ -100,8 +100,8 @@ Future<Option<Group::Membership> > LeaderDetectorProcess::detect(
}
// Otherwise wait for the next election result.
- Promise<Option<Group::Membership> >* promise =
- new Promise<Option<Group::Membership> >();
+ Promise<Option<Group::Membership>>* promise =
+ new Promise<Option<Group::Membership>>();
promises.insert(promise);
return promise->future();
}
@@ -115,7 +115,7 @@ void LeaderDetectorProcess::watch(const set<Group::Membership>& expected)
void LeaderDetectorProcess::watched(
- const Future<set<Group::Membership> >& memberships)
+ const Future<set<Group::Membership>>& memberships)
{
CHECK(!memberships.isDiscarded());
@@ -127,7 +127,7 @@ void LeaderDetectorProcess::watched(
// will directly fail as a result.
error = Error(memberships.failure());
leader = None();
- foreach (Promise<Option<Group::Membership> >* promise, promises) {
+ foreach (Promise<Option<Group::Membership>>* promise, promises) {
promise->fail(memberships.failure());
delete promise;
}
@@ -154,7 +154,7 @@ void LeaderDetectorProcess::watched(
? "(id='" + stringify(current.get().id()) + "')"
: "None");
- foreach (Promise<Option<Group::Membership> >* promise, promises) {
+ foreach (Promise<Option<Group::Membership>>* promise, promises) {
promise->set(current);
delete promise;
}
@@ -181,7 +181,7 @@ LeaderDetector::~LeaderDetector()
}
-Future<Option<Group::Membership> > LeaderDetector::detect(
+Future<Option<Group::Membership>> LeaderDetector::detect(
const Option<Group::Membership>& membership)
{
return dispatch(process, &LeaderDetectorProcess::detect, membership);
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/support/cpplint.py
----------------------------------------------------------------------
diff --git a/support/cpplint.py b/support/cpplint.py
index 5c5fd99..9ff8925 100644
--- a/support/cpplint.py
+++ b/support/cpplint.py
@@ -1962,7 +1962,7 @@ class _NestingState(object):
# Templates with class arguments may confuse the parser, for example:
# template <class T
# class Comparator = less<T>,
- # class Vector = vector<T> >
+ # class Vector = vector<T>>
# class HeapQueue {
#
# Because this parser has no nesting state about templates, by the
[4/4] mesos git commit: Removed unneeded extra space in libprocess
code base.
Posted by mp...@apache.org.
Removed unneeded extra space in libprocess code base.
This patch is part of MESOS-5830, specially working on cleaning up
unneeded space in project libprocess.
Review: https://reviews.apache.org/r/50900/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0d3793e9
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0d3793e9
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0d3793e9
Branch: refs/heads/master
Commit: 0d3793e94adcd6dc91d06404f205639cebd753fd
Parents: a57e5a4
Author: Gaojin CAO <ca...@cmss.chinamobile.com>
Authored: Wed Aug 10 18:41:14 2016 +0100
Committer: Michael Park <mp...@apache.org>
Committed: Wed Aug 10 18:49:21 2016 +0100
----------------------------------------------------------------------
3rdparty/libprocess/include/process/async.hpp | 48 ++++++++++----------
.../libprocess/include/process/protobuf.hpp | 6 +--
3rdparty/libprocess/include/process/reap.hpp | 2 +-
.../libprocess/include/process/sequence.hpp | 8 ++--
.../libprocess/include/process/statistics.hpp | 2 +-
3rdparty/libprocess/src/reap.cpp | 10 ++--
3rdparty/libprocess/src/tests/benchmarks.cpp | 2 +-
3rdparty/libprocess/src/tests/http_tests.cpp | 2 +-
3rdparty/libprocess/src/tests/metrics_tests.cpp | 2 +-
3rdparty/libprocess/src/tests/reap_tests.cpp | 6 +--
3rdparty/libprocess/src/tests/shared_tests.cpp | 2 +-
.../libprocess/src/tests/statistics_tests.cpp | 2 +-
12 files changed, 46 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/include/process/async.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/async.hpp b/3rdparty/libprocess/include/process/async.hpp
index e7d8462..8565a52 100644
--- a/3rdparty/libprocess/include/process/async.hpp
+++ b/3rdparty/libprocess/include/process/async.hpp
@@ -36,13 +36,13 @@ namespace process {
template <typename F>
Future<typename result_of<F()>::type> async(
const F& f,
- typename boost::disable_if<boost::is_void<typename result_of<F()>::type> >::type* = nullptr); // NOLINT(whitespace/line_length)
+ typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr); // NOLINT(whitespace/line_length)
template <typename F>
Future<Nothing> async(
const F& f,
- typename boost::enable_if<boost::is_void<typename result_of<F()>::type> >::type* = nullptr); // NOLINT(whitespace/line_length)
+ typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr); // NOLINT(whitespace/line_length)
#define TEMPLATE(Z, N, DATA) \
@@ -50,14 +50,14 @@ Future<Nothing> async(
Future<typename result_of<F(ENUM_PARAMS(N, A))>::type> async( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type* = nullptr); /* NOLINT(whitespace/line_length) */ \
+ typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr); /* NOLINT(whitespace/line_length) */ \
\
\
template <typename F, ENUM_PARAMS(N, typename A)> \
Future<Nothing> async( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type* = nullptr); // NOLINT(whitespace/line_length)
+ typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr); // NOLINT(whitespace/line_length)
REPEAT_FROM_TO(1, 11, TEMPLATE, _) // Args A0 -> A9.
#undef TEMPLATE
@@ -79,7 +79,7 @@ private:
template <typename F>
typename result_of<F()>::type execute(
const F& f,
- typename boost::disable_if<boost::is_void<typename result_of<F()>::type> >::type* = nullptr) // NOLINT(whitespace/line_length)
+ typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr) // NOLINT(whitespace/line_length)
{
terminate(self()); // Terminate process after function returns.
return f();
@@ -88,7 +88,7 @@ private:
template <typename F>
Nothing execute(
const F& f,
- typename boost::enable_if<boost::is_void<typename result_of<F()>::type> >::type* = nullptr) // NOLINT(whitespace/line_length)
+ typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr) // NOLINT(whitespace/line_length)
{
terminate(self()); // Terminate process after function returns.
f();
@@ -100,7 +100,7 @@ private:
typename result_of<F(ENUM_PARAMS(N, A))>::type execute( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+ typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
{ \
terminate(self()); /* Terminate process after function returns. */ \
return f(ENUM_PARAMS(N, a)); \
@@ -110,7 +110,7 @@ private:
Nothing execute( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+ typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
{ \
terminate(self()); /* Terminate process after function returns. */ \
f(ENUM_PARAMS(N, a)); \
@@ -130,25 +130,25 @@ private:
template <typename F>
friend Future<typename result_of<F()>::type> async(
const F& f,
- typename boost::disable_if<boost::is_void<typename result_of<F()>::type> >::type*); // NOLINT(whitespace/line_length)
+ typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type*); // NOLINT(whitespace/line_length)
template <typename F>
friend Future<Nothing> async(
const F& f,
- typename boost::enable_if<boost::is_void<typename result_of<F()>::type> >::type*); // NOLINT(whitespace/line_length)
+ typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type*); // NOLINT(whitespace/line_length)
#define TEMPLATE(Z, N, DATA) \
template <typename F, ENUM_PARAMS(N, typename A)> \
friend Future<typename result_of<F(ENUM_PARAMS(N, A))>::type> async( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type*); /* NOLINT(whitespace/line_length) */ \
+ typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*); /* NOLINT(whitespace/line_length) */ \
\
template <typename F, ENUM_PARAMS(N, typename A)> \
friend Future<Nothing> async( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type*); // NOLINT(whitespace/line_length)
+ typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*); // NOLINT(whitespace/line_length)
REPEAT_FROM_TO(1, 11, TEMPLATE, _) // Args A0 -> A9.
#undef TEMPLATE
@@ -168,10 +168,10 @@ private:
template <typename F>
Future<typename result_of<F()>::type> execute(
const F& f,
- typename boost::disable_if<boost::is_void<typename result_of<F()>::type> >::type* = nullptr) // NOLINT(whitespace/line_length)
+ typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr) // NOLINT(whitespace/line_length)
{
// Need to disambiguate overloaded method.
- typename result_of<F()>::type(AsyncExecutorProcess::*method)(const F&, typename boost::disable_if<boost::is_void<typename result_of<F()>::type> >::type*) = // NOLINT(whitespace/line_length)
+ typename result_of<F()>::type(AsyncExecutorProcess::*method)(const F&, typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type*) = // NOLINT(whitespace/line_length)
&AsyncExecutorProcess::execute<F>;
return dispatch(process, method, f, (void*) nullptr);
@@ -180,10 +180,10 @@ private:
template <typename F>
Future<Nothing> execute(
const F& f,
- typename boost::enable_if<boost::is_void<typename result_of<F()>::type> >::type* = nullptr) // NOLINT(whitespace/line_length)
+ typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type* = nullptr) // NOLINT(whitespace/line_length)
{
// Need to disambiguate overloaded method.
- Nothing(AsyncExecutorProcess::*method)(const F&, typename boost::enable_if<boost::is_void<typename result_of<F()>::type> >::type*) = // NOLINT(whitespace/line_length)
+ Nothing(AsyncExecutorProcess::*method)(const F&, typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type*) = // NOLINT(whitespace/line_length)
&AsyncExecutorProcess::execute<F>;
return dispatch(process, method, f, (void*) nullptr);
@@ -194,10 +194,10 @@ private:
Future<typename result_of<F(ENUM_PARAMS(N, A))>::type> execute( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+ typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
{ \
/* Need to disambiguate overloaded method. */ \
- typename result_of<F(ENUM_PARAMS(N, A))>::type(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type*) = /* NOLINT(whitespace/line_length) */ \
+ typename result_of<F(ENUM_PARAMS(N, A))>::type(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*) = /* NOLINT(whitespace/line_length) */ \
&AsyncExecutorProcess::execute<F, ENUM_PARAMS(N, A)>; \
\
return dispatch(process, method, f, ENUM_PARAMS(N, a), (void*) nullptr); \
@@ -207,10 +207,10 @@ private:
Future<Nothing> execute( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
+ typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type* = nullptr) /* NOLINT(whitespace/line_length) */ \
{ \
/* Need to disambiguate overloaded method. */ \
- Nothing(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type*) = /* NOLINT(whitespace/line_length) */ \
+ Nothing(AsyncExecutorProcess::*method)(const F&, ENUM_PARAMS(N, A), typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*) = /* NOLINT(whitespace/line_length) */ \
&AsyncExecutorProcess::execute<F, ENUM_PARAMS(N, A)>; \
\
return dispatch(process, method, f, ENUM_PARAMS(N, a), (void*) nullptr); \
@@ -227,7 +227,7 @@ private:
template <typename F>
Future<typename result_of<F()>::type> async(
const F& f,
- typename boost::disable_if<boost::is_void<typename result_of<F()>::type> >::type*) // NOLINT(whitespace/line_length)
+ typename boost::disable_if<boost::is_void<typename result_of<F()>::type>>::type*) // NOLINT(whitespace/line_length)
{
return AsyncExecutor().execute(f);
}
@@ -236,7 +236,7 @@ Future<typename result_of<F()>::type> async(
template <typename F>
Future<Nothing> async(
const F& f,
- typename boost::enable_if<boost::is_void<typename result_of<F()>::type> >::type*) // NOLINT(whitespace/line_length)
+ typename boost::enable_if<boost::is_void<typename result_of<F()>::type>>::type*) // NOLINT(whitespace/line_length)
{
return AsyncExecutor().execute(f);
}
@@ -247,7 +247,7 @@ Future<Nothing> async(
Future<typename result_of<F(ENUM_PARAMS(N, A))>::type> async( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type*) /* NOLINT(whitespace/line_length) */ \
+ typename boost::disable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*) /* NOLINT(whitespace/line_length) */ \
{ \
return AsyncExecutor().execute(f, ENUM_PARAMS(N, a)); \
} \
@@ -256,7 +256,7 @@ Future<Nothing> async(
Future<Nothing> async( \
const F& f, \
ENUM_BINARY_PARAMS(N, A, a), \
- typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type> >::type*) /* NOLINT(whitespace/line_length) */ \
+ typename boost::enable_if<boost::is_void<typename result_of<F(ENUM_PARAMS(N, A))>::type>>::type*) /* NOLINT(whitespace/line_length) */ \
{ \
return AsyncExecutor().execute(f, ENUM_PARAMS(N, a)); \
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/include/process/protobuf.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/protobuf.hpp b/3rdparty/libprocess/include/process/protobuf.hpp
index 7bee444..ad2f232 100644
--- a/3rdparty/libprocess/include/process/protobuf.hpp
+++ b/3rdparty/libprocess/include/process/protobuf.hpp
@@ -948,7 +948,7 @@ private:
// and waiting for a protobuf "response", but uses futures so that
// this can be done without needing to implement a process.
template <typename Req, typename Res>
-class ReqResProcess : public ProtobufProcess<ReqResProcess<Req, Res> >
+class ReqResProcess : public ProtobufProcess<ReqResProcess<Req, Res>>
{
public:
ReqResProcess(const process::UPID& _pid, const Req& _req)
@@ -956,7 +956,7 @@ public:
pid(_pid),
req(_req)
{
- ProtobufProcess<ReqResProcess<Req, Res> >::template
+ ProtobufProcess<ReqResProcess<Req, Res>>::template
install<Res>(&ReqResProcess<Req, Res>::response);
}
@@ -970,7 +970,7 @@ public:
{
promise.future().onDiscard(defer(this, &ReqResProcess::discarded));
- ProtobufProcess<ReqResProcess<Req, Res> >::send(pid, req);
+ ProtobufProcess<ReqResProcess<Req, Res>>::send(pid, req);
return promise.future();
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/include/process/reap.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/reap.hpp b/3rdparty/libprocess/include/process/reap.hpp
index 1a9709c..d7e0fa3 100644
--- a/3rdparty/libprocess/include/process/reap.hpp
+++ b/3rdparty/libprocess/include/process/reap.hpp
@@ -29,7 +29,7 @@ Duration MAX_REAP_INTERVAL();
// Otherwise, returns None once the process has been reaped elsewhere
// (or does not exist, which is indistinguishable from being reaped
// elsewhere). This will never discard the returned future.
-Future<Option<int> > reap(pid_t pid);
+Future<Option<int>> reap(pid_t pid);
} // namespace process {
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/include/process/sequence.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/sequence.hpp b/3rdparty/libprocess/include/process/sequence.hpp
index c9a46f2..b4d7593 100644
--- a/3rdparty/libprocess/include/process/sequence.hpp
+++ b/3rdparty/libprocess/include/process/sequence.hpp
@@ -72,11 +72,11 @@ public:
{
// This is the future that is used to notify the next callback
// (denoted by 'N' in the following graph).
- Owned<Promise<Nothing> > notifier(new Promise<Nothing>());
+ Owned<Promise<Nothing>> notifier(new Promise<Nothing>());
// This is the future that will be returned to the user (denoted
// by 'F' in the following graph).
- Owned<Promise<T> > promise(new Promise<T>());
+ Owned<Promise<T>> promise(new Promise<T>());
// We use a graph to show how we hook these futures. Each box in
// the graph represents a future. As mentioned above, 'F' denotes
@@ -141,7 +141,7 @@ protected:
private:
// Invoked when a callback is done.
- static void completed(Owned<Promise<Nothing> > notifier)
+ static void completed(Owned<Promise<Nothing>> notifier)
{
notifier->set(Nothing());
}
@@ -149,7 +149,7 @@ private:
// Invoked when a notifier is set.
template <typename T>
static void notified(
- Owned<Promise<T> > promise,
+ Owned<Promise<T>> promise,
const lambda::function<Future<T>()>& callback)
{
if (promise->future().hasDiscard()) {
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/include/process/statistics.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/statistics.hpp b/3rdparty/libprocess/include/process/statistics.hpp
index 13aa464..e9f1fc2 100644
--- a/3rdparty/libprocess/include/process/statistics.hpp
+++ b/3rdparty/libprocess/include/process/statistics.hpp
@@ -33,7 +33,7 @@ struct Statistics
// TimeSeries is empty.
// TODO(dhamon): Consider adding a histogram abstraction for better
// performance.
- static Option<Statistics<T> > from(const TimeSeries<T>& timeseries)
+ static Option<Statistics<T>> from(const TimeSeries<T>& timeseries)
{
std::vector<typename TimeSeries<T>::Value> values_ = timeseries.get();
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/src/reap.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/reap.cpp b/3rdparty/libprocess/src/reap.cpp
index f8d2fdc..5fc2a4d 100644
--- a/3rdparty/libprocess/src/reap.cpp
+++ b/3rdparty/libprocess/src/reap.cpp
@@ -66,11 +66,11 @@ class ReaperProcess : public Process<ReaperProcess>
public:
ReaperProcess() : ProcessBase(ID::generate("__reaper__")) {}
- Future<Option<int> > reap(pid_t pid)
+ Future<Option<int>> reap(pid_t pid)
{
// Check to see if this pid exists.
if (os::exists(pid)) {
- Owned<Promise<Option<int> > > promise(new Promise<Option<int> >());
+ Owned<Promise<Option<int>>> promise(new Promise<Option<int>>());
promises.put(pid, promise);
return promise->future();
} else {
@@ -110,7 +110,7 @@ protected:
void notify(pid_t pid, Result<int> status)
{
- foreach (const Owned<Promise<Option<int> > >& promise, promises.get(pid)) {
+ foreach (const Owned<Promise<Option<int>>>& promise, promises.get(pid)) {
if (status.isError()) {
promise->fail(status.error());
} else if (status.isNone()) {
@@ -141,7 +141,7 @@ private:
(MAX_REAP_INTERVAL() - MIN_REAP_INTERVAL()) * fraction);
}
- multihashmap<pid_t, Owned<Promise<Option<int> > > > promises;
+ multihashmap<pid_t, Owned<Promise<Option<int>>>> promises;
};
@@ -149,7 +149,7 @@ private:
static ReaperProcess* reaper = nullptr;
-Future<Option<int> > reap(pid_t pid)
+Future<Option<int>> reap(pid_t pid)
{
static Once* initialized = new Once();
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/src/tests/benchmarks.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/benchmarks.cpp b/3rdparty/libprocess/src/tests/benchmarks.cpp
index 9fac45e..945007c 100644
--- a/3rdparty/libprocess/src/tests/benchmarks.cpp
+++ b/3rdparty/libprocess/src/tests/benchmarks.cpp
@@ -148,7 +148,7 @@ private:
Future<Duration> _run()
{
- duration = Owned<Promise<Duration> >(new Promise<Duration>());
+ duration = Owned<Promise<Duration>>(new Promise<Duration>());
watch.start();
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/src/tests/http_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/http_tests.cpp b/3rdparty/libprocess/src/tests/http_tests.cpp
index 8a0d61e..24b266d 100644
--- a/3rdparty/libprocess/src/tests/http_tests.cpp
+++ b/3rdparty/libprocess/src/tests/http_tests.cpp
@@ -439,7 +439,7 @@ TEST(HTTPTest, PathParse)
{
const string pattern = "/books/{isbn}/chapters/{chapter}";
- Try<hashmap<string, string> > parse =
+ Try<hashmap<string, string>> parse =
http::path::parse(pattern, "/books/0304827484/chapters/3");
ASSERT_SOME(parse);
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/src/tests/metrics_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/metrics_tests.cpp b/3rdparty/libprocess/src/tests/metrics_tests.cpp
index 4ddd35b..88526e6 100644
--- a/3rdparty/libprocess/src/tests/metrics_tests.cpp
+++ b/3rdparty/libprocess/src/tests/metrics_tests.cpp
@@ -182,7 +182,7 @@ TEST_F(MetricsTest, Statistics)
++counter;
}
- Option<Statistics<double> > statistics = counter.statistics();
+ Option<Statistics<double>> statistics = counter.statistics();
EXPECT_SOME(statistics);
EXPECT_EQ(11u, statistics.get().count);
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/src/tests/reap_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/reap_tests.cpp b/3rdparty/libprocess/src/tests/reap_tests.cpp
index 0cbe9f1..56dadcc 100644
--- a/3rdparty/libprocess/src/tests/reap_tests.cpp
+++ b/3rdparty/libprocess/src/tests/reap_tests.cpp
@@ -62,7 +62,7 @@ TEST(ReapTest, NonChildProcess)
pid_t grandchild = tree.get().children.front();
// Reap the grandchild process.
- Future<Option<int> > status = process::reap(grandchild);
+ Future<Option<int>> status = process::reap(grandchild);
EXPECT_TRUE(status.isPending());
@@ -118,7 +118,7 @@ TEST(ReapTest, ChildProcess)
pid_t child = tree.get();
// Reap the child process.
- Future<Option<int> > status = process::reap(child);
+ Future<Option<int>> status = process::reap(child);
// Now kill the child.
EXPECT_EQ(0, kill(child, SIGKILL));
@@ -171,7 +171,7 @@ TEST(ReapTest, TerminatedChildProcess)
}
// Now that it's terminated, attempt to reap it.
- Future<Option<int> > status = process::reap(child);
+ Future<Option<int>> status = process::reap(child);
// Advance time until the reaper sends the notification.
Clock::pause();
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/src/tests/shared_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/shared_tests.cpp b/3rdparty/libprocess/src/tests/shared_tests.cpp
index 8f94cca..2a2ffe7 100644
--- a/3rdparty/libprocess/src/tests/shared_tests.cpp
+++ b/3rdparty/libprocess/src/tests/shared_tests.cpp
@@ -90,7 +90,7 @@ TEST(SharedTest, Own)
EXPECT_EQ(42, shared.get()->get());
EXPECT_TRUE(shared.unique());
- Future<Owned<Foo> > future;
+ Future<Owned<Foo>> future;
{
Shared<Foo> shared2(shared);
http://git-wip-us.apache.org/repos/asf/mesos/blob/0d3793e9/3rdparty/libprocess/src/tests/statistics_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/statistics_tests.cpp b/3rdparty/libprocess/src/tests/statistics_tests.cpp
index db9817f..54849a0 100644
--- a/3rdparty/libprocess/src/tests/statistics_tests.cpp
+++ b/3rdparty/libprocess/src/tests/statistics_tests.cpp
@@ -53,7 +53,7 @@ TEST(StatisticsTest, Statistics)
timeseries.set(i, now);
}
- Option<Statistics<double> > statistics = Statistics<double>::from(timeseries);
+ Option<Statistics<double>> statistics = Statistics<double>::from(timeseries);
EXPECT_SOME(statistics);
[3/4] mesos git commit: Removed unneeded extra space in stout code
base.
Posted by mp...@apache.org.
Removed unneeded extra space in stout code base.
This patch is part of MESOS-5830, specially working on cleaning up
unneeded space in project stout.
Review: https://reviews.apache.org/r/50899/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a57e5a43
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a57e5a43
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a57e5a43
Branch: refs/heads/master
Commit: a57e5a43af3fda1cdc4c37995a3cf0f94daeab62
Parents: bea8c3c
Author: Gaojin CAO <ca...@cmss.chinamobile.com>
Authored: Wed Aug 10 18:41:01 2016 +0100
Committer: Michael Park <mp...@apache.org>
Committed: Wed Aug 10 18:49:21 2016 +0100
----------------------------------------------------------------------
3rdparty/stout/include/stout/flags.hpp | 2 +-
3rdparty/stout/include/stout/interval.hpp | 10 +++++-----
3rdparty/stout/include/stout/json.hpp | 2 +-
3rdparty/stout/include/stout/linkedhashmap.hpp | 2 +-
3rdparty/stout/include/stout/os/osx.hpp | 2 +-
3rdparty/stout/include/stout/os/sunos.hpp | 4 ++--
3rdparty/stout/include/stout/os/sysctl.hpp | 4 ++--
3rdparty/stout/include/stout/proc.hpp | 10 +++++-----
3rdparty/stout/include/stout/protobuf.hpp | 2 +-
3rdparty/stout/include/stout/strings.hpp | 4 ++--
3rdparty/stout/tests/flags_tests.cpp | 22 ++++++++++-----------
3rdparty/stout/tests/ip_tests.cpp | 2 +-
3rdparty/stout/tests/mac_tests.cpp | 2 +-
3rdparty/stout/tests/multimap_tests.cpp | 2 +-
3rdparty/stout/tests/option_tests.cpp | 4 ++--
3rdparty/stout/tests/os/process_tests.cpp | 2 +-
3rdparty/stout/tests/os_tests.cpp | 6 +++---
3rdparty/stout/tests/proc_tests.cpp | 8 ++++----
3rdparty/stout/tests/strings_tests.cpp | 2 +-
19 files changed, 46 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/flags.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/flags.hpp b/3rdparty/stout/include/stout/flags.hpp
index 169f959..bc4684d 100644
--- a/3rdparty/stout/include/stout/flags.hpp
+++ b/3rdparty/stout/include/stout/flags.hpp
@@ -39,7 +39,7 @@
//
// ...
//
-// map<string, Option<string> > values;
+// map<string, Option<string>> values;
// values["no-debug"] = None(); // --no-debug
// values["debug"] = None(); // --debug
// values["debug"] = Some("true"); // --debug=true
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/interval.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/interval.hpp b/3rdparty/stout/include/stout/interval.hpp
index e6deeac..d0bbcb3 100644
--- a/3rdparty/stout/include/stout/interval.hpp
+++ b/3rdparty/stout/include/stout/interval.hpp
@@ -170,7 +170,7 @@ Interval<T> Bound<T>::operator , (const Bound<T>& right) const
// Modeled after boost interval_set. Provides a compact representation
// of a set by merging adjacent elements into intervals.
template <typename T>
-class IntervalSet : public boost::icl::interval_set<T, std::less, Interval<T> >
+class IntervalSet : public boost::icl::interval_set<T, std::less, Interval<T>>
{
public:
IntervalSet() {}
@@ -306,7 +306,7 @@ private:
const IntervalSet<X>& set);
// We use typedef here to make the code less verbose.
- typedef boost::icl::interval_set<T, std::less, Interval<T> > Base;
+ typedef boost::icl::interval_set<T, std::less, Interval<T>> Base;
};
@@ -355,7 +355,7 @@ namespace boost {
namespace icl {
template <typename T>
-struct interval_traits<Interval<T> >
+struct interval_traits<Interval<T>>
{
typedef interval_traits type;
typedef T domain_type;
@@ -379,8 +379,8 @@ struct interval_traits<Interval<T> >
template <typename T>
-struct interval_bound_type<Interval<T> >
- : public interval_bound_type<right_open_interval<T, std::less> >
+struct interval_bound_type<Interval<T>>
+ : public interval_bound_type<right_open_interval<T, std::less>>
{
typedef interval_bound_type type;
};
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/json.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/json.hpp b/3rdparty/stout/include/stout/json.hpp
index 51b1ada..9734561 100644
--- a/3rdparty/stout/include/stout/json.hpp
+++ b/3rdparty/stout/include/stout/json.hpp
@@ -227,7 +227,7 @@ typedef boost::variant<boost::recursive_wrapper<Null>,
boost::recursive_wrapper<Number>,
boost::recursive_wrapper<Object>,
boost::recursive_wrapper<Array>,
- boost::recursive_wrapper<Boolean> > Variant;
+ boost::recursive_wrapper<Boolean>> Variant;
} // namespace internal {
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/linkedhashmap.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/linkedhashmap.hpp b/3rdparty/stout/include/stout/linkedhashmap.hpp
index 6e06260..38acdc8 100644
--- a/3rdparty/stout/include/stout/linkedhashmap.hpp
+++ b/3rdparty/stout/include/stout/linkedhashmap.hpp
@@ -29,7 +29,7 @@ class LinkedHashMap
{
public:
typedef std::list<Key> list;
- typedef hashmap<Key, std::pair<Value, typename list::iterator> > map;
+ typedef hashmap<Key, std::pair<Value, typename list::iterator>> map;
Value& operator[] (const Key& key)
{
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/os/osx.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/os/osx.hpp b/3rdparty/stout/include/stout/os/osx.hpp
index ca77bb0..54d3412 100644
--- a/3rdparty/stout/include/stout/os/osx.hpp
+++ b/3rdparty/stout/include/stout/os/osx.hpp
@@ -166,7 +166,7 @@ inline Result<Process> process(pid_t pid)
}
-inline Try<std::set<pid_t> > pids()
+inline Try<std::set<pid_t>> pids()
{
const Try<int> maxproc = os::sysctl(CTL_KERN, KERN_MAXPROC).integer();
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/os/sunos.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/os/sunos.hpp b/3rdparty/stout/include/stout/os/sunos.hpp
index ec8e1f7..e0398d2 100644
--- a/3rdparty/stout/include/stout/os/sunos.hpp
+++ b/3rdparty/stout/include/stout/os/sunos.hpp
@@ -86,11 +86,11 @@ inline Result<Process> process(pid_t pid)
}
// Reads from /proc and returns a list of all running processes.
-inline Try<std::set<pid_t> > pids()
+inline Try<std::set<pid_t>> pids()
{
std::set<pid_t> pids;
- Try<std::list<std::string> > entries = os::ls("/proc");
+ Try<std::list<std::string>> entries = os::ls("/proc");
if (entries.isError()) {
return Error("Failed to list files in /proc: " + entries.error());
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/os/sysctl.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/os/sysctl.hpp b/3rdparty/stout/include/stout/os/sysctl.hpp
index 6db7bf6..8dc6661 100644
--- a/3rdparty/stout/include/stout/os/sysctl.hpp
+++ b/3rdparty/stout/include/stout/os/sysctl.hpp
@@ -51,7 +51,7 @@ namespace os {
// would like the length to be looked up dynamically you can just pass
// None. Here's an example using 'table' that builds on above:
//
-// Try<vector<kinfo_proc> > processes =
+// Try<vector<kinfo_proc>> processes =
// os::sysctl(CTL_KERN, KERN_PROC, KERN_PROC_ALL).table(maxprox.get());
//
// TODO(benh): Provide an 'integer(i)', 'string(s)', and 'table(t)' to
@@ -87,7 +87,7 @@ public:
// 'Table' to a std::vector<T>. For example, to get the first 10
// processes in the process table you can do:
//
- // Try<std::vector<kinfo_proc> > processes =
+ // Try<std::vector<kinfo_proc>> processes =
// os::sysctl(CTL_KERN, KERN_PROC, KERN_PROC_ALL).table(10);
//
private: struct Table; // Forward declaration.
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/proc.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/proc.hpp b/3rdparty/stout/include/stout/proc.hpp
index b543432..dd0d623 100644
--- a/3rdparty/stout/include/stout/proc.hpp
+++ b/3rdparty/stout/include/stout/proc.hpp
@@ -291,11 +291,11 @@ inline Result<std::string> cmdline(const Option<pid_t>& pid = None())
// Reads from /proc and returns a list of all running processes.
-inline Try<std::set<pid_t> > pids()
+inline Try<std::set<pid_t>> pids()
{
std::set<pid_t> pids;
- Try<std::list<std::string> > entries = os::ls("/proc");
+ Try<std::list<std::string>> entries = os::ls("/proc");
if (entries.isError()) {
return Error("Failed to list files in /proc: " + entries.error());
}
@@ -316,13 +316,13 @@ inline Try<std::set<pid_t> > pids()
// Reads from /proc/<pid>/task/* and returns a list of threads ids for pid.
-inline Try<std::set<pid_t> > threads(pid_t pid)
+inline Try<std::set<pid_t>> threads(pid_t pid)
{
const std::string path = path::join("/proc", stringify(pid), "task");
std::set<pid_t> threads;
- Try<std::list<std::string> > entries = os::ls(path);
+ Try<std::list<std::string>> entries = os::ls(path);
if (entries.isError()) {
return Error("Failed to list files in " + path + ": " + entries.error());
}
@@ -433,7 +433,7 @@ inline std::ostream& operator<<(std::ostream& out, const CPU& cpu)
// Reads from /proc/cpuinfo and returns a list of CPUs.
-inline Try<std::list<CPU> > cpus()
+inline Try<std::list<CPU>> cpus()
{
std::list<CPU> results;
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/protobuf.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/protobuf.hpp b/3rdparty/stout/include/stout/protobuf.hpp
index 91305e1..80cb20f 100644
--- a/3rdparty/stout/include/stout/protobuf.hpp
+++ b/3rdparty/stout/include/stout/protobuf.hpp
@@ -400,7 +400,7 @@ Try<Nothing> parse(
const JSON::Object& object);
-struct Parser : boost::static_visitor<Try<Nothing> >
+struct Parser : boost::static_visitor<Try<Nothing>>
{
Parser(google::protobuf::Message* _message,
const google::protobuf::FieldDescriptor* _field)
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/include/stout/strings.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/strings.hpp b/3rdparty/stout/include/stout/strings.hpp
index 7f7f1cf..fe469fa 100644
--- a/3rdparty/stout/include/stout/strings.hpp
+++ b/3rdparty/stout/include/stout/strings.hpp
@@ -207,12 +207,12 @@ inline std::vector<std::string> split(
// Would return a map with the following:
// bar: ["2"]
// foo: ["1", "3"]
-inline std::map<std::string, std::vector<std::string> > pairs(
+inline std::map<std::string, std::vector<std::string>> pairs(
const std::string& s,
const std::string& delims1,
const std::string& delims2)
{
- std::map<std::string, std::vector<std::string> > result;
+ std::map<std::string, std::vector<std::string>> result;
const std::vector<std::string> tokens = tokenize(s, delims1);
foreach (const std::string& token, tokens) {
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/flags_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/flags_tests.cpp b/3rdparty/stout/tests/flags_tests.cpp
index 77f3a6a..848d707 100644
--- a/3rdparty/stout/tests/flags_tests.cpp
+++ b/3rdparty/stout/tests/flags_tests.cpp
@@ -88,7 +88,7 @@ TEST(FlagsTest, Load)
{
TestFlags flags;
- const map<string, Option<string> > values = {
+ const map<string, Option<string>> values = {
{"name1", Some("billy joel")},
{"name2", Some("43")},
{"name3", Some("false")},
@@ -137,7 +137,7 @@ TEST(FlagsTest, Add)
"name9",
"Also set name9");
- const map<string, Option<string> > values = {
+ const map<string, Option<string>> values = {
{"name6", Some("ben folds")},
{"no-name7", None()},
{"name9", Some("")}
@@ -185,7 +185,7 @@ TEST(FlagsTest, Alias)
"value8");
// Load with alias names.
- const map<string, Option<string> > values = {
+ const map<string, Option<string>> values = {
{"alias6", Some("foo")},
{"no-alias7", None()},
{"alias8", Some("bar")}
@@ -206,7 +206,7 @@ TEST(FlagsTest, Flags)
{
TestFlags flags;
- const map<string, Option<string> > values = {
+ const map<string, Option<string>> values = {
{"name1", Some("billy joel")},
{"name2", Some("43")},
{"name3", Some("false")},
@@ -413,7 +413,7 @@ TEST(FlagsTest, Stringification)
"name8",
"Optional name8");
- const map<string, Option<string> > values = {
+ const map<string, Option<string>> values = {
{"name2", Some("43")},
{"no-name4", None()},
{"name5", None()}
@@ -470,7 +470,7 @@ TEST(FlagsTest, EffectiveName)
"value7");
// Only load "name6" flag explicitly.
- const map<string, Option<string> > values = {
+ const map<string, Option<string>> values = {
{"alias6", Some("value6")}
};
@@ -497,7 +497,7 @@ TEST(FlagsTest, DeprecationWarning)
flags::DeprecatedName("alias6"),
"Also set name6");
- const map<string, Option<string> > values = {
+ const map<string, Option<string>> values = {
{"alias6", Some("value6")}
};
@@ -853,7 +853,7 @@ TEST(FlagsTest, Duration)
"name7",
"Also some amount of time");
- const map<string, Option<string> > values = {
+ const map<string, Option<string>> values = {
{"name6", Some("2mins")},
{"name7", Some("3hrs")}
};
@@ -887,7 +887,7 @@ TEST(FlagsTest, JSON)
object.values["nested"] = nested;
- map<string, Option<string> > values;
+ map<string, Option<string>> values;
values["json"] = Some(stringify(object));
ASSERT_SOME(flags.load(values));
@@ -925,7 +925,7 @@ TEST_F(FlagsFileTest, JSONFile)
ASSERT_SOME(os::write(file, stringify(object)));
// Read the JSON from the file.
- map<string, Option<string> > values;
+ map<string, Option<string>> values;
values["json"] = Some(file);
ASSERT_SOME(flags.load(values));
@@ -949,7 +949,7 @@ TEST_F(FlagsFileTest, FilePrefix)
ASSERT_SOME(os::write(file, "testing"));
// Read the JSON from the file.
- map<string, Option<string> > values;
+ map<string, Option<string>> values;
values["something"] = Some("file://" + file);
ASSERT_SOME(flags.load(values));
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/ip_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/ip_tests.cpp b/3rdparty/stout/tests/ip_tests.cpp
index 4d1f1c9..59e69a5 100644
--- a/3rdparty/stout/tests/ip_tests.cpp
+++ b/3rdparty/stout/tests/ip_tests.cpp
@@ -33,7 +33,7 @@ using std::vector;
TEST(NetTest, LinkDevice)
{
- Try<set<string> > links = net::links();
+ Try<set<string>> links = net::links();
ASSERT_SOME(links);
foreach (const string& link, links.get()) {
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/mac_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/mac_tests.cpp b/3rdparty/stout/tests/mac_tests.cpp
index 1ff60cf..ebd50a0 100644
--- a/3rdparty/stout/tests/mac_tests.cpp
+++ b/3rdparty/stout/tests/mac_tests.cpp
@@ -32,7 +32,7 @@ using std::vector;
TEST(NetTest, Mac)
{
- Try<set<string> > links = net::links();
+ Try<set<string>> links = net::links();
ASSERT_SOME(links);
foreach (const string& link, links.get()) {
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/multimap_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/multimap_tests.cpp b/3rdparty/stout/tests/multimap_tests.cpp
index 2f606eb..488991b 100644
--- a/3rdparty/stout/tests/multimap_tests.cpp
+++ b/3rdparty/stout/tests/multimap_tests.cpp
@@ -28,7 +28,7 @@ template <typename T>
class MultimapTest : public ::testing::Test {};
typedef ::testing::Types<
- Multimap<string, uint16_t>, multihashmap<string, uint16_t> > MultimapTypes;
+ Multimap<string, uint16_t>, multihashmap<string, uint16_t>> MultimapTypes;
// Causes all TYPED_TEST(MultimapTest, ...) to be run for each of the
// specified multimap types.
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/option_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/option_tests.cpp b/3rdparty/stout/tests/option_tests.cpp
index 36abe13..73b03b0 100644
--- a/3rdparty/stout/tests/option_tests.cpp
+++ b/3rdparty/stout/tests/option_tests.cpp
@@ -102,8 +102,8 @@ TEST(OptionTest, Comparison)
Option<int> two = 2;
EXPECT_NE(one, two);
- Option<Option<int> > someNone = Option<Option<int> >::some(None());
- Option<Option<int> > noneNone = Option<Option<int> >::none();
+ Option<Option<int>> someNone = Option<Option<int>>::some(None());
+ Option<Option<int>> noneNone = Option<Option<int>>::none();
EXPECT_NE(someNone, noneNone);
EXPECT_NE(noneNone, someNone);
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/os/process_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/os/process_tests.cpp b/3rdparty/stout/tests/os/process_tests.cpp
index b536e66..1e26877 100644
--- a/3rdparty/stout/tests/os/process_tests.cpp
+++ b/3rdparty/stout/tests/os/process_tests.cpp
@@ -155,7 +155,7 @@ TEST_F(ProcessTest, Processes)
TEST_F(ProcessTest, Pids)
{
- Try<set<pid_t> > pids = os::pids();
+ Try<set<pid_t>> pids = os::pids();
ASSERT_SOME(pids);
EXPECT_NE(0u, pids.get().size());
EXPECT_EQ(1u, pids.get().count(getpid()));
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/os_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/os_tests.cpp b/3rdparty/stout/tests/os_tests.cpp
index e674440..c2900b8 100644
--- a/3rdparty/stout/tests/os_tests.cpp
+++ b/3rdparty/stout/tests/os_tests.cpp
@@ -262,7 +262,7 @@ TEST_F(OsTest, Sysctl)
ASSERT_SOME(maxproc);
// Table test.
- Try<vector<kinfo_proc> > processes =
+ Try<vector<kinfo_proc>> processes =
os::sysctl(CTL_KERN, KERN_PROC, KERN_PROC_ALL).table(maxproc.get());
ASSERT_SOME(processes);
@@ -294,7 +294,7 @@ TEST_F(OsTest, Sysctl)
TEST_F(OsTest, Children)
{
- Try<set<pid_t> > children = os::children(getpid());
+ Try<set<pid_t>> children = os::children(getpid());
ASSERT_SOME(children);
EXPECT_EQ(0u, children.get().size());
@@ -412,7 +412,7 @@ TEST_F(OsTest, Killtree)
// Kill the process tree and follow sessions and groups to make sure
// we cross the broken link due to the grandchild.
- Try<list<ProcessTree> > trees =
+ Try<list<ProcessTree>> trees =
os::killtree(child, SIGKILL, true, true);
ASSERT_SOME(trees);
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/proc_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/proc_tests.cpp b/3rdparty/stout/tests/proc_tests.cpp
index 17b9093..c6d1d44 100644
--- a/3rdparty/stout/tests/proc_tests.cpp
+++ b/3rdparty/stout/tests/proc_tests.cpp
@@ -40,7 +40,7 @@ using std::string;
TEST(ProcTest, Pids)
{
- Try<set<pid_t> > pids = proc::pids();
+ Try<set<pid_t>> pids = proc::pids();
ASSERT_SOME(pids);
EXPECT_NE(0u, pids.get().size());
@@ -51,7 +51,7 @@ TEST(ProcTest, Pids)
TEST(ProcTest, Cpus)
{
- Try<std::list<CPU> > cpus = proc::cpus();
+ Try<std::list<CPU>> cpus = proc::cpus();
ASSERT_SOME(cpus);
EXPECT_LE(1u, cpus.get().size());
@@ -81,7 +81,7 @@ TEST(ProcTest, ProcessStatus)
TEST(ProcTest, SingleThread)
{
// Check we have the expected number of threads.
- Try<set<pid_t> > threads = proc::threads(::getpid());
+ Try<set<pid_t>> threads = proc::threads(::getpid());
ASSERT_SOME(threads);
EXPECT_EQ(1u, threads.get().size());
@@ -113,7 +113,7 @@ TEST(ProcTest, MultipleThreads)
}
// Check we have the expected number of threads.
- Try<set<pid_t> > threads = proc::threads(::getpid());
+ Try<set<pid_t>> threads = proc::threads(::getpid());
ASSERT_SOME(threads);
EXPECT_EQ(1u + numThreads, threads.get().size());
http://git-wip-us.apache.org/repos/asf/mesos/blob/a57e5a43/3rdparty/stout/tests/strings_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/strings_tests.cpp b/3rdparty/stout/tests/strings_tests.cpp
index b54a9db..7dd3301 100644
--- a/3rdparty/stout/tests/strings_tests.cpp
+++ b/3rdparty/stout/tests/strings_tests.cpp
@@ -435,7 +435,7 @@ TEST(StringsTest, SplitNWithMultipleDelims)
TEST(StringsTest, Pairs)
{
- map<string, vector<string> > pairs = strings::pairs("one=1,two=2", ",", "=");
+ map<string, vector<string>> pairs = strings::pairs("one=1,two=2", ",", "=");
ASSERT_EQ(2u, pairs.size());
ASSERT_EQ(1u, pairs.count("one"));
ASSERT_EQ(1u, pairs["one"].size());
[2/4] mesos git commit: Trimmed unneeded extra space between right
angle brackets.
Posted by mp...@apache.org.
Trimmed unneeded extra space between right angle brackets.
Mesos codebase has been evolved and no more need an extra space
between two right angle brackets, e.g. vector<Option<int> >, to
work around C++98 parsing deficiencies (see MESOS-5830).
Review: https://reviews.apache.org/r/50887/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bea8c3c9
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bea8c3c9
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bea8c3c9
Branch: refs/heads/master
Commit: bea8c3c90da4ad0e2c282d238cb9af5dab2e2f72
Parents: 7058960
Author: Gaojin CAO <ca...@cmss.chinamobile.com>
Authored: Wed Aug 10 18:40:21 2016 +0100
Committer: Michael Park <mp...@apache.org>
Committed: Wed Aug 10 18:48:50 2016 +0100
----------------------------------------------------------------------
include/mesos/log/log.hpp | 8 +-
include/mesos/zookeeper/contender.hpp | 2 +-
include/mesos/zookeeper/detector.hpp | 2 +-
src/authentication/cram_md5/auxprop.cpp | 2 +-
src/cli/mesos.cpp | 2 +-
src/cli/resolve.cpp | 2 +-
src/files/files.cpp | 2 +-
src/java/jni/org_apache_mesos_Log.cpp | 8 +-
.../org_apache_mesos_state_AbstractState.cpp | 28 ++---
src/launcher/executor.cpp | 6 +-
src/linux/ns.hpp | 4 +-
src/log/consensus.cpp | 12 +-
src/log/coordinator.cpp | 46 +++----
src/log/coordinator.hpp | 6 +-
src/log/log.cpp | 38 +++---
src/log/main.cpp | 2 +-
src/log/network.hpp | 20 +--
src/log/recover.cpp | 24 ++--
src/log/recover.hpp | 2 +-
src/log/tool/benchmark.cpp | 2 +-
src/master/registrar.cpp | 24 ++--
src/slave/gc.cpp | 2 +-
src/slave/gc.hpp | 4 +-
src/slave/state.cpp | 8 +-
src/slave/status_update_manager.cpp | 2 +-
src/tests/allocator.hpp | 2 +-
src/tests/containerizer.cpp | 2 +-
src/tests/containerizer.hpp | 6 +-
.../composing_containerizer_tests.cpp | 2 +-
.../docker_containerizer_tests.cpp | 34 ++---
src/tests/containerizer/docker_tests.cpp | 2 +-
src/tests/containerizer/isolator_tests.cpp | 16 +--
src/tests/containerizer/launcher.hpp | 2 +-
src/tests/containerizer/port_mapping_tests.cpp | 52 ++++----
src/tests/disk_quota_tests.cpp | 6 +-
src/tests/environment.cpp | 6 +-
src/tests/exception_tests.cpp | 2 +-
src/tests/health_check_tests.cpp | 14 +--
src/tests/master_allocator_tests.cpp | 2 +-
src/tests/master_authorization_tests.cpp | 16 +--
src/tests/master_contender_detector_tests.cpp | 66 +++++-----
src/tests/master_slave_reconciliation_tests.cpp | 10 +-
src/tests/mesos.hpp | 4 +-
src/tests/reconciliation_tests.cpp | 2 +-
src/tests/registrar_tests.cpp | 4 +-
src/tests/registrar_zookeeper_tests.cpp | 2 +-
src/tests/slave_recovery_tests.cpp | 126 +++++++++----------
src/tests/state_tests.cpp | 40 +++---
src/tests/status_update_manager_tests.cpp | 16 +--
src/tests/zookeeper.cpp | 2 +-
src/zookeeper/detector.cpp | 22 ++--
support/cpplint.py | 2 +-
52 files changed, 359 insertions(+), 359 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/include/mesos/log/log.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/log/log.hpp b/include/mesos/log/log.hpp
index 0f69848..3edb9f1 100644
--- a/include/mesos/log/log.hpp
+++ b/include/mesos/log/log.hpp
@@ -133,7 +133,7 @@ public:
// Returns all entries between the specified positions, unless
// those positions are invalid, in which case returns an error.
- process::Future<std::list<Entry> > read(
+ process::Future<std::list<Entry>> read(
const Position& from,
const Position& to);
@@ -168,19 +168,19 @@ public:
// perform append and truncate operations. Returns the ending
// position of the log or none if the promise to exclusively write
// could not be attained but may be retried.
- process::Future<Option<Position> > start();
+ process::Future<Option<Position>> start();
// Attempts to append the specified data to the log. Returns the
// new ending position of the log or 'none' if this writer has
// lost it's promise to exclusively write (which can be reacquired
// by invoking Writer::start).
- process::Future<Option<Position> > append(const std::string& data);
+ process::Future<Option<Position>> append(const std::string& data);
// Attempts to truncate the log up to but not including the
// specificed position. Returns the new ending position of the log
// or 'none' if this writer has lost it's promise to exclusively
// write (which can be reacquired by invoking Writer::start).
- process::Future<Option<Position> > truncate(const Position& to);
+ process::Future<Option<Position>> truncate(const Position& to);
private:
internal::log::LogWriterProcess* process;
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/include/mesos/zookeeper/contender.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/zookeeper/contender.hpp b/include/mesos/zookeeper/contender.hpp
index 0ef9d56..21ae840 100644
--- a/include/mesos/zookeeper/contender.hpp
+++ b/include/mesos/zookeeper/contender.hpp
@@ -60,7 +60,7 @@ public:
// the contest (i.e. its membership is lost) and a failure if it is
// unable to watch the membership.
// It should be called only once, otherwise a failure is returned.
- process::Future<process::Future<Nothing> > contend();
+ process::Future<process::Future<Nothing>> contend();
// Returns true if successfully withdrawn from the contest (either
// while contending or has already contended and is watching for
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/include/mesos/zookeeper/detector.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/zookeeper/detector.hpp b/include/mesos/zookeeper/detector.hpp
index a953997..35be0dd 100644
--- a/include/mesos/zookeeper/detector.hpp
+++ b/include/mesos/zookeeper/detector.hpp
@@ -55,7 +55,7 @@ public:
// gets a different result.
//
// TODO(xujyan): Use a Stream abstraction instead.
- process::Future<Option<Group::Membership> > detect(
+ process::Future<Option<Group::Membership>> detect(
const Option<Group::Membership>& previous = None());
private:
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/authentication/cram_md5/auxprop.cpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/auxprop.cpp b/src/authentication/cram_md5/auxprop.cpp
index 8540341..8a20d5b 100644
--- a/src/authentication/cram_md5/auxprop.cpp
+++ b/src/authentication/cram_md5/auxprop.cpp
@@ -180,7 +180,7 @@ int InMemoryAuxiliaryPropertyPlugin::initialize(
VLOG(1) << "Looking up auxiliary property '" << property->name << "'";
- Option<list<string> > values = lookup(user, name);
+ Option<list<string>> values = lookup(user, name);
if (values.isSome()) {
if (values.get().empty()) {
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/cli/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/cli/mesos.cpp b/src/cli/mesos.cpp
index 81e2325..ac0b5dd 100644
--- a/src/cli/mesos.cpp
+++ b/src/cli/mesos.cpp
@@ -42,7 +42,7 @@ void usage(const char* argv0)
if (PATH.isSome()) {
foreach (const string& path, strings::split(PATH.get(), ":")) {
- Try<list<string> > matches = fs::list(path::join(path, "mesos-*"));
+ Try<list<string>> matches = fs::list(path::join(path, "mesos-*"));
if (matches.isSome()) {
foreach (const string& match, matches.get()) {
Try<bool> access = os::access(match, X_OK);
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/cli/resolve.cpp
----------------------------------------------------------------------
diff --git a/src/cli/resolve.cpp b/src/cli/resolve.cpp
index ac6be05..3a12f12 100644
--- a/src/cli/resolve.cpp
+++ b/src/cli/resolve.cpp
@@ -93,7 +93,7 @@ int main(int argc, char** argv)
return EXIT_FAILURE;
}
- Future<Option<MasterInfo> > masterInfo = detector.get()->detect();
+ Future<Option<MasterInfo>> masterInfo = detector.get()->detect();
if (!masterInfo.await(timeout)) {
cerr << "Failed to detect master from '" << master
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/files/files.cpp
----------------------------------------------------------------------
diff --git a/src/files/files.cpp b/src/files/files.cpp
index 793d68e..613f336 100644
--- a/src/files/files.cpp
+++ b/src/files/files.cpp
@@ -430,7 +430,7 @@ Future<Try<list<FileInfo>, FilesError>> FilesProcess::browse(
// The result will be a sorted (on path) list of files and dirs.
map<string, FileInfo> files;
- Try<list<string> > entries = os::ls(resolvedPath.get());
+ Try<list<string>> entries = os::ls(resolvedPath.get());
if (entries.isSome()) {
foreach (const string& entry, entries.get()) {
struct stat s;
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/java/jni/org_apache_mesos_Log.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_Log.cpp b/src/java/jni/org_apache_mesos_Log.cpp
index 04f8afd..eb0f54b 100644
--- a/src/java/jni/org_apache_mesos_Log.cpp
+++ b/src/java/jni/org_apache_mesos_Log.cpp
@@ -151,7 +151,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_Log_00024Reader_read
jlong jseconds = env->CallLongMethod(junit, toSeconds, jtimeout);
- Future<std::list<Log::Entry> > entries = reader->read(from, to);
+ Future<std::list<Log::Entry>> entries = reader->read(from, to);
if (!entries.await(Seconds(jseconds))) {
// Timed out while trying to read the log.
@@ -306,7 +306,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_Log_00024Writer_append
jlong jseconds = env->CallLongMethod(junit, toSeconds, jtimeout);
- Future<Option<Log::Position> > position = writer->append(data);
+ Future<Option<Log::Position>> position = writer->append(data);
if (!position.await(Seconds(jseconds))) {
// Timed out while trying to append the log.
@@ -372,7 +372,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_Log_00024Writer_truncate
jlong jseconds = env->CallLongMethod(junit, toSeconds, jtimeout);
- Future<Option<Log::Position> > position = writer->truncate(to);
+ Future<Option<Log::Position>> position = writer->truncate(to);
if (!position.await(Seconds(jseconds))) {
// Timed out while trying to truncate the log.
@@ -450,7 +450,7 @@ JNIEXPORT void JNICALL Java_org_apache_mesos_Log_00024Writer_initialize
// Try to start the writer.
while (retries-- > 0) {
- Future<Option<Log::Position> > position = writer->start();
+ Future<Option<Log::Position>> position = writer->start();
if (!position.await(seconds)) {
// Cancel the pending start. It is likely that we'll retry right
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/java/jni/org_apache_mesos_state_AbstractState.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_state_AbstractState.cpp b/src/java/jni/org_apache_mesos_state_AbstractState.cpp
index 3101352..8addd2d 100644
--- a/src/java/jni/org_apache_mesos_state_AbstractState.cpp
+++ b/src/java/jni/org_apache_mesos_state_AbstractState.cpp
@@ -401,8 +401,8 @@ JNIEXPORT jlong JNICALL Java_org_apache_mesos_state_AbstractState__1_1store
State* state = (State*) env->GetLongField(thiz, __state);
- Future<Option<Variable> >* future =
- new Future<Option<Variable> >(state->store(*variable));
+ Future<Option<Variable>>* future =
+ new Future<Option<Variable>>(state->store(*variable));
return (jlong) future;
}
@@ -416,7 +416,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_mesos_state_AbstractState__1_1store
JNIEXPORT jboolean JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1cancel
(JNIEnv* env, jobject thiz, jlong jfuture)
{
- Future<Option<Variable> >* future = (Future<Option<Variable> >*) jfuture;
+ Future<Option<Variable>>* future = (Future<Option<Variable>>*) jfuture;
// We'll initiate a discard but we won't consider it cancelled since
// we don't know if/when the future will get discarded.
@@ -451,7 +451,7 @@ JNIEXPORT jboolean JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1
JNIEXPORT jboolean JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1is_1done
(JNIEnv* env, jobject thiz, jlong jfuture)
{
- Future<Option<Variable> >* future = (Future<Option<Variable> >*) jfuture;
+ Future<Option<Variable>>* future = (Future<Option<Variable>>*) jfuture;
return (jboolean) !future->isPending() || future->hasDiscard();
}
@@ -465,7 +465,7 @@ JNIEXPORT jboolean JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1
JNIEXPORT jobject JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1get
(JNIEnv* env, jobject thiz, jlong jfuture)
{
- Future<Option<Variable> >* future = (Future<Option<Variable> >*) jfuture;
+ Future<Option<Variable>>* future = (Future<Option<Variable>>*) jfuture;
future->await();
@@ -510,7 +510,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1g
JNIEXPORT jobject JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1get_1timeout
(JNIEnv* env, jobject thiz, jlong jfuture, jlong jtimeout, jobject junit)
{
- Future<Option<Variable> >* future = (Future<Option<Variable> >*) jfuture;
+ Future<Option<Variable>>* future = (Future<Option<Variable>>*) jfuture;
jclass clazz = env->GetObjectClass(junit);
@@ -569,7 +569,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1g
JNIEXPORT void JNICALL Java_org_apache_mesos_state_AbstractState__1_1store_1finalize
(JNIEnv* env, jobject thiz, jlong jfuture)
{
- Future<Option<Variable> >* future = (Future<Option<Variable> >*) jfuture;
+ Future<Option<Variable>>* future = (Future<Option<Variable>>*) jfuture;
delete future;
}
@@ -1020,8 +1020,8 @@ JNIEXPORT jlong JNICALL Java_org_apache_mesos_state_AbstractState__1_1names
State* state = (State*) env->GetLongField(thiz, __state);
- Future<set<string> >* future =
- new Future<set<string> >(state->names());
+ Future<set<string>>* future =
+ new Future<set<string>>(state->names());
return (jlong) future;
}
@@ -1035,7 +1035,7 @@ JNIEXPORT jlong JNICALL Java_org_apache_mesos_state_AbstractState__1_1names
JNIEXPORT jboolean JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1cancel
(JNIEnv* env, jobject thiz, jlong jfuture)
{
- Future<set<string> >* future = (Future<set<string> >*) jfuture;
+ Future<set<string>>* future = (Future<set<string>>*) jfuture;
// We'll initiate a discard but we won't consider it cancelled since
// we don't know if/when the future will get discarded.
@@ -1069,7 +1069,7 @@ JNIEXPORT jboolean JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1
JNIEXPORT jboolean JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1is_1done
(JNIEnv* env, jobject thiz, jlong jfuture)
{
- Future<set<string> >* future = (Future<set<string> >*) jfuture;
+ Future<set<string>>* future = (Future<set<string>>*) jfuture;
return (jboolean) !future->isPending() || future->hasDiscard();
}
@@ -1083,7 +1083,7 @@ JNIEXPORT jboolean JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1
JNIEXPORT jobject JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1get
(JNIEnv* env, jobject thiz, jlong jfuture)
{
- Future<set<string> >* future = (Future<set<string> >*) jfuture;
+ Future<set<string>>* future = (Future<set<string>>*) jfuture;
future->await();
@@ -1131,7 +1131,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1g
JNIEXPORT jobject JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1get_1timeout
(JNIEnv* env, jobject thiz, jlong jfuture, jlong jtimeout, jobject junit)
{
- Future<set<string> >* future = (Future<set<string> >*) jfuture;
+ Future<set<string>>* future = (Future<set<string>>*) jfuture;
jclass clazz = env->GetObjectClass(junit);
@@ -1193,7 +1193,7 @@ JNIEXPORT jobject JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1g
JNIEXPORT void JNICALL Java_org_apache_mesos_state_AbstractState__1_1names_1finalize
(JNIEnv* env, jobject thiz, jlong jfuture)
{
- Future<set<string> >* future = (Future<set<string> >*) jfuture;
+ Future<set<string>>* future = (Future<set<string>>*) jfuture;
delete future;
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index 9333dc0..52d20af 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -570,7 +570,7 @@ private:
cout << "Sending SIGTERM to process tree at pid " << pid << endl;
- Try<std::list<os::ProcessTree> > trees =
+ Try<std::list<os::ProcessTree>> trees =
os::killtree(pid, SIGTERM, true, true);
if (trees.isError()) {
@@ -596,7 +596,7 @@ private:
}
}
- void reaped(pid_t pid, const Future<Option<int> >& status_)
+ void reaped(pid_t pid, const Future<Option<int>>& status_)
{
terminated = true;
@@ -662,7 +662,7 @@ private:
// shutdown may leave orphan processes hanging off init. This
// scenario will be handled when PID namespace encapsulated
// execution is in place.
- Try<std::list<os::ProcessTree> > trees =
+ Try<std::list<os::ProcessTree>> trees =
os::killtree(pid, SIGKILL, true, true);
if (trees.isError()) {
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/linux/ns.hpp
----------------------------------------------------------------------
diff --git a/src/linux/ns.hpp b/src/linux/ns.hpp
index e905aef..2d6c359 100644
--- a/src/linux/ns.hpp
+++ b/src/linux/ns.hpp
@@ -82,7 +82,7 @@ namespace ns {
inline std::set<std::string> namespaces()
{
std::set<std::string> result;
- Try<std::list<std::string> > entries = os::ls("/proc/self/ns");
+ Try<std::list<std::string>> entries = os::ls("/proc/self/ns");
if (entries.isSome()) {
foreach (const std::string& entry, entries.get()) {
result.insert(entry);
@@ -123,7 +123,7 @@ inline Try<int> nstype(const std::string& ns)
inline Try<Nothing> setns(const std::string& path, const std::string& ns)
{
// Return error if there're multiple threads in the calling process.
- Try<std::set<pid_t> > threads = proc::threads(::getpid());
+ Try<std::set<pid_t>> threads = proc::threads(::getpid());
if (threads.isError()) {
return Error(
"Failed to get the threads of the current process: " +
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/consensus.cpp
----------------------------------------------------------------------
diff --git a/src/log/consensus.cpp b/src/log/consensus.cpp
index 27f2c58..94ddf24 100644
--- a/src/log/consensus.cpp
+++ b/src/log/consensus.cpp
@@ -130,7 +130,7 @@ private:
.onAny(defer(self(), &Self::broadcasted, lambda::_1));
}
- void broadcasted(const Future<set<Future<PromiseResponse> > >& future)
+ void broadcasted(const Future<set<Future<PromiseResponse>>>& future)
{
if (!future.isReady()) {
promise.fail(
@@ -260,7 +260,7 @@ private:
const uint64_t position;
PromiseRequest request;
- set<Future<PromiseResponse> > responses;
+ set<Future<PromiseResponse>> responses;
size_t responsesReceived;
size_t ignoresReceived;
Option<uint64_t> highestNackProposal;
@@ -333,7 +333,7 @@ private:
.onAny(defer(self(), &Self::broadcasted, lambda::_1));
}
- void broadcasted(const Future<set<Future<PromiseResponse> > >& future)
+ void broadcasted(const Future<set<Future<PromiseResponse>>>& future)
{
if (!future.isReady()) {
promise.fail(
@@ -422,7 +422,7 @@ private:
const uint64_t proposal;
PromiseRequest request;
- set<Future<PromiseResponse> > responses;
+ set<Future<PromiseResponse>> responses;
size_t responsesReceived;
size_t ignoresReceived;
Option<uint64_t> highestNackProposal;
@@ -515,7 +515,7 @@ private:
.onAny(defer(self(), &Self::broadcasted, lambda::_1));
}
- void broadcasted(const Future<set<Future<WriteResponse> > >& future)
+ void broadcasted(const Future<set<Future<WriteResponse>>>& future)
{
if (!future.isReady()) {
promise.fail(
@@ -593,7 +593,7 @@ private:
const Action action;
WriteRequest request;
- set<Future<WriteResponse> > responses;
+ set<Future<WriteResponse>> responses;
size_t responsesReceived;
size_t ignoresReceived;
Option<uint64_t> highestNackProposal;
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/coordinator.cpp
----------------------------------------------------------------------
diff --git a/src/log/coordinator.cpp b/src/log/coordinator.cpp
index ecf457f..72ef036 100644
--- a/src/log/coordinator.cpp
+++ b/src/log/coordinator.cpp
@@ -59,10 +59,10 @@ public:
virtual ~CoordinatorProcess() {}
// See comments in 'coordinator.hpp'.
- Future<Option<uint64_t> > elect();
+ Future<Option<uint64_t>> elect();
Future<uint64_t> demote();
- Future<Option<uint64_t> > append(const string& bytes);
- Future<Option<uint64_t> > truncate(uint64_t to);
+ Future<Option<uint64_t>> append(const string& bytes);
+ Future<Option<uint64_t>> truncate(uint64_t to);
protected:
virtual void finalize()
@@ -79,11 +79,11 @@ private:
Future<uint64_t> getLastProposal();
Future<Nothing> updateProposal(uint64_t promised);
Future<PromiseResponse> runPromisePhase();
- Future<Option<uint64_t> > checkPromisePhase(const PromiseResponse& response);
- Future<IntervalSet<uint64_t> > getMissingPositions();
+ Future<Option<uint64_t>> checkPromisePhase(const PromiseResponse& response);
+ Future<IntervalSet<uint64_t>> getMissingPositions();
Future<Nothing> catchupMissingPositions(
const IntervalSet<uint64_t>& positions);
- Future<Option<uint64_t> > updateIndexAfterElected();
+ Future<Option<uint64_t>> updateIndexAfterElected();
void electingFinished(const Option<uint64_t>& position);
void electingFailed();
void electingAborted();
@@ -92,14 +92,14 @@ private:
// Writing related functions. //
/////////////////////////////////
- Future<Option<uint64_t> > write(const Action& action);
+ Future<Option<uint64_t>> write(const Action& action);
Future<WriteResponse> runWritePhase(const Action& action);
- Future<Option<uint64_t> > checkWritePhase(
+ Future<Option<uint64_t>> checkWritePhase(
const Action& action,
const WriteResponse& response);
Future<Nothing> runLearnPhase(const Action& action);
Future<bool> checkLearnPhase(const Action& action);
- Future<Option<uint64_t> > updateIndexAfterWritten(bool missing);
+ Future<Option<uint64_t>> updateIndexAfterWritten(bool missing);
void writingFinished();
void writingFailed();
void writingAborted();
@@ -130,8 +130,8 @@ private:
// The position to which the next entry will be written.
uint64_t index;
- Future<Option<uint64_t> > electing;
- Future<Option<uint64_t> > writing;
+ Future<Option<uint64_t>> electing;
+ Future<Option<uint64_t>> writing;
};
@@ -140,7 +140,7 @@ private:
/////////////////////////////////////////////////
-Future<Option<uint64_t> > CoordinatorProcess::elect()
+Future<Option<uint64_t>> CoordinatorProcess::elect()
{
if (state == ELECTING) {
return electing;
@@ -189,7 +189,7 @@ Future<PromiseResponse> CoordinatorProcess::runPromisePhase()
}
-Future<Option<uint64_t> > CoordinatorProcess::checkPromisePhase(
+Future<Option<uint64_t>> CoordinatorProcess::checkPromisePhase(
const PromiseResponse& response)
{
CHECK(response.has_type());
@@ -226,7 +226,7 @@ Future<Option<uint64_t> > CoordinatorProcess::checkPromisePhase(
}
-Future<IntervalSet<uint64_t> > CoordinatorProcess::getMissingPositions()
+Future<IntervalSet<uint64_t>> CoordinatorProcess::getMissingPositions()
{
return replica->missing(0, index);
}
@@ -249,7 +249,7 @@ Future<Nothing> CoordinatorProcess::catchupMissingPositions(
}
-Future<Option<uint64_t> > CoordinatorProcess::updateIndexAfterElected()
+Future<Option<uint64_t>> CoordinatorProcess::updateIndexAfterElected()
{
return Option<uint64_t>(index++);
}
@@ -303,7 +303,7 @@ Future<uint64_t> CoordinatorProcess::demote()
/////////////////////////////////////////////////
-Future<Option<uint64_t> > CoordinatorProcess::append(const string& bytes)
+Future<Option<uint64_t>> CoordinatorProcess::append(const string& bytes)
{
if (state == INITIAL || state == ELECTING) {
return None();
@@ -323,7 +323,7 @@ Future<Option<uint64_t> > CoordinatorProcess::append(const string& bytes)
}
-Future<Option<uint64_t> > CoordinatorProcess::truncate(uint64_t to)
+Future<Option<uint64_t>> CoordinatorProcess::truncate(uint64_t to)
{
if (state == INITIAL || state == ELECTING) {
return None();
@@ -343,7 +343,7 @@ Future<Option<uint64_t> > CoordinatorProcess::truncate(uint64_t to)
}
-Future<Option<uint64_t> > CoordinatorProcess::write(const Action& action)
+Future<Option<uint64_t>> CoordinatorProcess::write(const Action& action)
{
LOG(INFO) << "Coordinator attempting to write " << action.type()
<< " action at position " << action.position();
@@ -369,7 +369,7 @@ Future<WriteResponse> CoordinatorProcess::runWritePhase(const Action& action)
}
-Future<Option<uint64_t> > CoordinatorProcess::checkWritePhase(
+Future<Option<uint64_t>> CoordinatorProcess::checkWritePhase(
const Action& action,
const WriteResponse& response)
{
@@ -402,7 +402,7 @@ Future<bool> CoordinatorProcess::checkLearnPhase(const Action& action)
}
-Future<Option<uint64_t> > CoordinatorProcess::updateIndexAfterWritten(
+Future<Option<uint64_t>> CoordinatorProcess::updateIndexAfterWritten(
bool missing)
{
CHECK(!missing) << "Not expecting local replica to be missing position "
@@ -461,7 +461,7 @@ Coordinator::~Coordinator()
}
-Future<Option<uint64_t> > Coordinator::elect()
+Future<Option<uint64_t>> Coordinator::elect()
{
return dispatch(process, &CoordinatorProcess::elect);
}
@@ -473,13 +473,13 @@ Future<uint64_t> Coordinator::demote()
}
-Future<Option<uint64_t> > Coordinator::append(const string& bytes)
+Future<Option<uint64_t>> Coordinator::append(const string& bytes)
{
return dispatch(process, &CoordinatorProcess::append, bytes);
}
-Future<Option<uint64_t> > Coordinator::truncate(uint64_t to)
+Future<Option<uint64_t>> Coordinator::truncate(uint64_t to)
{
return dispatch(process, &CoordinatorProcess::truncate, to);
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/coordinator.hpp
----------------------------------------------------------------------
diff --git a/src/log/coordinator.hpp b/src/log/coordinator.hpp
index 9fa4f19..b5f9c96 100644
--- a/src/log/coordinator.hpp
+++ b/src/log/coordinator.hpp
@@ -50,7 +50,7 @@ public:
// Handles coordinator election. Returns the last committed (a.k.a.,
// learned) log position if the operation succeeds. Returns none if
// the election is not successful, but can be retried.
- process::Future<Option<uint64_t> > elect();
+ process::Future<Option<uint64_t>> elect();
// Handles coordinator demotion. Returns the last committed (a.k.a.,
// learned) log position if the operation succeeds. One should only
@@ -61,13 +61,13 @@ public:
// Appends the specified bytes to the end of the log. Returns the
// position of the appended entry if the operation succeeds or none
// if the coordinator was demoted.
- process::Future<Option<uint64_t> > append(const std::string& bytes);
+ process::Future<Option<uint64_t>> append(const std::string& bytes);
// Removes all log entries preceding the log entry at the given
// position (to). Returns the position at which the truncate
// operation is written if the operation succeeds or none if the
// coordinator was demoted.
- process::Future<Option<uint64_t> > truncate(uint64_t to);
+ process::Future<Option<uint64_t>> truncate(uint64_t to);
private:
CoordinatorProcess* process;
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/log.cpp
----------------------------------------------------------------------
diff --git a/src/log/log.cpp b/src/log/log.cpp
index 0940f92..be511d9 100644
--- a/src/log/log.cpp
+++ b/src/log/log.cpp
@@ -128,13 +128,13 @@ void LogProcess::finalize()
{
if (recovering.isSome()) {
// Stop the recovery if it is still pending.
- Future<Owned<Replica> > future = recovering.get();
+ Future<Owned<Replica>> future = recovering.get();
future.discard();
}
// If there exist operations that are gated by the recovery, we fail
// all of them because the log is being deleted.
- foreach (process::Promise<Shared<Replica> >* promise, promises) {
+ foreach (process::Promise<Shared<Replica>>* promise, promises) {
promise->fail("Log is being deleted");
delete promise;
}
@@ -153,7 +153,7 @@ void LogProcess::finalize()
}
-Future<Shared<Replica> > LogProcess::recover()
+Future<Shared<Replica>> LogProcess::recover()
{
// The future 'recovered' is used to mark the success (or the
// failure) of the recovery. We do not use the future 'recovering'
@@ -174,8 +174,8 @@ Future<Shared<Replica> > LogProcess::recover()
// Recovery has not finished yet. Create a promise and queue it such
// that it can get notified once the recovery has finished (either
// succeeded or failed).
- process::Promise<Shared<Replica> >* promise =
- new process::Promise<Shared<Replica> >();
+ process::Promise<Shared<Replica>>* promise =
+ new process::Promise<Shared<Replica>>();
promises.push_back(promise);
@@ -205,7 +205,7 @@ void LogProcess::_recover()
{
CHECK_SOME(recovering);
- Future<Owned<Replica> > future = recovering.get();
+ Future<Owned<Replica>> future = recovering.get();
if (!future.isReady()) {
VLOG(2) << "Log recovery failed";
@@ -218,7 +218,7 @@ void LogProcess::_recover()
// Mark the failure of the recovery.
recovered.fail(failure);
- foreach (process::Promise<Shared<Replica> >* promise, promises) {
+ foreach (process::Promise<Shared<Replica>>* promise, promises) {
promise->fail(failure);
delete promise;
}
@@ -233,7 +233,7 @@ void LogProcess::_recover()
// Mark the success of the recovery.
recovered.set(Nothing());
- foreach (process::Promise<Shared<Replica> >* promise, promises) {
+ foreach (process::Promise<Shared<Replica>>* promise, promises) {
promise->set(replica);
delete promise;
}
@@ -399,7 +399,7 @@ Future<Log::Position> LogReaderProcess::_ending()
}
-Future<list<Log::Entry> > LogReaderProcess::read(
+Future<list<Log::Entry>> LogReaderProcess::read(
const Log::Position& from,
const Log::Position& to)
{
@@ -407,7 +407,7 @@ Future<list<Log::Entry> > LogReaderProcess::read(
}
-Future<list<Log::Entry> > LogReaderProcess::_read(
+Future<list<Log::Entry>> LogReaderProcess::_read(
const Log::Position& from,
const Log::Position& to)
{
@@ -418,7 +418,7 @@ Future<list<Log::Entry> > LogReaderProcess::_read(
}
-Future<list<Log::Entry> > LogReaderProcess::__read(
+Future<list<Log::Entry>> LogReaderProcess::__read(
const Log::Position& from,
const Log::Position& to,
const list<Action>& actions)
@@ -532,13 +532,13 @@ void LogWriterProcess::_recover()
}
-Future<Option<Log::Position> > LogWriterProcess::start()
+Future<Option<Log::Position>> LogWriterProcess::start()
{
return recover().then(defer(self(), &Self::_start));
}
-Future<Option<Log::Position> > LogWriterProcess::_start()
+Future<Option<Log::Position>> LogWriterProcess::_start()
{
// We delete the existing coordinator (if exists) and create a new
// coordinator each time 'start' is called.
@@ -572,7 +572,7 @@ Option<Log::Position> LogWriterProcess::__start(
}
-Future<Option<Log::Position> > LogWriterProcess::append(const string& bytes)
+Future<Option<Log::Position>> LogWriterProcess::append(const string& bytes)
{
VLOG(1) << "Attempting to append " << bytes.size() << " bytes to the log";
@@ -590,7 +590,7 @@ Future<Option<Log::Position> > LogWriterProcess::append(const string& bytes)
}
-Future<Option<Log::Position> > LogWriterProcess::truncate(
+Future<Option<Log::Position>> LogWriterProcess::truncate(
const Log::Position& to)
{
VLOG(1) << "Attempting to truncate the log to " << to.value;
@@ -711,7 +711,7 @@ Log::Reader::~Reader()
}
-Future<list<Log::Entry> > Log::Reader::read(
+Future<list<Log::Entry>> Log::Reader::read(
const Log::Position& from,
const Log::Position& to)
{
@@ -751,19 +751,19 @@ Log::Writer::~Writer()
}
-Future<Option<Log::Position> > Log::Writer::start()
+Future<Option<Log::Position>> Log::Writer::start()
{
return dispatch(process, &LogWriterProcess::start);
}
-Future<Option<Log::Position> > Log::Writer::append(const string& data)
+Future<Option<Log::Position>> Log::Writer::append(const string& data)
{
return dispatch(process, &LogWriterProcess::append, data);
}
-Future<Option<Log::Position> > Log::Writer::truncate(const Log::Position& to)
+Future<Option<Log::Position>> Log::Writer::truncate(const Log::Position& to)
{
return dispatch(process, &LogWriterProcess::truncate, to);
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/main.cpp
----------------------------------------------------------------------
diff --git a/src/log/main.cpp b/src/log/main.cpp
index 171c312..deccd29 100644
--- a/src/log/main.cpp
+++ b/src/log/main.cpp
@@ -41,7 +41,7 @@ using std::endl;
using std::string;
// All the registered tools.
-static hashmap<string, Owned<tool::Tool> > tools;
+static hashmap<string, Owned<tool::Tool>> tools;
static void add(const Owned<tool::Tool>& tool)
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/network.hpp
----------------------------------------------------------------------
diff --git a/src/log/network.hpp b/src/log/network.hpp
index 8750880..0afcfae 100644
--- a/src/log/network.hpp
+++ b/src/log/network.hpp
@@ -84,7 +84,7 @@ public:
// Sends a request to each member of the network and returns a set
// of futures that represent their responses.
template <typename Req, typename Res>
- process::Future<std::set<process::Future<Res> > > broadcast(
+ process::Future<std::set<process::Future<Res>>> broadcast(
const Protocol<Req, Res>& protocol,
const Req& req,
const std::set<process::UPID>& filter = std::set<process::UPID>()) const;
@@ -126,14 +126,14 @@ private:
void watch(const std::set<zookeeper::Group::Membership>& expected);
// Invoked when the group memberships have changed.
- void watched(const process::Future<std::set<zookeeper::Group::Membership> >&);
+ void watched(const process::Future<std::set<zookeeper::Group::Membership>>&);
// Invoked when group members data has been collected.
void collected(
- const process::Future<std::list<Option<std::string> > >& datas);
+ const process::Future<std::list<Option<std::string>>>& datas);
zookeeper::Group group;
- process::Future<std::set<zookeeper::Group::Membership> > memberships;
+ process::Future<std::set<zookeeper::Group::Membership>> memberships;
// The set of PIDs that are always in the network.
std::set<process::UPID> base;
@@ -219,12 +219,12 @@ public:
// Sends a request to each of the groups members and returns a set
// of futures that represent their responses.
template <typename Req, typename Res>
- std::set<process::Future<Res> > broadcast(
+ std::set<process::Future<Res>> broadcast(
const Protocol<Req, Res>& protocol,
const Req& req,
const std::set<process::UPID>& filter)
{
- std::set<process::Future<Res> > futures;
+ std::set<process::Future<Res>> futures;
typename std::set<process::UPID>::const_iterator iterator;
for (iterator = pids.begin(); iterator != pids.end(); ++iterator) {
const process::UPID& pid = *iterator;
@@ -368,7 +368,7 @@ inline process::Future<size_t> Network::watch(
template <typename Req, typename Res>
-process::Future<std::set<process::Future<Res> > > Network::broadcast(
+process::Future<std::set<process::Future<Res>>> Network::broadcast(
const Protocol<Req, Res>& protocol,
const Req& req,
const std::set<process::UPID>& filter) const
@@ -417,7 +417,7 @@ inline void ZooKeeperNetwork::watch(
inline void ZooKeeperNetwork::watched(
- const process::Future<std::set<zookeeper::Group::Membership> >&)
+ const process::Future<std::set<zookeeper::Group::Membership>>&)
{
if (memberships.isFailed()) {
// We can't do much here, we could try creating another Group but
@@ -432,7 +432,7 @@ inline void ZooKeeperNetwork::watched(
LOG(INFO) << "ZooKeeper group memberships changed";
// Get data for each membership in order to convert them to PIDs.
- std::list<process::Future<Option<std::string> > > futures;
+ std::list<process::Future<Option<std::string>>> futures;
foreach (const zookeeper::Group::Membership& membership, memberships.get()) {
futures.push_back(group.data(membership));
@@ -451,7 +451,7 @@ inline void ZooKeeperNetwork::watched(
inline void ZooKeeperNetwork::collected(
- const process::Future<std::list<Option<std::string> > >& datas)
+ const process::Future<std::list<Option<std::string>>>& datas)
{
if (datas.isFailed()) {
LOG(WARNING) << "Failed to get data for ZooKeeper group members: "
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/recover.cpp
----------------------------------------------------------------------
diff --git a/src/log/recover.cpp b/src/log/recover.cpp
index eaf3fd3..b366818 100644
--- a/src/log/recover.cpp
+++ b/src/log/recover.cpp
@@ -103,8 +103,8 @@ protected:
}
private:
- static Future<Option<RecoverResponse> > timedout(
- Future<Option<RecoverResponse> > future,
+ static Future<Option<RecoverResponse>> timedout(
+ Future<Option<RecoverResponse>> future,
const Duration& timeout)
{
LOG(INFO) << "Unable to finish the recover protocol in "
@@ -151,7 +151,7 @@ private:
.then(defer(self(), &Self::broadcasted, lambda::_1));
}
- Future<Nothing> broadcasted(const set<Future<RecoverResponse> >& _responses)
+ Future<Nothing> broadcasted(const set<Future<RecoverResponse>>& _responses)
{
VLOG(2) << "Broadcast request completed";
@@ -166,7 +166,7 @@ private:
}
// Returns None if we need to re-run the protocol.
- Future<Option<RecoverResponse> > receive()
+ Future<Option<RecoverResponse>> receive()
{
if (responses.empty()) {
// All responses have been received but we haven't received
@@ -182,7 +182,7 @@ private:
.then(defer(self(), &Self::received, lambda::_1));
}
- Future<Option<RecoverResponse> > received(
+ Future<Option<RecoverResponse>> received(
const Future<RecoverResponse>& future)
{
// Enforced by the select semantics.
@@ -311,7 +311,7 @@ private:
return receive();
}
- void finished(const Future<Option<RecoverResponse> >& future)
+ void finished(const Future<Option<RecoverResponse>>& future)
{
if (future.isDiscarded()) {
// We use the boolean flag 'terminating' to distinguish between
@@ -353,11 +353,11 @@ private:
const bool autoInitialize;
const Duration timeout;
- set<Future<RecoverResponse> > responses;
+ set<Future<RecoverResponse>> responses;
hashmap<Metadata::Status, size_t> responsesReceived;
Option<uint64_t> lowestBeginPosition;
Option<uint64_t> highestEndPosition;
- Future<Option<RecoverResponse> > chain;
+ Future<Option<RecoverResponse>> chain;
bool terminating;
process::Promise<RecoverResponse> promise;
@@ -443,7 +443,7 @@ public:
network(_network),
autoInitialize(_autoInitialize) {}
- Future<Owned<Replica> > future() { return promise.future(); }
+ Future<Owned<Replica>> future() { return promise.future(); }
protected:
virtual void initialize()
@@ -620,11 +620,11 @@ private:
Future<Nothing> chain;
- process::Promise<Owned<Replica> > promise;
+ process::Promise<Owned<Replica>> promise;
};
-Future<Owned<Replica> > recover(
+Future<Owned<Replica>> recover(
size_t quorum,
const Owned<Replica>& replica,
const Shared<Network>& network,
@@ -637,7 +637,7 @@ Future<Owned<Replica> > recover(
network,
autoInitialize);
- Future<Owned<Replica> > future = process->future();
+ Future<Owned<Replica>> future = process->future();
spawn(process, true);
return future;
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/recover.hpp
----------------------------------------------------------------------
diff --git a/src/log/recover.hpp b/src/log/recover.hpp
index 97793b6..94d6bb2 100644
--- a/src/log/recover.hpp
+++ b/src/log/recover.hpp
@@ -49,7 +49,7 @@ namespace log {
// an empty replica will be allowed to vote if ALL replicas (i.e.,
// quorum * 2 - 1) are empty. This allows us to bootstrap the
// replicated log without explicitly using an initialization tool.
-extern process::Future<process::Owned<Replica> > recover(
+extern process::Future<process::Owned<Replica>> recover(
size_t quorum,
const process::Owned<Replica>& replica,
const process::Shared<Network>& network,
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/log/tool/benchmark.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/benchmark.cpp b/src/log/tool/benchmark.cpp
index da35b08..8264fda 100644
--- a/src/log/tool/benchmark.cpp
+++ b/src/log/tool/benchmark.cpp
@@ -177,7 +177,7 @@ Try<Nothing> Benchmark::execute(int argc, char** argv)
// Create the log writer.
Log::Writer writer(&log);
- Future<Option<Log::Position> > position = writer.start();
+ Future<Option<Log::Position>> position = writer.start();
if (!position.await(Seconds(15))) {
return Error("Failed to start a log writer: timed out");
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/master/registrar.cpp
----------------------------------------------------------------------
diff --git a/src/master/registrar.cpp b/src/master/registrar.cpp
index 4d1eaa0..7aa0148 100644
--- a/src/master/registrar.cpp
+++ b/src/master/registrar.cpp
@@ -197,15 +197,15 @@ private:
// Continuations.
void _recover(
const MasterInfo& info,
- const Future<Variable<Registry> >& recovery);
+ const Future<Variable<Registry>>& recovery);
void __recover(const Future<bool>& recover);
Future<bool> _apply(Owned<Operation> operation);
// Helper for updating state (performing store).
void update();
void _update(
- const Future<Option<Variable<Registry> > >& store,
- deque<Owned<Operation> > operations);
+ const Future<Option<Variable<Registry>>>& store,
+ deque<Owned<Operation>> operations);
// Fails all pending operations and transitions the Registrar
// into an error state in which all subsequent operations will fail.
@@ -213,15 +213,15 @@ private:
// performing more State storage operations.
void abort(const string& message);
- Option<Variable<Registry> > variable;
- deque<Owned<Operation> > operations;
+ Option<Variable<Registry>> variable;
+ deque<Owned<Operation>> operations;
bool updating; // Used to signify fetching (recovering) or storing.
const Flags flags;
State* state;
// Used to compose our operations with recovery.
- Option<Owned<Promise<Registry> > > recovered;
+ Option<Owned<Promise<Registry>>> recovered;
// When an error is encountered from abort(), we'll fail all
// subsequent operations.
@@ -335,13 +335,13 @@ Future<Registry> RegistrarProcess::recover(const MasterInfo& info)
state->fetch<Registry>("registry")
.after(flags.registry_fetch_timeout,
lambda::bind(
- &timeout<Variable<Registry> >,
+ &timeout<Variable<Registry>>,
"fetch",
flags.registry_fetch_timeout,
lambda::_1))
.onAny(defer(self(), &Self::_recover, info, lambda::_1));
updating = true;
- recovered = Owned<Promise<Registry> >(new Promise<Registry>());
+ recovered = Owned<Promise<Registry>>(new Promise<Registry>());
}
return recovered.get()->future();
@@ -350,7 +350,7 @@ Future<Registry> RegistrarProcess::recover(const MasterInfo& info)
void RegistrarProcess::_recover(
const MasterInfo& info,
- const Future<Variable<Registry> >& recovery)
+ const Future<Variable<Registry>>& recovery)
{
updating = false;
@@ -469,7 +469,7 @@ void RegistrarProcess::update()
state->store(variable.get().mutate(registry))
.after(flags.registry_store_timeout,
lambda::bind(
- &timeout<Option<Variable<Registry> > >,
+ &timeout<Option<Variable<Registry>>>,
"store",
flags.registry_store_timeout,
lambda::_1))
@@ -481,8 +481,8 @@ void RegistrarProcess::update()
void RegistrarProcess::_update(
- const Future<Option<Variable<Registry> > >& store,
- deque<Owned<Operation> > applied)
+ const Future<Option<Variable<Registry>>>& store,
+ deque<Owned<Operation>> applied)
{
updating = false;
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/slave/gc.cpp
----------------------------------------------------------------------
diff --git a/src/slave/gc.cpp b/src/slave/gc.cpp
index a0af68b..961f547 100644
--- a/src/slave/gc.cpp
+++ b/src/slave/gc.cpp
@@ -60,7 +60,7 @@ Future<Nothing> GarbageCollectorProcess::schedule(
CHECK(unschedule(path));
}
- Owned<Promise<Nothing> > promise(new Promise<Nothing>());
+ Owned<Promise<Nothing>> promise(new Promise<Nothing>());
Timeout removalTime = Timeout::in(d);
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/slave/gc.hpp
----------------------------------------------------------------------
diff --git a/src/slave/gc.hpp b/src/slave/gc.hpp
index 9a09e7b..5ea8245 100644
--- a/src/slave/gc.hpp
+++ b/src/slave/gc.hpp
@@ -108,7 +108,7 @@ private:
struct PathInfo
{
PathInfo(const std::string& _path,
- process::Owned<process::Promise<Nothing> > _promise)
+ process::Owned<process::Promise<Nothing>> _promise)
: path(_path), promise(_promise) {}
bool operator==(const PathInfo& that) const
@@ -117,7 +117,7 @@ private:
}
const std::string path;
- const process::Owned<process::Promise<Nothing> > promise;
+ const process::Owned<process::Promise<Nothing>> promise;
};
// Store all the timeouts and corresponding paths to delete.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/slave/state.cpp
----------------------------------------------------------------------
diff --git a/src/slave/state.cpp b/src/slave/state.cpp
index 91dee11..a94bb8d 100644
--- a/src/slave/state.cpp
+++ b/src/slave/state.cpp
@@ -165,7 +165,7 @@ Try<SlaveState> SlaveState::recover(
state.info = slaveInfo.get();
// Find the frameworks.
- Try<list<string> > frameworks = paths::getFrameworkPaths(rootDir, slaveId);
+ Try<list<string>> frameworks = paths::getFrameworkPaths(rootDir, slaveId);
if (frameworks.isError()) {
return Error("Failed to find frameworks for agent " + slaveId.value() +
@@ -272,7 +272,7 @@ Try<FrameworkState> FrameworkState::recover(
state.pid = process::UPID(pid.get());
// Find the executors.
- Try<list<string> > executors =
+ Try<list<string>> executors =
paths::getExecutorPaths(rootDir, slaveId, frameworkId);
if (executors.isError()) {
@@ -314,7 +314,7 @@ Try<ExecutorState> ExecutorState::recover(
string message;
// Find the runs.
- Try<list<string> > runs = paths::getExecutorRunPaths(
+ Try<list<string>> runs = paths::getExecutorRunPaths(
rootDir,
slaveId,
frameworkId,
@@ -431,7 +431,7 @@ Try<RunState> RunState::recover(
state.completed = os::exists(path);
// Find the tasks.
- Try<list<string> > tasks = paths::getTaskPaths(
+ Try<list<string>> tasks = paths::getTaskPaths(
rootDir,
slaveId,
frameworkId,
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/slave/status_update_manager.cpp
----------------------------------------------------------------------
diff --git a/src/slave/status_update_manager.cpp b/src/slave/status_update_manager.cpp
index 9c67b85..056a684 100644
--- a/src/slave/status_update_manager.cpp
+++ b/src/slave/status_update_manager.cpp
@@ -144,7 +144,7 @@ private:
function<void(StatusUpdate)> forward_;
- hashmap<FrameworkID, hashmap<TaskID, StatusUpdateStream*> > streams;
+ hashmap<FrameworkID, hashmap<TaskID, StatusUpdateStream*>> streams;
};
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/allocator.hpp
----------------------------------------------------------------------
diff --git a/src/tests/allocator.hpp b/src/tests/allocator.hpp
index c4d835a..5ca3057 100644
--- a/src/tests/allocator.hpp
+++ b/src/tests/allocator.hpp
@@ -411,7 +411,7 @@ public:
const SlaveID&));
MOCK_METHOD1(updateWhitelist, void(
- const Option<hashset<std::string> >&));
+ const Option<hashset<std::string>>&));
MOCK_METHOD2(requestResources, void(
const FrameworkID&,
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer.cpp b/src/tests/containerizer.cpp
index 105ca9c..6f3950d 100644
--- a/src/tests/containerizer.cpp
+++ b/src/tests/containerizer.cpp
@@ -272,7 +272,7 @@ void TestContainerizer::_destroy(const ContainerID& containerId)
}
-Future<hashset<ContainerID> > TestContainerizer::containers()
+Future<hashset<ContainerID>> TestContainerizer::containers()
{
return promises.keys();
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer.hpp b/src/tests/containerizer.hpp
index ded331b..76feedf 100644
--- a/src/tests/containerizer.hpp
+++ b/src/tests/containerizer.hpp
@@ -144,10 +144,10 @@ private:
hashmap<ExecutorID, std::shared_ptr<MockV1HTTPExecutor>> v1Executors;
hashmap<std::pair<FrameworkID, ExecutorID>, ContainerID> containers_;
- hashmap<ContainerID, process::Owned<MesosExecutorDriver> > drivers;
- hashmap<ContainerID, process::Owned<executor::TestV1Mesos> > v1Libraries;
+ hashmap<ContainerID, process::Owned<MesosExecutorDriver>> drivers;
+ hashmap<ContainerID, process::Owned<executor::TestV1Mesos>> v1Libraries;
hashmap<ContainerID,
- process::Owned<process::Promise<containerizer::Termination> > > promises;
+ process::Owned<process::Promise<containerizer::Termination>>> promises;
};
} // namespace tests {
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/containerizer/composing_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/composing_containerizer_tests.cpp b/src/tests/containerizer/composing_containerizer_tests.cpp
index e7e3b62..e7619c1 100644
--- a/src/tests/containerizer/composing_containerizer_tests.cpp
+++ b/src/tests/containerizer/composing_containerizer_tests.cpp
@@ -101,7 +101,7 @@ public:
MOCK_METHOD0(
containers,
- process::Future<hashset<ContainerID> >());
+ process::Future<hashset<ContainerID>>());
};
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/containerizer/docker_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/docker_containerizer_tests.cpp b/src/tests/containerizer/docker_containerizer_tests.cpp
index 4e5b1fd..66adeec 100644
--- a/src/tests/containerizer/docker_containerizer_tests.cpp
+++ b/src/tests/containerizer/docker_containerizer_tests.cpp
@@ -207,7 +207,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Launch_Executor)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -334,7 +334,7 @@ TEST_F(DockerContainerizerTest, DISABLED_ROOT_DOCKER_Launch_Executor_Bridged)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -453,7 +453,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Launch)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -603,7 +603,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Kill)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -728,7 +728,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_TaskKillingCapability)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -850,7 +850,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Usage)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -995,7 +995,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Update)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1970,7 +1970,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Logs)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2108,7 +2108,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Default_CMD)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2241,7 +2241,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Default_CMD_Override)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2377,7 +2377,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_Default_CMD_Args)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2515,7 +2515,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_SlaveRecoveryTaskContainer)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2678,7 +2678,7 @@ TEST_F(DockerContainerizerTest,
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -2853,7 +2853,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_NC_PortMapping)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3000,7 +3000,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_LaunchSandboxWithColon)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3118,7 +3118,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_DestroyWhileFetching)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -3238,7 +3238,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_DestroyWhilePulling)
EXPECT_CALL(sched, registered(&driver, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/containerizer/docker_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/docker_tests.cpp b/src/tests/containerizer/docker_tests.cpp
index 7b73a49..e9a214a 100644
--- a/src/tests/containerizer/docker_tests.cpp
+++ b/src/tests/containerizer/docker_tests.cpp
@@ -102,7 +102,7 @@ TEST_F(DockerTest, ROOT_DOCKER_interface)
false).get();
// Verify that we do not see the container.
- Future<list<Docker::Container> > containers = docker->ps(true, containerName);
+ Future<list<Docker::Container>> containers = docker->ps(true, containerName);
AWAIT_READY(containers);
foreach (const Docker::Container& container, containers.get()) {
EXPECT_NE("/" + containerName, container.name);
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/containerizer/isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/isolator_tests.cpp b/src/tests/containerizer/isolator_tests.cpp
index 827c9f0..4f047ae 100644
--- a/src/tests/containerizer/isolator_tests.cpp
+++ b/src/tests/containerizer/isolator_tests.cpp
@@ -281,7 +281,7 @@ TYPED_TEST(CpuIsolatorTest, UserCpuUsage)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Wait for the command to start.
while (!os::exists(file));
@@ -394,7 +394,7 @@ TYPED_TEST(CpuIsolatorTest, SystemCpuUsage)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Wait for the command to start.
while (!os::exists(file));
@@ -677,7 +677,7 @@ TEST_F(LimitedCpuIsolatorTest, ROOT_CGROUPS_CFS_Enable_Cfs)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Wait for the command to complete.
AWAIT_READY(status);
@@ -782,7 +782,7 @@ TEST_F(LimitedCpuIsolatorTest, ROOT_CGROUPS_CFS_Big_Quota)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Wait for the command to complete successfully.
AWAIT_READY(status);
@@ -1341,7 +1341,7 @@ TEST_F(SharedFilesystemIsolatorTest, DISABLED_ROOT_RelativeVolume)
containerConfig.mutable_executor_info()->CopyFrom(executorInfo);
containerConfig.set_directory(flags.work_dir);
- Future<Option<ContainerLaunchInfo> > prepare =
+ Future<Option<ContainerLaunchInfo>> prepare =
isolator->prepare(
containerId,
containerConfig);
@@ -1377,7 +1377,7 @@ TEST_F(SharedFilesystemIsolatorTest, DISABLED_ROOT_RelativeVolume)
ASSERT_SOME(pid);
// Set up the reaper to wait on the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
AWAIT_READY(status);
EXPECT_SOME_EQ(0, status.get());
@@ -1447,7 +1447,7 @@ TEST_F(SharedFilesystemIsolatorTest, DISABLED_ROOT_AbsoluteVolume)
containerConfig.mutable_executor_info()->CopyFrom(executorInfo);
containerConfig.set_directory(flags.work_dir);
- Future<Option<ContainerLaunchInfo> > prepare =
+ Future<Option<ContainerLaunchInfo>> prepare =
isolator->prepare(
containerId,
containerConfig);
@@ -1483,7 +1483,7 @@ TEST_F(SharedFilesystemIsolatorTest, DISABLED_ROOT_AbsoluteVolume)
ASSERT_SOME(pid);
// Set up the reaper to wait on the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
AWAIT_READY(status);
EXPECT_SOME_EQ(0, status.get());
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/containerizer/launcher.hpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/launcher.hpp b/src/tests/containerizer/launcher.hpp
index 49f8ecb..7e5c243 100644
--- a/src/tests/containerizer/launcher.hpp
+++ b/src/tests/containerizer/launcher.hpp
@@ -66,7 +66,7 @@ public:
const process::Subprocess::IO& out,
const process::Subprocess::IO& err,
const Option<flags::FlagsBase>& flags,
- const Option<std::map<std::string, std::string> >& env,
+ const Option<std::map<std::string, std::string>>& env,
const Option<int>& namespaces,
std::vector<process::Subprocess::Hook> parentHooks));
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/containerizer/port_mapping_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/port_mapping_tests.cpp b/src/tests/containerizer/port_mapping_tests.cpp
index dddcb63..fd181ca 100644
--- a/src/tests/containerizer/port_mapping_tests.cpp
+++ b/src/tests/containerizer/port_mapping_tests.cpp
@@ -155,7 +155,7 @@ static void cleanup(const string& eth0, const string& lo)
}
// Clean up all 'veth' devices if exist.
- Try<set<string> > links = net::links();
+ Try<set<string>> links = net::links();
ASSERT_SOME(links);
foreach (const string& name, links.get()) {
@@ -165,7 +165,7 @@ static void cleanup(const string& eth0, const string& lo)
}
if (os::exists(slave::PORT_MAPPING_BIND_MOUNT_ROOT())) {
- Try<list<string> > entries = os::ls(slave::PORT_MAPPING_BIND_MOUNT_ROOT());
+ Try<list<string>> entries = os::ls(slave::PORT_MAPPING_BIND_MOUNT_ROOT());
ASSERT_SOME(entries);
foreach (const string& file, entries.get()) {
@@ -382,7 +382,7 @@ protected:
CHECK_SOME(s);
- Future<Option<int> > status = s.get().status();
+ Future<Option<int>> status = s.get().status();
AWAIT_EXPECT_READY(status);
EXPECT_SOME_EQ(0, status.get());
@@ -505,7 +505,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerTCP)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status1 = process::reap(pid.get());
+ Future<Option<int>> status1 = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -569,7 +569,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerTCP)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status2 = process::reap(pid.get());
+ Future<Option<int>> status2 = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -668,7 +668,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerUDP)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status1 = process::reap(pid.get());
+ Future<Option<int>> status1 = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -734,7 +734,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_ContainerToContainerUDP)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status2 = process::reap(pid.get());
+ Future<Option<int>> status2 = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -834,7 +834,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_HostToContainerUDP)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -952,7 +952,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_HostToContainerTCP)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -1071,7 +1071,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerICMPExternal)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -1152,7 +1152,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerICMPInternal)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -1249,7 +1249,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_ContainerARPExternal)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -1344,7 +1344,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_DNS)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status = process::reap(pid.get());
+ Future<Option<int>> status = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -1429,7 +1429,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_TooManyContainers)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > status1 = process::reap(pid.get());
+ Future<Option<int>> status1 = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -1561,7 +1561,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_SmallEgressLimit)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > reap = process::reap(pid.get());
+ Future<Option<int>> reap = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -1595,7 +1595,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_SmallEgressLimit)
ASSERT_GT(time.get(), (size.bytes() / rate.bytes()));
// Make sure the nc server exits normally.
- Future<Option<int> > status = s.get().status();
+ Future<Option<int>> status = s.get().status();
AWAIT_READY(status);
EXPECT_SOME_EQ(0, status.get());
@@ -1725,7 +1725,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_PortMappingStatistics)
ASSERT_SOME(pid);
// Reap the forked child.
- Future<Option<int> > reap = process::reap(pid.get());
+ Future<Option<int>> reap = process::reap(pid.get());
// Continue in the parent.
::close(pipes[0]);
@@ -1791,7 +1791,7 @@ TEST_F(PortMappingIsolatorTest, ROOT_NC_PortMappingStatistics)
ASSERT_TRUE(waitForFileCreation(container1Ready));
// Make sure the nc server exits normally.
- Future<Option<int> > status = s.get().status();
+ Future<Option<int>> status = s.get().status();
AWAIT_READY(status);
EXPECT_SOME_EQ(0, status.get());
@@ -1893,7 +1893,7 @@ TEST_F(PortMappingMesosTest, CGROUPS_ROOT_RecoverMixedContainers)
// NOTE: We set filter explicitly here so that the resources will
// not be filtered for 5 seconds (the default).
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers1))
.WillRepeatedly(DeclineOffers(filters)); // Ignore subsequent offers.
@@ -1928,7 +1928,7 @@ TEST_F(PortMappingMesosTest, CGROUPS_ROOT_RecoverMixedContainers)
Future<SlaveReregisteredMessage> slaveReregisteredMessage1 =
FUTURE_PROTOBUF(SlaveReregisteredMessage(), _, _);
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(DeclineOffers(filters)); // Ignore subsequent offers.
@@ -2052,7 +2052,7 @@ TEST_F(PortMappingMesosTest, CGROUPS_ROOT_CleanUpOrphan)
EXPECT_CALL(sched, registered(_, _, _))
.WillOnce(FutureArg<1>(&frameworkId));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(DeclineOffers()); // Ignore subsequent offers.
@@ -2102,7 +2102,7 @@ TEST_F(PortMappingMesosTest, CGROUPS_ROOT_CleanUpOrphan)
Try<bool> hostLoExistsQdisc = ingress::exists(lo);
EXPECT_SOME_TRUE(hostLoExistsQdisc);
- Result<vector<ip::Classifier> > classifiers =
+ Result<vector<ip::Classifier>> classifiers =
ip::classifiers(eth0, ingress::HANDLE);
EXPECT_SOME(classifiers);
@@ -2113,14 +2113,14 @@ TEST_F(PortMappingMesosTest, CGROUPS_ROOT_CleanUpOrphan)
EXPECT_EQ(0u, classifiers.get().size());
// Expect no 'veth' devices.
- Try<set<string> > links = net::links();
+ Try<set<string>> links = net::links();
ASSERT_SOME(links);
foreach (const string& name, links.get()) {
EXPECT_FALSE(strings::startsWith(name, slave::PORT_MAPPING_VETH_PREFIX()));
}
// Expect no files in bind mount directory.
- Try<list<string> > files = os::ls(slave::PORT_MAPPING_BIND_MOUNT_ROOT());
+ Try<list<string>> files = os::ls(slave::PORT_MAPPING_BIND_MOUNT_ROOT());
ASSERT_SOME(files);
EXPECT_EQ(0u, files.get().size());
@@ -2158,7 +2158,7 @@ TEST_F(PortMappingMesosTest, ROOT_NetworkNamespaceHandleSymlink)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(DeclineOffers()); // Ignore subsequent offers.
@@ -2247,7 +2247,7 @@ TEST_F(PortMappingMesosTest, CGROUPS_ROOT_RecoverMixedKnownAndUnKnownOrphans)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(DeclineOffers()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/disk_quota_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/disk_quota_tests.cpp b/src/tests/disk_quota_tests.cpp
index f379a6e..e7cf66f 100644
--- a/src/tests/disk_quota_tests.cpp
+++ b/src/tests/disk_quota_tests.cpp
@@ -376,7 +376,7 @@ TEST_F(DiskQuotaTest, NoQuotaEnforcement)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -473,7 +473,7 @@ TEST_F(DiskQuotaTest, ResourceStatistics)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -570,7 +570,7 @@ TEST_F(DiskQuotaTest, SlaveRecovery)
EXPECT_CALL(sched, registered(_, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(_, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/environment.cpp
----------------------------------------------------------------------
diff --git a/src/tests/environment.cpp b/src/tests/environment.cpp
index 6960c2a..7f144f1 100644
--- a/src/tests/environment.cpp
+++ b/src/tests/environment.cpp
@@ -172,7 +172,7 @@ public:
CgroupsFilter()
{
#ifdef __linux__
- Try<set<string> > hierarchies = cgroups::hierarchies();
+ Try<set<string>> hierarchies = cgroups::hierarchies();
if (hierarchies.isError()) {
std::cerr
<< "-------------------------------------------------------------\n"
@@ -678,7 +678,7 @@ private:
// Return list of disabled tests based on test name based filters.
static vector<string> disabled(
const ::testing::UnitTest* unitTest,
- const vector<Owned<TestFilter> >& filters)
+ const vector<Owned<TestFilter>>& filters)
{
vector<string> disabled;
@@ -739,7 +739,7 @@ Environment::Environment(const Flags& _flags) : flags(_flags)
disabled += ":";
}
- vector<Owned<TestFilter> > filters;
+ vector<Owned<TestFilter>> filters;
filters.push_back(Owned<TestFilter>(new AufsFilter()));
filters.push_back(Owned<TestFilter>(new BenchmarkFilter()));
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/exception_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/exception_tests.cpp b/src/tests/exception_tests.cpp
index a9b1c23..7b66bd1 100644
--- a/src/tests/exception_tests.cpp
+++ b/src/tests/exception_tests.cpp
@@ -151,7 +151,7 @@ TEST_F(ExceptionTest, DisallowSchedulerCallbacksOnAbort)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return());
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/health_check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/health_check_tests.cpp b/src/tests/health_check_tests.cpp
index 47c35d1..3b44d80 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -188,7 +188,7 @@ TEST_F(HealthCheckTest, HealthyTask)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -328,7 +328,7 @@ TEST_F(HealthCheckTest, ROOT_HealthyTaskWithContainerImage)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -561,7 +561,7 @@ TEST_F(HealthCheckTest, HealthyTaskNonShell)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -629,7 +629,7 @@ TEST_F(HealthCheckTest, HealthStatusChange)
EXPECT_CALL(sched, registered(&driver, _, _));
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -984,7 +984,7 @@ TEST_F(HealthCheckTest, ConsecutiveFailures)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1074,7 +1074,7 @@ TEST_F(HealthCheckTest, EnvironmentSetup)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -1141,7 +1141,7 @@ TEST_F(HealthCheckTest, DISABLED_GracePeriod)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/master_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_allocator_tests.cpp b/src/tests/master_allocator_tests.cpp
index 32e3a46..7eed672 100644
--- a/src/tests/master_allocator_tests.cpp
+++ b/src/tests/master_allocator_tests.cpp
@@ -748,7 +748,7 @@ TYPED_TEST(MasterAllocatorTest, SlaveLost)
// Eventually after slave2 is launched, we should get
// an offer that contains all of slave2's resources
// and none of slave1's resources.
- Future<vector<Offer> > resourceOffers;
+ Future<vector<Offer>> resourceOffers;
EXPECT_CALL(sched, resourceOffers(_, OfferEq(3, 256)))
.WillOnce(FutureArg<1>(&resourceOffers));
http://git-wip-us.apache.org/repos/asf/mesos/blob/bea8c3c9/src/tests/master_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp
index 16f1ab4..92bd2a9 100644
--- a/src/tests/master_authorization_tests.cpp
+++ b/src/tests/master_authorization_tests.cpp
@@ -125,7 +125,7 @@ TEST_F(MasterAuthorizationTest, AuthorizedTask)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -199,7 +199,7 @@ TEST_F(MasterAuthorizationTest, UnauthorizedTask)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -254,7 +254,7 @@ TEST_F(MasterAuthorizationTest, KillTask)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -326,7 +326,7 @@ TEST_F(MasterAuthorizationTest, SlaveRemoved)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -418,7 +418,7 @@ TEST_F(MasterAuthorizationTest, SlaveDisconnected)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -514,7 +514,7 @@ TEST_F(MasterAuthorizationTest, FrameworkRemoved)
EXPECT_CALL(sched, registered(&driver, _, _))
.Times(1);
- Future<vector<Offer> > offers;
+ Future<vector<Offer>> offers;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers))
.WillRepeatedly(Return()); // Ignore subsequent offers.
@@ -580,7 +580,7 @@ TEST_F(MasterAuthorizationTest, PendingExecutorInfoDiffersOnDifferentSlaves)
AWAIT_READY(registered);
- Future<vector<Offer> > offers1;
+ Future<vector<Offer>> offers1;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers1));
@@ -616,7 +616,7 @@ TEST_F(MasterAuthorizationTest, PendingExecutorInfoDiffersOnDifferentSlaves)
// Wait until authorization is in progress.
AWAIT_READY(authorize);
- Future<vector<Offer> > offers2;
+ Future<vector<Offer>> offers2;
EXPECT_CALL(sched, resourceOffers(&driver, _))
.WillOnce(FutureArg<1>(&offers2))
.WillRepeatedly(Return()); // Ignore subsequent offers.