Skip to content

Commit

Permalink
fixed verb name to PING when sending PingMessage (facepalm); fixed lo…
Browse files Browse the repository at this point in the history
…gging message when SCCC complete; fixed misspelled word conmpess in OMC
  • Loading branch information
jasobrown committed Feb 16, 2018
1 parent 7e6252e commit 7974a7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Expand Up @@ -32,6 +32,8 @@
import org.apache.cassandra.net.async.OutboundConnectionIdentifier;
import org.apache.cassandra.utils.FBUtilities;

import static org.apache.cassandra.net.MessagingService.Verb.PING;

public class StartupClusterConnectivityChecker
{
private static final Logger logger = LoggerFactory.getLogger(StartupClusterConnectivityChecker.class);
Expand Down Expand Up @@ -113,7 +115,7 @@ State checkStatus(Set<InetAddressAndPort> peers, AtomicInteger connectedCount, f
"and {}% ({} / {}) of peers as connected, " +
"both of which are above the desired threshold of {}%",
TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos),
currentAlivePercent, currentAlive, totalConnectionsSize,
currentAlivePercent, currentAlive, peers.size(),
currentConnectedPercent, connectionsCount, totalConnectionsSize,
targetPercent);
return State.FINISH_SUCCESS;
Expand All @@ -126,7 +128,7 @@ State checkStatus(Set<InetAddressAndPort> peers, AtomicInteger connectedCount, f
"and {}% ({} / {}) of peers as connected, " +
"one or both of which is below the desired threshold of {}%",
TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startNanos),
currentAlivePercent, currentAlive, totalConnectionsSize,
currentAlivePercent, currentAlive, peers.size(),
currentConnectedPercent, connectionsCount, totalConnectionsSize,
targetPercent);
return State.FINISH_TIMEOUT;
Expand All @@ -140,7 +142,7 @@ State checkStatus(Set<InetAddressAndPort> peers, AtomicInteger connectedCount, f
*/
private AtomicInteger sendPingMessages(Set<InetAddressAndPort> peers)
{
AtomicInteger receivedCount = new AtomicInteger(0);
AtomicInteger connectedCount = new AtomicInteger(0);
IAsyncCallback responseHandler = new IAsyncCallback()
{
@Override
Expand All @@ -152,20 +154,18 @@ public boolean isLatencyForSnitch()
@Override
public void response(MessageIn msg)
{
receivedCount.incrementAndGet();
connectedCount.incrementAndGet();
}
};

MessageOut<PingMessage> smallChannelMessageOut = new MessageOut<>(MessagingService.Verb.REQUEST_RESPONSE,
PingMessage.smallChannelMessage, PingMessage.serializer);
MessageOut<PingMessage> largeChannelMessageOut = new MessageOut<>(MessagingService.Verb.REQUEST_RESPONSE,
PingMessage.largeChannelMessage, PingMessage.serializer);
MessageOut<PingMessage> smallChannelMessageOut = new MessageOut<>(PING, PingMessage.smallChannelMessage, PingMessage.serializer);
MessageOut<PingMessage> largeChannelMessageOut = new MessageOut<>(PING, PingMessage.largeChannelMessage, PingMessage.serializer);
for (InetAddressAndPort peer : peers)
{
MessagingService.instance().sendRR(smallChannelMessageOut, peer, responseHandler);
MessagingService.instance().sendRR(largeChannelMessageOut, peer, responseHandler);
}

return receivedCount;
return connectedCount;
}
}
Expand Up @@ -479,7 +479,7 @@ void finishHandshake(HandshakeResult result)
{
case SUCCESS:
assert result.channelWriter != null;
logger.debug("successfully connected to {}, conmpress = {}, coalescing = {}", connectionId,
logger.debug("successfully connected to {}, compress = {}, coalescing = {}", connectionId,
shouldCompressConnection(connectionId.local(), connectionId.remote()),
coalescingStrategy.isPresent() ? coalescingStrategy.get() : CoalescingStrategies.Strategy.DISABLED);
if (state.get() == State.CLOSED)
Expand Down

0 comments on commit 7974a7e

Please sign in to comment.