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 4D430D135 for ; Tue, 5 Mar 2013 03:24:08 +0000 (UTC) Received: (qmail 3523 invoked by uid 500); 5 Mar 2013 03:24:07 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 3421 invoked by uid 500); 5 Mar 2013 03:24:07 -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 3383 invoked by uid 99); 5 Mar 2013 03:24:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 03:24:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 2BC6B314CB9; Tue, 5 Mar 2013 03:24:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aleksey@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: cli: Warn about missing CQL3 tables in schema descriptions Message-Id: <20130305032406.2BC6B314CB9@tyr.zones.apache.org> Date: Tue, 5 Mar 2013 03:24:06 +0000 (UTC) cli: Warn about missing CQL3 tables in schema descriptions patch by Aleksey Yeschenko; reviewed by Jonathan Ellis for CASSANDRA-5309 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ccc5971e Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ccc5971e Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ccc5971e Branch: refs/heads/trunk Commit: ccc5971e03ffc72766d7f8c02bfef8c5c08a2e32 Parents: 6415d6b Author: Aleksey Yeschenko Authored: Tue Mar 5 06:20:54 2013 +0300 Committer: Aleksey Yeschenko Committed: Tue Mar 5 06:20:54 2013 +0300 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/cli/CliClient.java | 12 ++++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/ccc5971e/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 924eeeb..a135262 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,7 @@ * Add netty to pom dependencies (CASSANDRA-5181) * Include type arguments in Thrift CQLPreparedResult (CASSANDRA-5311) * Fix compaction not removing columns when bf_fp_ratio is 1 (CASSANDRA-5182) + * cli: Warn about missing CQL3 tables in schema descriptions (CASSANDRA-5309) Merged from 1.1: * nodetool: ability to repair specific range (CASSANDRA-5280) * Fix possible assertion triggered in SliceFromReadCommand (CASSANDRA-5284) http://git-wip-us.apache.org/repos/asf/cassandra/blob/ccc5971e/src/java/org/apache/cassandra/cli/CliClient.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/cli/CliClient.java b/src/java/org/apache/cassandra/cli/CliClient.java index 8e297ee..2116234 100644 --- a/src/java/org/apache/cassandra/cli/CliClient.java +++ b/src/java/org/apache/cassandra/cli/CliClient.java @@ -195,6 +195,12 @@ public class CliClient sessionState.out.println(getHelp().banner); } + private void printCQL3TablesWarning(String cmd) + { + sessionState.out.println("\nWARNING: CQL3 tables are intentionally omitted from '" + cmd + "' output."); + sessionState.out.println("See https://issues.apache.org/jira/browse/CASSANDRA-4377 for details.\n"); + } + // Execute a CLI Statement public void executeCLIStatement(String statement) throws CharacterCodingException, TException, TimedOutException, NotFoundException, NoSuchFieldException, InvalidRequestException, UnavailableException, InstantiationException, IllegalAccessException, ClassNotFoundException { @@ -1675,6 +1681,8 @@ public class CliClient if (!CliMain.isConnected()) return; + printCQL3TablesWarning("show keyspaces"); + List keySpaces = thriftClient.describe_keyspaces(); Collections.sort(keySpaces, new KsDefNamesComparator()); @@ -1690,6 +1698,8 @@ public class CliClient if (!CliMain.isConnected()) return; + printCQL3TablesWarning("show schema"); + final List keyspaces = thriftClient.describe_keyspaces(); Collections.sort(keyspaces, new KsDefNamesComparator()); final String keyspaceName = (statement.getChildCount() == 0) @@ -2220,6 +2230,8 @@ public class CliClient if (!CliMain.isConnected()) return; + printCQL3TablesWarning("describe"); + int argCount = statement.getChildCount(); if (keySpace == null && argCount == 0)