Package edu.brown.hstore

Examples of edu.brown.hstore.PartitionLockQueue


    @Override
    protected synchronized void updateStatsRow(Object rowKey, Object[] rowValues) {
        int partition = (Integer)rowKey;
        TransactionQueueManager.Debug dbg = this.queue_manager.getDebugContext();
        TransactionQueueManagerProfiler profiler = dbg.getProfiler(partition);
        PartitionLockQueue initQueue = this.queue_manager.getLockQueue(partition);
        PartitionLockQueueProfiler initProfiler = initQueue.getDebugContext().getProfiler();
       
        int offset = this.columnNameToIndex.get("PARTITION");
        rowValues[offset++] = partition;
        rowValues[offset++] = MathUtil.weightedMean(profiler.concurrent_dtxn);
       
        for (ProfileMeasurement pm : profiler.getProfileMeasurements()) {
            rowValues[offset++] = pm.getTotalThinkTime();
            rowValues[offset++] = pm.getInvocations();
        } // FOR
       
        // ThrottlingQueue
        ProfileMeasurement throttlePM = initQueue.getThrottleTime();
        rowValues[offset++] = throttlePM.getTotalThinkTime();
        rowValues[offset++] = throttlePM.getInvocations();
       
        // PartitionLockQueue
        rowValues[offset++] = MathUtil.weightedMean(initProfiler.waitTimes);
View Full Code Here


    public static void checkQueuedTxns(PartitionExecutor executor, int expected) {
        // Wait until they have all been executed but make sure that nobody actually returned yet
        int tries = 3;
        int blocked = -1;
        PartitionLockQueue queue = executor.getHStoreSite()
                                           .getTransactionQueueManager()
                                           .getLockQueue(executor.getPartitionId());
        while (tries-- > 0) {
            blocked = queue.size();
            if (blocked == expected) break;
            ThreadUtil.sleep(NOTIFY_TIMEOUT);   
        } // WHILE
        assertEquals(executor.toString(), expected, blocked);
    }
View Full Code Here

TOP

Related Classes of edu.brown.hstore.PartitionLockQueue

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.