Package edu.brown.protorpc

Examples of edu.brown.protorpc.ProtoRpcController


                latch.countDown();
            }
        };
        for (int site_id = 0; site_id < this.num_sites; site_id++) {
            if (site_id == this.local_site_id) continue;
            ProtoRpcController controller = new ProtoRpcController();
            this.channels[site_id].initialize(controller, request, callback);
        } // FOR
       
        if (latch.getCount() > 0) {
            if (debug.val)
View Full Code Here


                if (builders[site_id] != null && builders[site_id].getPrefetchFragmentsCount() > 0) {
                    TransactionInitRequest request = builders[site_id].build();
                    if (site_id == this.local_site_id) {
                        this.transactionInit_handler.remoteHandler(null, request, null);   
                    } else {
                        ProtoRpcController controller = ts.getTransactionInitController(site_id);
                        this.channels[site_id].transactionInit(controller, request, callback);
                    }
                    prefetch_ctr += request.getPrefetchFragmentsCount();
                    sent_ctr++;
                    builders[site_id] = null;
                }
            } // FOR
           
            // Then send out the ones without prefetching. These should all be the same
            // builder so we have to make sure that we only build it once.
            TransactionInitRequest request = null;
            for (int site_id = 0; site_id < this.num_sites; site_id++) {
                if (builders[site_id] != null) {
                    if (request == null) request = builders[site_id].build();
                    if (site_id == this.local_site_id) {
                        this.transactionInit_handler.remoteHandler(null, request, null);   
                    } else {
                        ProtoRpcController controller = ts.getTransactionInitController(site_id);
                        this.channels[site_id].transactionInit(controller, request, callback);
                    }
                    sent_ctr++;
                }
            } // FOR
View Full Code Here

        assert(request.hasResult()) :
            String.format("No WorkResults in %s for %s", request.getClass().getSimpleName(), ts);
        int site_id = catalogContext.getSiteIdForPartitionId(ts.getBasePartition());
        assert(site_id != this.local_site_id);
       
        ProtoRpcController controller = ts.getTransactionPrefetchController(request.getSourcePartition());
        this.channels[site_id].transactionPrefetch(controller,
                                                   request,
                                                   this.transactionPrefetch_callback);
    }
View Full Code Here

        ByteString bs = ByteString.copyFrom(serializedRequest);
        TransactionRedirectRequest mr = TransactionRedirectRequest.newBuilder()
                                        .setSenderSite(this.local_site_id)
                                        .setWork(bs)
                                        .build();
        this.channels[dest_site_id].transactionRedirect(new ProtoRpcController(), mr, callback);
    }
View Full Code Here

           
            if (builder.getDataCount() > 0) {
                if (debug.val)
                    LOG.debug(String.format("%s - Sending data to %d partitions at %s for %s",
                              ts, builder.getDataCount(), remote_site, ts));
                this.channels[dest_site_id].sendData(new ProtoRpcController(), builder.build(), callback);
            }
        } // FOR n sites in this catalog
               
        for (int partition : hstore_site.getLocalPartitionIds().values()) {
            VoltTable vt = data.get(Integer.valueOf(partition));
View Full Code Here

                                           .setSenderSite(this.local_site_id)
                                           .setTransactionId(txn_id)
                                           .build();
        for (int site_id = 0; site_id < this.num_sites; site_id++) {
            if (site_id == this.local_site_id) continue;
            this.channels[site_id].transactionDebug(new ProtoRpcController(), request, callback);
            if (trace.val)
                LOG.trace(String.format("Sent %s to %s",
                          request.getClass().getSimpleName(),
                          HStoreThreadManager.formatSiteName(site_id)));
        } // FOR
View Full Code Here

                                    .build();
        for (int site_id = 0; site_id < this.num_sites; site_id++) {
            if (site_id == this.local_site_id) continue;
            if (this.isShuttingDown()) break;
            try {
                this.channels[site_id].heartbeat(new ProtoRpcController(), request, this.heartbeatCallback);
                if (trace.val)
                    LOG.trace(String.format("Sent %s to %s",
                              request.getClass().getSimpleName(),
                              HStoreThreadManager.formatSiteName(site_id)));
            } catch (RuntimeException ex) {
View Full Code Here

       for (int i=0; i< tuple_offsets.length; i++){
    builder = builder.addTupleOffsets(tuple_offsets[i]);
       }
       UnevictDataRequest request = builder.build();           
            try {
        this.channels[remote_site_id].unevictData(new ProtoRpcController(), request, this.unevictCallback);
                if (trace.val) {
                    LOG.trace(String.format("Sent unevict message request to remote hstore site %d from base site %d",
                              remote_site_id, this.hstore_site.getSiteId()));
                    LOG.trace(String.format("Sent %s to %s",
                              request.getClass().getSimpleName(),
View Full Code Here

        };
       
        // Send out TimeSync request
        for (int site_id = 0; site_id < this.num_sites; site_id++) {
            if (site_id == this.local_site_id) continue;
            ProtoRpcController controller = new ProtoRpcController();
            TimeSyncRequest request = TimeSyncRequest.newBuilder()
                                            .setSenderSite(this.local_site_id)
                                            .setT0S(System.currentTimeMillis())
                                            .build();
            this.channels[site_id].timeSync(controller, request, callback);
View Full Code Here

                if (this.channels[site_id] == null) {
                    LOG.error(String.format("Trying to send %s to %s before the connection was established",
                              request.getClass().getSimpleName(),
                              HStoreThreadManager.formatSiteName(site_id)));
                } else {
                    this.channels[site_id].shutdownPrepare(new ProtoRpcController(), request, callback);
                    if (trace.val)
                        LOG.trace(String.format("Sent %s to %s",
                                  request.getClass().getSimpleName(),
                                  HStoreThreadManager.formatSiteName(site_id)));
                }
View Full Code Here

TOP

Related Classes of edu.brown.protorpc.ProtoRpcController

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.