Package edu.brown.hstore

Examples of edu.brown.hstore.PartitionExecutor$Debug


    protected VoltMapReduceProcedure<?> getVoltMapReduceProcedure(Procedure catalog_proc, int partition) {
        assert(catalog_proc.getMapreduce());
        assert(catalog_proc.getHasjava());
        assert(hstore_site.isLocalPartition(partition));
       
        PartitionExecutor executor = hstore_site.getPartitionExecutor(partition);
        VoltMapReduceProcedure<?> volt_proc = null;

        // TODO: We are creating a new instance every single time per partition.
        //       We can probably cache these...
        // Only try to load the Java class file for the SP if it has one
        Class<? extends VoltProcedure> p_class = null;
        final String className = catalog_proc.getClassname();
        try {
            p_class = (Class<? extends VoltMapReduceProcedure<?>>)Class.forName(className);
            volt_proc = (VoltMapReduceProcedure<?>)p_class.newInstance();
        } catch (Exception e) {
            throw new ServerFaultException("Failed to created VoltProcedure instance for " + catalog_proc.getName() , e);
        }
        volt_proc.init(executor, catalog_proc, executor.getBackendTarget());
        return (volt_proc);
    }
View Full Code Here


            throw new ServerFaultException(msg, txn_id);
        }
       
        // We want to store this before sending back the acknowledgment so that the transaction can get
        // access to it right away
        PartitionExecutor executor = hstore_site.getPartitionExecutor(ts.getBasePartition());
        WorkResult result = request.getResult();
       
        if (result.getStatus() != Status.OK) {
            // TODO: Process error!
        } else {
            for (int i = 0, cnt = result.getDepIdCount(); i < cnt; i++) {
                int fragmentId = request.getFragmentId(i);
                int stmtCounter = request.getStmtCounter(i);
                int paramsHash = request.getParamHash(i);
               
                VoltTable vt = null;
                try {
                    this.fds.setBuffer(result.getDepData(i).asReadOnlyByteBuffer());
                    vt = this.fds.readObject(VoltTable.class);
                } catch (IOException ex) {
                    throw new RuntimeException(ex);
                }
       
                executor.addPrefetchResult(ts, stmtCounter, fragmentId,
                                           request.getSourcePartition(),
                                           paramsHash, vt);
            } // FOR
        }
       
View Full Code Here

    }
   
    private Collection<BatchPlanner> getBatchPlanners(Procedure proc) {
        Set<BatchPlanner> planners = new HashSet<BatchPlanner>();
        for (int partition : hstore_site.getLocalPartitionIds().values()) {
            PartitionExecutor executor = hstore_site.getPartitionExecutor(partition);
            PartitionExecutor.Debug executorDebug = executor.getDebugContext();
            for (BatchPlanner planner : executorDebug.getBatchPlanners()) {
                if (planner.getProcedure().equals(proc)) {
                    planners.add(planner);
                }
            } // FOR
View Full Code Here

       
        // Hit up all of the PartitionExecutors at this HStore and figure out what
        // they got going on
        VoltTable vt = new VoltTable(nodeResultsColumns);
        for (int p : hstore_site.getLocalPartitionIds().values()) {
            PartitionExecutor es = hstore_site.getPartitionExecutor(p);
            PartitionExecutor.Debug dbg = es.getDebugContext();
            Queue<?> es_queue = dbg.getWorkQueue();
               
            Long currentTxnId = dbg.getCurrentTxnId();
            Long currentDtxnId = dbg.getCurrentDtxnId();
            Long lastCommitted = dbg.getLastCommittedTxnId();
            Long lastExecuted = dbg.getLastExecutedTxnId();
           
            vt.addRow(es.getSiteId(),
                      es.getPartitionId(),
                      es_queue.size(),
                      dbg.getWorkQueueSize(),
                      dbg.getBlockedWorkCount(),
                      dbg.getBlockedSpecExecCount(),
                      (currentTxnId != null  ? currentTxnId.longValue()  : VoltType.NULL_BIGINT),
View Full Code Here

TOP

Related Classes of edu.brown.hstore.PartitionExecutor$Debug

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.