[ 
https://issues.apache.org/jira/browse/CASSANDRA-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13593735#comment-13593735
 ] 

Yuki Morishita commented on CASSANDRA-4993:
-------------------------------------------

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

nit fix:

{code}
--- 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;
             }
{code}

Otherwise, +1.
                
> Add binary protocol support to stress
> -------------------------------------
>
>                 Key: CASSANDRA-4993
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4993
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>         Attachments: 0001-Add-native-support-to-stress.txt
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to