Package com.oltpbenchmark.benchmarks.auctionmark.util

Examples of com.oltpbenchmark.benchmarks.auctionmark.util.GlobalAttributeValueId


                this.gag_current = this.gag_iterator.next();
                assert(this.gag_current != null);
                this.gav_counter = 0;
            }

            GlobalAttributeValueId gav_id = new GlobalAttributeValueId(this.gag_current.encode(),
                                                                     this.gav_counter);
           
            // GAV_ID
            row[col++] = gav_id.encode();
            // GAV_GAG_ID
            row[col++] = this.gag_current.encode();
            // GAV_NAME
            row[col++] = profile.rng.astring(6, 32);
           
View Full Code Here


            return itemInfo.numAttributes;
        }
        @Override
        protected int populateRow(LoaderItemInfo itemInfo, Object[] row, short remaining) {
            int col = 0;
            GlobalAttributeValueId gav_id = profile.getRandomGlobalAttributeValue();
            assert(gav_id != null);
           
            // IA_ID
            row[col++] = this.count;
            // IA_I_ID
            row[col++] = itemInfo.itemId;
            // IA_U_ID
            row[col++] = itemInfo.sellerId;
            // IA_GAV_ID
            row[col++] = gav_id.encode();
            // IA_GAG_ID
            row[col++] = gav_id.getGlobalAttributeGroup().encode();

            return (col);
        }
View Full Code Here

        String attributes = profile.rng.astring(50, 255);

        int numAttributes = profile.randomNumAttributes.nextInt();
        List<GlobalAttributeValueId> gavList = new ArrayList<GlobalAttributeValueId>(numAttributes);
        for (int i = 0; i < numAttributes; i++) {
            GlobalAttributeValueId gav_id = profile.getRandomGlobalAttributeValue();
            if (!gavList.contains(gav_id)) gavList.add(gav_id);
        } // FOR

        long[] gag_ids = new long[gavList.size()];
        long[] gav_ids = new long[gavList.size()];
        for (int i = 0, cnt = gag_ids.length; i < cnt; i++) {
            GlobalAttributeValueId gav_id = gavList.get(i);
            gag_ids[i] = gav_id.getGlobalAttributeGroup().encode();
            gav_ids[i] = gav_id.encode();
        } // FOR

        int numImages = profile.randomNumImages.nextInt();
        String[] images = new String[numImages];
        for (int i = 0; i < numImages; i++) {
View Full Code Here

        if (profile.rng.number(1, 100) < AuctionMarkConstants.PROB_UPDATEITEM_DELETE_ATTRIBUTE) {
            delete_attribute = true;
        }
        // Add ITEM_ATTRIBUTE
        else if (profile.rng.number(1, 100) < AuctionMarkConstants.PROB_UPDATEITEM_ADD_ATTRIBUTE) {
            GlobalAttributeValueId gav_id = profile.getRandomGlobalAttributeValue();
            assert(gav_id != null);
            add_attribute[0] = gav_id.getGlobalAttributeGroup().encode();
            add_attribute[1] = gav_id.encode();
        }
       
        proc.run(conn, benchmarkTimes, itemInfo.itemId.encode(),
                                       sellerId.encode(),
                                       description,
View Full Code Here

    public GlobalAttributeValueId getRandomGlobalAttributeValue() {
        int offset = rng.nextInt(this.gag_ids.size());
        GlobalAttributeGroupId gag_id = this.gag_ids.get(offset);
        assert(gag_id != null);
        int count = rng.nextInt(gag_id.getCount());
        GlobalAttributeValueId gav_id = new GlobalAttributeValueId(gag_id, count);
        return gav_id;
    }
View Full Code Here

TOP

Related Classes of com.oltpbenchmark.benchmarks.auctionmark.util.GlobalAttributeValueId

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.