[
https://issues.apache.org/jira/browse/CASSANDRA-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990589#comment-13990589
]
Benedict commented on CASSANDRA-6572:
-------------------------------------
Thanks for the update. A couple of nits:
* No need to create a DataOutputStream for writing the byte[] - the FOS will be
sufficient
* Convert the query-string to bytes first, and then determine the length, as
there could be unicode characters present that occupy more than one byte per
character
* For legibility, it would be nice to create a specific object for storing the
loaded queries, instead of a Pair<Long, byte[]> - and you may as well convert
it to a string earlier like you were before
* Don't forget to make the append asynchronous (i.e. not *synchronized*, by
exploiting the position being an AtomicInteger to permit multiple queries
getting logged simultaneously). Can look in CommitLogSegment.allocate() for an
example of how this can be done.
> Workload recording / playback
> -----------------------------
>
> Key: CASSANDRA-6572
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6572
> Project: Cassandra
> Issue Type: New Feature
> Components: Core, Tools
> Reporter: Jonathan Ellis
> Assignee: Lyuben Todorov
> Fix For: 2.1.1
>
> Attachments: 6572-trunk.diff
>
>
> "Write sample mode" gets us part way to testing new versions against a real
> world workload, but we need an easy way to test the query side as well.
--
This message was sent by Atlassian JIRA
(v6.2#6252)