Package com.oltpbenchmark.distributions

Examples of com.oltpbenchmark.distributions.ScrambledZipfianGenerator.nextInt()


       
        TweetHistogram tweet_h = new TweetHistogram();
        FlatHistogram<Integer> tweet_len_rng = new FlatHistogram<Integer>(this.rng(), tweet_h);
       
        for (long i = 0; i < this.num_tweets; i++) {
            int uid = zy.nextInt();
            tweetInsert.setLong(1, i);
            tweetInsert.setInt(2, uid);
            tweetInsert.setString(3, TextGenerator.randomStr(rng(), tweet_len_rng.nextValue()));
            tweetInsert.setNull(4, java.sql.Types.DATE);
            tweetInsert.addBatch();
View Full Code Here


        Random isTrusted = new Random(System.currentTimeMillis());
        for (int i = 0; i < num_users; i++) {
            List<Integer> trusted = new ArrayList<Integer>();
            int trust_count = numTrust.nextInt();
            for (int tc = 0; tc < trust_count;) {
                int u_id = reviewed.nextInt();
                if (!trusted.contains(u_id)) {
                    tc++;
                    trustInsert.setInt(1, i);
                    trustInsert.setInt(2, u_id);
                    trustInsert.setInt(3, isTrusted.nextInt(2));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.