cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [1/2] git commit: Fix nodetool netstats
Date Wed, 21 May 2014 06:14:19 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk c89c37802 -> 68ea4895e


Fix nodetool netstats

Patch by marcuse; reviewed by JoshuaMcKenzie for CASSANDRA-7270


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7abd76e4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7abd76e4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7abd76e4

Branch: refs/heads/trunk
Commit: 7abd76e456edc2bf8a98d8c190315154c48e741c
Parents: a42b4e5
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Wed May 21 08:11:58 2014 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Wed May 21 08:11:58 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../streaming/management/SessionInfoCompositeData.java  | 12 ++++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7abd76e4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e7e7c7f..12de385 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -17,6 +17,7 @@
  * Limit user types to the keyspace they are defined in (CASSANDRA-6643)
  * Add validate method to CollectionType (CASSANDRA-7208)
  * New serialization format for UDT values (CASSANDRA-7209)
+ * Fix nodetool netstats (CASSANDRA-7270)
 Merged from 2.0:
  * Always reallocate buffers in HSHA (CASSANDRA-6285)
  * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7abd76e4/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
b/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
index 8618cca..bef6682 100644
--- a/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
+++ b/src/java/org/apache/cassandra/streaming/management/SessionInfoCompositeData.java
@@ -40,14 +40,16 @@ public class SessionInfoCompositeData
                                                             "sendingSummaries",
                                                             "state",
                                                             "receivingFiles",
-                                                            "sendingFiles"};
+                                                            "sendingFiles",
+                                                            "sessionIndex"};
     private static final String[] ITEM_DESCS = new String[]{"Plan ID",
                                                             "Session peer",
                                                             "Summaries of receiving data",
                                                             "Summaries of sending data",
                                                             "Current session state",
                                                             "Receiving files",
-                                                            "Sending files"};
+                                                            "Sending files",
+                                                            "Session index"};
     private static final OpenType<?>[] ITEM_TYPES;
 
     public static final CompositeType COMPOSITE_TYPE;
@@ -60,7 +62,8 @@ public class SessionInfoCompositeData
                                         ArrayType.getArrayType(StreamSummaryCompositeData.COMPOSITE_TYPE),
                                         SimpleType.STRING,
                                         ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE),
-                                        ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE)};
+                                        ArrayType.getArrayType(ProgressInfoCompositeData.COMPOSITE_TYPE),
+                                        SimpleType.INTEGER};
             COMPOSITE_TYPE = new CompositeType(SessionInfo.class.getName(),
                                                "SessionInfo",
                                                ITEM_NAMES,
@@ -97,6 +100,7 @@ public class SessionInfoCompositeData
         };
         valueMap.put(ITEM_NAMES[5], toArrayOfCompositeData(sessionInfo.getReceivingFiles(),
fromProgressInfo));
         valueMap.put(ITEM_NAMES[6], toArrayOfCompositeData(sessionInfo.getSendingFiles(),
fromProgressInfo));
+        valueMap.put(ITEM_NAMES[7], sessionInfo.sessionIndex);
         try
         {
             return new CompositeDataSupport(COMPOSITE_TYPE, valueMap);
@@ -129,7 +133,7 @@ public class SessionInfoCompositeData
             }
         };
         SessionInfo info = new SessionInfo(peer,
-                                           (int)values[2],
+                                           (int)values[7],
                                            fromArrayOfCompositeData((CompositeData[]) values[2],
toStreamSummary),
                                            fromArrayOfCompositeData((CompositeData[]) values[3],
toStreamSummary),
                                            StreamSession.State.valueOf((String) values[4]));


Mime
View raw message