MCPcopy Create free account
hub / github.com/apache/mesos / startConnection

Method startConnection

src/zookeeper/group.cpp:142–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141
142void GroupProcess::startConnection()
143{
144 watcher = new ProcessWatcher<GroupProcess>(self());
145 zk = new ZooKeeper(servers, sessionTimeout, watcher);
146 state = CONNECTING;
147
148 // If the connection is not established within the session timeout,
149 // close the ZooKeeper handle and create a new one. This is
150 // important because the ZooKeeper 3.4 client libraries don't try to
151 // re-resolve the list of hostnames, so we create a new ZooKeeper
152 // handle to ensure we observe DNS changes. See MESOS-4546 and
153 // `ZooKeeperProcess::initialize` for more information.
154 CHECK_NONE(connectTimer);
155 connectTimer = delay(zk->getSessionTimeout(),
156 self(),
157 &Self::timedout,
158 zk->getSessionId());
159}
160
161
162Future<Group::Membership> GroupProcess::join(

Callers

nothing calls this directly

Calls 3

delayFunction · 0.50
getSessionTimeoutMethod · 0.45
getSessionIdMethod · 0.45

Tested by

no test coverage detected