Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Fix Version/s: 1.2.3
    • Component/s: None
    • Labels:
      None

      Description

      Attaching a patch adding the option to stress to use the binary protocol. This is a bit of a hack (for instance, for inserts, the schema is still created using a thrift connection), but it's the simpler/smallest change I can come up with that allowa to compare thrift and the binary protocol.

        Activity

        Hide
        Yuki Morishita added a comment -

        Sylvain, can you rebase?

        Show
        Yuki Morishita added a comment - Sylvain, can you rebase?
        Hide
        Sylvain Lebresne added a comment -

        Attached rebased patch. This is against 1.2 because this really only touch stress, but I'm happy committing to trunk if anyone object for 1.2.

        Show
        Sylvain Lebresne added a comment - Attached rebased patch. This is against 1.2 because this really only touch stress, but I'm happy committing to trunk if anyone object for 1.2.
        Hide
        Yuki Morishita added a comment -

        I have NullPointerException when I only specify "-b".

        nit fix:

        --- a/tools/stress/src/org/apache/cassandra/stress/Session.java
        +++ b/tools/stress/src/org/apache/cassandra/stress/Session.java
        @@ -305,7 +305,7 @@ public class Session implements Serializable
         
                     if (cmd.hasOption("b"))
                     {
        -                if (!enable_cql && cqlVersion.startsWith("3"))
        +                if (!enable_cql || !cqlVersion.startsWith("3"))
                             throw new IllegalArgumentException("Cannot use binary protocol without -L3");
                         use_native_protocol = true;
                     }
        

        Otherwise, +1.

        Show
        Yuki Morishita added a comment - I have NullPointerException when I only specify "-b". nit fix: --- a/tools/stress/src/org/apache/cassandra/stress/Session.java +++ b/tools/stress/src/org/apache/cassandra/stress/Session.java @@ -305,7 +305,7 @@ public class Session implements Serializable if (cmd.hasOption( "b" )) { - if (!enable_cql && cqlVersion.startsWith( "3" )) + if (!enable_cql || !cqlVersion.startsWith( "3" )) throw new IllegalArgumentException( "Cannot use binary protocol without -L3" ); use_native_protocol = true ; } Otherwise, +1.
        Hide
        Sylvain Lebresne added a comment -

        Committed with NPE fixed. Thanks.

        Show
        Sylvain Lebresne added a comment - Committed with NPE fixed. Thanks.

          People

          • Assignee:
            Sylvain Lebresne
            Reporter:
            Sylvain Lebresne
            Reviewer:
            Yuki Morishita
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development