cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [08/15] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Date Mon, 23 May 2016 15:01:31 GMT
Merge branch 'cassandra-2.1' into cassandra-2.2


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

Branch: refs/heads/cassandra-3.0
Commit: e0c6a9eca074f1be00ef60131f4db40cc4ea5307
Parents: 2837ec6 129b119
Author: Yuki Morishita <yukim@apache.org>
Authored: Mon May 23 09:52:45 2016 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Mon May 23 09:52:45 2016 -0500

----------------------------------------------------------------------
 CHANGES.txt                                      |  1 +
 .../cassandra/tools/nodetool/NetStats.java       | 19 +++++++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c6a9ec/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 103d057,7a0ccba..795e823
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,24 -1,9 +1,25 @@@
 -2.1.15
 +2.2.7
 + * Fix commit log replay after out-of-order flush completion (CASSANDRA-9669)
 + * Add seconds to cqlsh tracing session duration (CASSANDRA-11753)
 + * Prohibit Reverse Counter type as part of the PK (CASSANDRA-9395)
 + * cqlsh: correctly handle non-ascii chars in error messages (CASSANDRA-11626)
 + * Exit JVM if JMX server fails to startup (CASSANDRA-11540)
 + * Produce a heap dump when exiting on OOM (CASSANDRA-9861)
 + * Avoid read repairing purgeable tombstones on range slices (CASSANDRA-11427)
 + * Restore ability to filter on clustering columns when using a 2i (CASSANDRA-11510)
 + * JSON datetime formatting needs timezone (CASSANDRA-11137)
 + * Fix is_dense recalculation for Thrift-updated tables (CASSANDRA-11502)
 + * Remove unnescessary file existence check during anticompaction (CASSANDRA-11660)
 + * Add missing files to debian packages (CASSANDRA-11642)
 + * Avoid calling Iterables::concat in loops during ModificationStatement::getFunctions (CASSANDRA-11621)
 + * cqlsh: COPY FROM should use regular inserts for single statement batches and
 +   report errors correctly if workers processes crash on initialization (CASSANDRA-11474)
 + * Always close cluster with connection in CqlRecordWriter (CASSANDRA-11553)
 + * Fix slice queries on ordered COMPACT tables (CASSANDRA-10988)
 +Merged from 2.1:
+  * Add message dropped tasks to nodetool netstats (CASSANDRA-11855)
   * Don't compute expensive MaxPurgeableTimestamp until we've verified there's an 
     expired tombstone (CASSANDRA-11834)
 - * Fix paging on DISTINCT queries repeats result when first row in partition changes 
 -   (CASSANDRA-11679)
   * Add option to disable use of severity in DynamicEndpointSnitch (CASSANDRA-11737)
   * cqlsh COPY FROM fails for null values with non-prepared statements (CASSANDRA-11631)
   * Make cython optional in pylib/setup.py (CASSANDRA-11630)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c6a9ec/src/java/org/apache/cassandra/tools/nodetool/NetStats.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/tools/nodetool/NetStats.java
