Package org.apache.cassandra.stress

Examples of org.apache.cassandra.stress.Session


     * Gauss key generator
     * @return byte[] representation of the key string
     */
    private static byte[] generateGaussKey()
    {
        Session session = Stress.session;
        String format = "%0" + session.getTotalKeysLength() + "d";

        for (;;)
        {
            double token = nextGaussian(session.getMean(), session.getSigma());

            if (0 <= token && token < session.getNumDifferentKeys())
            {
                return String.format(format, (int) token).getBytes(UTF_8);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.stress.Session

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.