Examples of Flat


Examples of com.oltpbenchmark.util.RandomDistribution.Flat

        private UserIdGenerator idGenerator;
       
        public UserGenerator() {
            super(AuctionMarkConstants.TABLENAME_USERACCT,
                  AuctionMarkConstants.TABLENAME_REGION);
            this.randomRegion = new Flat(profile.rng, 0, (int)AuctionMarkConstants.TABLESIZE_REGION);
            this.randomRating = new Zipf(profile.rng, AuctionMarkConstants.USER_MIN_RATING,
                                                      AuctionMarkConstants.USER_MAX_RATING, 1.0001);
            this.randomBalance = new Zipf(profile.rng, AuctionMarkConstants.USER_MIN_BALANCE,
                                                       AuctionMarkConstants.USER_MAX_BALANCE, 1.001);
        }
View Full Code Here

Examples of com.oltpbenchmark.util.RandomDistribution.Flat

        if (file == null || b.getTraceSize() == 0) return (null);
       
        assert(this.num_pages == this.titles.size());
        LOG.info(String.format("Generating a %dk traces to '%s'", b.getTraceSize(), file));
       
        Flat z_users = new Flat(rng(), 1, this.num_users);
        Zipf z_pages = new Zipf(rng(), 1, this.num_pages, WikipediaConstants.USER_ID_SIGMA);
       
        PrintStream ps = new PrintStream(file);
        for (int i = 0, cnt = (b.getTraceSize() * 1000); i < cnt; i++) {
            int user_id = -1;
           
            // Check whether this should be an anonymous update
            if (rng().nextInt(100) < WikipediaConstants.ANONYMOUS_PAGE_UPDATE_PROB) {
                user_id = WikipediaConstants.ANONYMOUS_USER_ID;
            }
            // Otherwise figure out what user is updating this page
            else {
                user_id = z_users.nextInt();
            }
            assert(user_id != -1);
           
            // Figure out what page they're going to update
            int page_id = z_pages.nextInt();
View Full Code Here

Examples of com.oltpbenchmark.util.RandomDistribution.Flat

  public WikipediaWorker(int id, WikipediaBenchmark benchmarkModule,
                         TransactionGenerator<WikipediaOperation> generator) {
    super(benchmarkModule, id);
    this.generator = generator;
    this.num_users = (int) Math.round(WikipediaConstants.USERS * this.getWorkloadConfiguration().getScaleFactor());
    this.usersRng = new Flat(rng(), 1, this.num_users);
  }
View Full Code Here

Examples of edu.brown.rand.RandomDistribution.Flat

        private UserIdGenerator idGenerator;
       
        public UserGenerator() {
            super(AuctionMarkConstants.TABLENAME_USER,
                  AuctionMarkConstants.TABLENAME_REGION);
            this.randomRegion = new Flat(profile.rng, 0, (int) AuctionMarkConstants.TABLESIZE_REGION);
            this.randomRating = new Zipf(profile.rng, AuctionMarkConstants.USER_MIN_RATING,
                                                                     AuctionMarkConstants.USER_MAX_RATING, 1.0001);
            this.randomBalance = new Zipf(profile.rng, AuctionMarkConstants.USER_MIN_BALANCE,
                                                                      AuctionMarkConstants.USER_MAX_BALANCE, 1.001);
        }
View Full Code Here

Examples of edu.brown.rand.RandomDistribution.Flat

        public FlightIterable(Table catalog_tbl, int days_past, int days_future) {
            super(catalog_tbl, Long.MAX_VALUE, new int[]{ 0, 1, 2, 3, 4, 5, 6, 7, 8 });
            assert(days_past >= 0);
            assert(days_future >= 0);
           
            this.prices = new Flat(rng,
                    SEATSConstants.RESERVATION_PRICE_MIN,
                    SEATSConstants.RESERVATION_PRICE_MAX);
           
            // Flights per Airline
            Collection<String> all_airlines = profile.getAirlineCodes();
View Full Code Here

Examples of edu.brown.rand.RandomDistribution.Flat

            this.callbacks[i] = new WikipediaCallback(i);
        } // FOR
       
        this.util = new WikipediaUtil(this.randGenerator, this.getScaleFactor());
       
        this.flat_users = new Flat(this.randGenerator, 1, util.num_users);
        this.zipf_pages = new Zipf(this.randGenerator, 1, util.num_pages, WikipediaConstants.USER_ID_SIGMA);
        this.flat_pages = new Flat(this.randGenerator, 1, util.num_pages);
    }
View Full Code Here

Examples of org.apache.hadoop.io.file.tfile.RandomDistribution.Flat

  ArticleGenerator(int dictWordCnt, int minWordLen, int maxWordLen,
      int pageWidth) {
    random = new Random(System.nanoTime());
    dict = new Dictionary(random, dictWordCnt, minWordLen, maxWordLen, 100);
    this.pageWidth = pageWidth;
    lastLineLenGen = new Flat(random, 1, pageWidth);
    paragraphLineLenGen = new Flat(random, pageWidth * 3 / 4, pageWidth);
    paragraphLenGen = new Flat(random, 1, 40);
  }
View Full Code Here

Examples of org.apache.hadoop.zebra.tfile.RandomDistribution.Flat

  ArticleGenerator(int dictWordCnt, int minWordLen, int maxWordLen,
      int pageWidth) {
    random = new Random(System.nanoTime());
    dict = new Dictionary(random, dictWordCnt, minWordLen, maxWordLen, 100);
    this.pageWidth = pageWidth;
    lastLineLenGen = new Flat(random, 1, pageWidth);
    paragraphLineLenGen = new Flat(random, pageWidth * 3 / 4, pageWidth);
    paragraphLenGen = new Flat(random, 1, 40);
  }
View Full Code Here

Examples of org.apache.hadoop.zebra.tfile.RandomDistribution.Flat

  ArticleGenerator(int dictWordCnt, int minWordLen, int maxWordLen,
      int pageWidth) {
    random = new Random(System.nanoTime());
    dict = new Dictionary(random, dictWordCnt, minWordLen, maxWordLen, 100);
    this.pageWidth = pageWidth;
    lastLineLenGen = new Flat(random, 1, pageWidth);
    paragraphLineLenGen = new Flat(random, pageWidth * 3 / 4, pageWidth);
    paragraphLenGen = new Flat(random, 1, 40);
  }
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.