cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject git commit: cli: Warn about missing CQL3 tables in schema descriptions
Date Tue, 05 Mar 2013 03:22:35 GMT
Updated Branches:
  refs/heads/cassandra-1.2 6415d6bee -> ccc5971e0


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/cassandra-1.2
Commit: ccc5971e03ffc72766d7f8c02bfef8c5c08a2e32
Parents: 6415d6b
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Tue Mar 5 06:20:54 2013 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
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<KsDef> 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<KsDef> 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)


Mime
View raw message