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

Ben Slater commented on CASSANDRA-12490:
----------------------------------------

Thanks for the feedback. 

You're right - next.set(seed) would be a better implementation - I didn't check 
if there was another method of setting the value of an AtomicLong. I can update 
a the patch if the decision is to go ahead.

It still generates min..max as nextWithWrap() (which is called by the other 
variants of next()) returns start + (next % totalCount) so it starts again from 
min if it goes past max.

I think the need for this is less with Jake's fix to the random generator in 
CASSANDRA-12744. However, I still think it serves a purpose for loading 
background data for a test without overlap. However, if I'm over-ruled on that 
so be it.


> Add sequence distribution type to cassandra stress
> --------------------------------------------------
>
>                 Key: CASSANDRA-12490
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12490
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Ben Slater
>            Assignee: Ben Slater
>            Priority: Minor
>             Fix For: 3.10
>
>         Attachments: 12490-trunk.patch, 12490.yaml, 12490update-trunk.patch, 
> cqlstress-seq-example.yaml
>
>
> When using the write command, cassandra stress sequentially generates seeds. 
> This ensures generated values don't overlap (unless the sequence wraps) 
> providing more predictable number of inserted records (and generating a base 
> set of data without wasted writes).
> When using a yaml stress spec there is no sequenced distribution available. 
> It think it would be useful to have this for doing initial load of data for 
> testing 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to