You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2016/03/22 14:00:40 UTC
ignite git commit: Added ability to dump comm SPI recovery
descriptors (cherry picked from commit f76a313)
Repository: ignite
Updated Branches:
refs/heads/master 046a188b8 -> 61a0a5f8c
Added ability to dump comm SPI recovery descriptors
(cherry picked from commit f76a313)
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/61a0a5f8
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/61a0a5f8
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/61a0a5f8
Branch: refs/heads/master
Commit: 61a0a5f8c0d05001071d40fbaf365fa231ed0e70
Parents: 046a188
Author: Yakov Zhdanov <yz...@gridgain.com>
Authored: Tue Mar 22 15:58:49 2016 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Tue Mar 22 16:00:25 2016 +0300
----------------------------------------------------------------------
.../ignite/internal/util/nio/GridNioServer.java | 13 ++++++++-----
.../spi/communication/tcp/TcpCommunicationSpi.java | 16 ++++++++++++++++
2 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/61a0a5f8/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index 42c7ac7..0d5c5de 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -1455,16 +1455,19 @@ public class GridNioServer<T> {
for (SelectionKey key : keys) {
GridSelectorNioSessionImpl ses = (GridSelectorNioSessionImpl)key.attachment();
- sb.append(" Conn [")
+ sb.append(" Connection info [")
.append("rmtAddr=").append(ses.remoteAddress())
.append(", locAddr=").append(ses.localAddress())
.append(", bytesRcvd=").append(ses.bytesReceived())
.append(", bytesSent=").append(ses.bytesSent());
- if (ses.recoveryDescriptor() != null) {
- sb.append(", msgsSent=").append(ses.recoveryDescriptor().sent())
- .append(", msgsAckedByRmt=").append(ses.recoveryDescriptor().acked())
- .append(", msgsRcvd=").append(ses.recoveryDescriptor().received());
+ GridNioRecoveryDescriptor desc = ses.recoveryDescriptor();
+
+ if (desc != null) {
+ sb.append(", msgsSent=").append(desc.sent())
+ .append(", msgsAckedByRmt=").append(desc.acked())
+ .append(", msgsRcvd=").append(desc.received())
+ .append(", descIdHash=").append(System.identityHashCode(desc));
}
else
sb.append(", recoveryDesc=null");
http://git-wip-us.apache.org/repos/asf/ignite/blob/61a0a5f8/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index b283b82..df60982 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -1381,6 +1381,22 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
/** {@inheritDoc} */
@Override public void dumpStats() {
+ StringBuilder sb = new StringBuilder("Communication SPI recovery descriptors: ").append(U.nl());
+
+ for (Map.Entry<ClientKey, GridNioRecoveryDescriptor> entry : recoveryDescs.entrySet()) {
+ GridNioRecoveryDescriptor desc = entry.getValue();
+
+ sb.append(" [key=").append(entry.getKey())
+ .append(", msgsSent=").append(desc.sent())
+ .append(", msgsAckedByRmt=").append(desc.acked())
+ .append(", msgsRcvd=").append(desc.received())
+ .append(", descIdHash=").append(System.identityHashCode(desc))
+ .append(']').append(U.nl());
+ }
+
+ if (log.isInfoEnabled())
+ log.info(sb.toString());
+
GridNioServer<Message> nioSrvr1 = nioSrvr;
if (nioSrvr1 != null)