index 3e06ca0,0000000..5b84dff
mode 100644,000000..100644
--- a/src/java/org/apache/cassandra/tools/nodetool/NetStats.java
+++ b/src/java/org/apache/cassandra/tools/nodetool/NetStats.java
@@@ -1,123 -1,0 +1,134 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.tools.nodetool;
 +
 +import io.airlift.command.Command;
 +import io.airlift.command.Option;
 +
 +import java.util.Set;
 +
 +import org.apache.cassandra.io.util.FileUtils;
 +import org.apache.cassandra.net.MessagingServiceMBean;
 +import org.apache.cassandra.streaming.ProgressInfo;
 +import org.apache.cassandra.streaming.SessionInfo;
 +import org.apache.cassandra.streaming.StreamState;
 +import org.apache.cassandra.tools.NodeProbe;
 +import org.apache.cassandra.tools.NodeTool.NodeToolCmd;
 +
 +@Command(name = "netstats", description = "Print network information on provided host (connecting
node by default)")
 +public class NetStats extends NodeToolCmd
 +{
 +    @Option(title = "human_readable",
 +            name = {"-H", "--human-readable"},
 +            description = "Display bytes in human readable form, i.e. KB, MB, GB, TB")
 +    private boolean humanReadable = false;
 +
 +    @Override
 +    public void execute(NodeProbe probe)
 +    {
 +        System.out.printf("Mode: %s%n", probe.getOperationMode());
 +        Set<StreamState> statuses = probe.getStreamStatus();
 +        if (statuses.isEmpty())
 +            System.out.println("Not sending any streams.");
 +        for (StreamState status : statuses)
 +        {
 +            System.out.printf("%s %s%n", status.description, status.planId.toString());
 +            for (SessionInfo info : status.sessions)
 +            {
 +                System.out.printf("    %s", info.peer.toString());
 +                // print private IP when it is used
 +                if (!info.peer.equals(info.connecting))
 +                {
 +                    System.out.printf(" (using %s)", info.connecting.toString());
 +                }
 +                System.out.printf("%n");
 +                if (!info.receivingSummaries.isEmpty())
 +                {
 +                    if (humanReadable)
 +                        System.out.printf("        Receiving %d files, %s total. Already
received %d files, %s total%n", info.getTotalFilesToReceive(), FileUtils.stringifyFileSize(info.getTotalSizeToReceive()),
info.getTotalFilesReceived(), FileUtils.stringifyFileSize(info.getTotalSizeReceived()));
 +                    else
 +                        System.out.printf("        Receiving %d files, %d bytes total. Already
received %d files, %d bytes total%n", info.getTotalFilesToReceive(), info.getTotalSizeToReceive(),
info.getTotalFilesReceived(), info.getTotalSizeReceived());
 +                    for (ProgressInfo progress : info.getReceivingFiles())
 +                    {
 +                        System.out.printf("            %s%n", progress.toString());
 +                    }
 +                }
 +                if (!info.sendingSummaries.isEmpty())
 +                {
 +                    if (humanReadable)
 +                        System.out.printf("        Sending %d files, %s total. Already sent
%d files, %s total%n", info.getTotalFilesToSend(), FileUtils.stringifyFileSize(info.getTotalSizeToSend()),
info.getTotalFilesSent(), FileUtils.stringifyFileSize(info.getTotalSizeSent()));
 +                    else
 +                        System.out.printf("        Sending %d files, %d bytes total. Already
sent %d files, %d bytes total%n", info.getTotalFilesToSend(), info.getTotalSizeToSend(), info.getTotalFilesSent(),
info.getTotalSizeSent());
 +                    for (ProgressInfo progress : info.getSendingFiles())
 +                    {
 +                        System.out.printf("            %s%n", progress.toString());
 +                    }
 +                }
 +            }
 +        }
 +
 +        if (!probe.isStarting())
 +        {
 +            System.out.printf("Read Repair Statistics:%nAttempted: %d%nMismatch (Blocking):
%d%nMismatch (Background): %d%n", probe.getReadRepairAttempted(), probe.getReadRepairRepairedBlocking(),
probe.getReadRepairRepairedBackground());
 +
 +            MessagingServiceMBean ms = probe.msProxy;
 +            System.out.printf("%-25s", "Pool Name");
 +            System.out.printf("%10s", "Active");
 +            System.out.printf("%10s", "Pending");
-             System.out.printf("%15s%n", "Completed");
++            System.out.printf("%15s", "Completed");
++            System.out.printf("%10s%n", "Dropped");
 +
 +            int pending;
 +            long completed;
++            long dropped;
 +
 +            pending = 0;
 +            for (int n : ms.getLargeMessagePendingTasks().values())
 +                pending += n;
 +            completed = 0;
 +            for (long n : ms.getLargeMessageCompletedTasks().values())
 +                completed += n;
-             System.out.printf("%-25s%10s%10s%15s%n", "Large messages", "n/a", pending, completed);
++            dropped = 0;
++            for (long n : ms.getLargeMessageDroppedTasks().values())
++                dropped += n;
++            System.out.printf("%-25s%10s%10s%15s%10s%n", "Large messages", "n/a", pending,
completed, dropped);
 +
 +            pending = 0;
 +            for (int n : ms.getSmallMessagePendingTasks().values())
 +                pending += n;
 +            completed = 0;
 +            for (long n : ms.getSmallMessageCompletedTasks().values())
 +                completed += n;
-             System.out.printf("%-25s%10s%10s%15s%n", "Small messages", "n/a", pending, completed);
++            dropped = 0;
++            for (long n : ms.getSmallMessageDroppedTasks().values())
++                dropped += n;
++            System.out.printf("%-25s%10s%10s%15s%10s%n", "Small messages", "n/a", pending,
completed, dropped);
 +
 +            pending = 0;
 +            for (int n : ms.getGossipMessagePendingTasks().values())
 +                pending += n;
 +            completed = 0;
 +            for (long n : ms.getGossipMessageCompletedTasks().values())
 +                completed += n;
-             System.out.printf("%-25s%10s%10s%15s%n", "Gossip messages", "n/a", pending,
completed);
++            dropped = 0;
++            for (long n : ms.getGossipMessageDroppedTasks().values())
++                dropped += n;
++            System.out.printf("%-25s%10s%10s%15s%10s%n", "Gossip messages", "n/a", pending,
completed, dropped);
 +        }
 +    }
 +}


Mime
View raw message