Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15287

Inaccurate exception message with nodetool snapshot

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 4.0
    • Component/s: Tool/nodetool
    • Labels:
      None
    • Bug Category:
      Code - Bug - Unclear Impact
    • Severity:
      Low
    • Complexity:
      Low Hanging Fruit
    • Discovered By:
      User Report
    • Platform:
      All
    • Impacts:
      None
    • Since Version:
    • Test and Documentation Plan:
      Hide

      Reproduced error message:

       

      bin/cqlsh << EOF
      CREATE KEYSPACE k1 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
      
      CREATE TABLE k1.t2 (
          id uuid PRIMARY KEY,
          val text
      );
      
      CREATE TABLE k1.t1 (
          id uuid PRIMARY KEY,
          val text
      );
      EOF
      
      bin/nodetool snapshot --kt-list k1.t1,k1.t2 --k1
      

       

       

      Before Patch:

       

      error: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamilyerror: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamily
      -- StackTrace --
      java.io.IOException: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamily at org.apache.cassandra.tools.nodetool.Snapshot.execute(Snapshot.java:73) at org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:307) at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:218)
      

       

       

      After Patch:

       

      error: When specifying the Keyspace columfamily list for a snapshot, you should not specify keyspaceerror: When specifying the Keyspace columfamily list for a snapshot, you should not specify keyspace
      -- StackTrace --
      java.io.IOException: When specifying the Keyspace columfamily list for a snapshot, you should not specify keyspace at org.apache.cassandra.tools.nodetool.Snapshot.execute(Snapshot.java:73) at org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:307) at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:218)
      

       

       

      Show
      Reproduced error message:   bin/cqlsh << EOF CREATE KEYSPACE k1 WITH replication = { 'class' : 'SimpleStrategy' , 'replication_factor' : '1' } AND durable_writes = true ; CREATE TABLE k1.t2 ( id uuid PRIMARY KEY, val text ); CREATE TABLE k1.t1 ( id uuid PRIMARY KEY, val text ); EOF bin/nodetool snapshot --kt-list k1.t1,k1.t2 --k1     Before Patch:   error: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamilyerror: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamily -- StackTrace -- java.io.IOException: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamily at org.apache.cassandra.tools.nodetool.Snapshot.execute(Snapshot.java:73) at org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:307) at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:218)     After Patch:   error: When specifying the Keyspace columfamily list for a snapshot, you should not specify keyspaceerror: When specifying the Keyspace columfamily list for a snapshot, you should not specify keyspace -- StackTrace -- java.io.IOException: When specifying the Keyspace columfamily list for a snapshot, you should not specify keyspace at org.apache.cassandra.tools.nodetool.Snapshot.execute(Snapshot.java:73) at org.apache.cassandra.tools.NodeTool$NodeToolCmd.run(NodeTool.java:307) at org.apache.cassandra.tools.NodeTool.main(NodeTool.java:218)    

      Description

      1. Create a keyspace cqlkeyspace (arbitrary name)
      2. Create two tables (t1 and t2)
      3. Run nodetool snapshot to create snapshot for multiple tables in same command. Include the keyspace name as argument (which is not what the command syntax allows)

      nodetool snapshot --kt-list cqlkeyspace.t1,cqlkeyspace.t2 --tag multi-table   --cqlkeyspace
      

      4. Exception message is inaccurate in that it is referring to columnfamily when it should be referring to keyspace.

      java.io.IOException: When specifying the Keyspace columfamily list for a snapshot, you should not specify columnfamily
      

      Exception message should be:

      java.io.IOException: When specifying the Keyspace columfamily list for a snapshot, you should not specify keyspace
      

        Attachments

        1. 15287.trunk.withchanges
          2 kB
          Josh Turner
        2. 15287.trunk
          1 kB
          Josh Turner

          Activity

            People

            • Assignee:
              tdl-jturner Josh Turner
              Reporter:
              dvohra DeepakVohra
              Authors:
              Josh Turner
              Reviewers:
              Jeff Jirsa
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: