Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B2BAC11137 for ; Thu, 24 Apr 2014 10:15:34 +0000 (UTC) Received: (qmail 38808 invoked by uid 500); 24 Apr 2014 10:15:34 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 37930 invoked by uid 500); 24 Apr 2014 10:15:24 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 37726 invoked by uid 99); 24 Apr 2014 10:15:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2014 10:15:21 +0000 Date: Thu, 24 Apr 2014 10:15:21 +0000 (UTC) From: "Jivko Donev (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-7082) Nodetool status always display only the first token MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jivko Donev created CASSANDRA-7082: -------------------------------------- Summary: Nodetool status always display only the first token Key: CASSANDRA-7082 URL: https://issues.apache.org/jira/browse/CASSANDRA-7082 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jivko Donev Priority: Minor nodetool status command always displays the first token for a node even if using vnodes. The defect is only reproduced on version 2.0.7. With the same configuration 2.0.7 displays: Datacenter: DC1 =============== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Owns (effective) Host ID Token Rack UN 127.0.0.1 156.34 KB 100.0% d6629553-d6e9-434d-bf01-54c257b20ea9 -9134643033027010921 Rack1 But 2.0.6 displays: Datacenter: DC1 =============== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns Host ID UN 127.0.0.1 210.32 KB 256 100.0% 08208ec9-8976-4ad0-b6bb-ee5dcf0109e The problem seems to be in NodeCmd.java the check for vnodes. In the print() method there is a check // More tokens then nodes (aka vnodes)? if (tokensToEndpoints.values().size() < tokensToEndpoints.keySet().size()) isTokenPerNode = false; while in 2.0.6 the same code was: // More tokens then nodes (aka vnodes)? if (new HashSet(tokensToEndpoints.values()).size() < tokensToEndpoints.keySet().size()) isTokenPerNode = false; In 2.0.7 this check is never true as values collection is always equal by size with key set size. -- This message was sent by Atlassian JIRA (v6.2#6252)