Package edu.brown.hstore.Hstoreservice

Examples of edu.brown.hstore.Hstoreservice.Status


                          HStoreThreadManager.formatSiteName(request.getSenderSite())));
           
            Long txnId = request.getTransactionId();
            AbstractTransaction ts = hstore_site.getTransaction(txnId);
            String debug;
            Status status;
            if (ts != null) {
                debug = ts.debug();
                status = Status.OK;
            } else {
                debug = "";
View Full Code Here


        assert(callback.isInitialized()) :
            String.format("Unexpected uninitialized %s for %s\n%s",
                          callback.getClass().getSimpleName(),
                          nextTxn, callback.toString());
        boolean ret = (callback.isAborted() == false);
        Status status = null;
       
        if (trace.val)
            LOG.trace(String.format("Adding %s to lock queus for partitions %s\n%s",
                      nextTxn, nextTxn.getPredictTouchedPartitions(), callback));
        for (int partition : nextTxn.getPredictTouchedPartitions().values()) {
View Full Code Here

        // was released but then it was deleted and cleaned-up. This means that its txn id
        // might be null. A better way to do this is to only have each PartitionExecutor
        // insert the new transaction into its queue.
        Long txn_id = ts.getTransactionId();
        Long next_safe_id = null;
        Status status = Status.OK;
       
        this.lockQueueBarriers[partition].lock();
        try {
            next_safe_id = this.lockQueues[partition].noteTransactionRecievedAndReturnLastSafeTxnId(txn_id);
        } finally {
View Full Code Here

       
        Pair<LocalTransaction, Status> pair = null;
        int limit = CHECK_RESTART_QUEUE_LIMIT;
        while ((pair = this.restartQueue.poll()) != null) {
            LocalTransaction ts = pair.getFirst();
            Status status = pair.getSecond();
           
            if (trace.val)
                LOG.trace(String.format("%s - Ready to restart transaction [status=%s]", ts, status));
            Status ret = this.hstore_site.transactionRestart(ts, status);
            if (trace.val)
                LOG.trace(String.format("%s - Got return result %s after restarting", ts, ret));
           
            ts.unmarkNeedsRestart();
            this.hstore_site.queueDeleteTransaction(ts.getTransactionId(), status);
View Full Code Here

                    pair = restartQueue.take();
                } catch (InterruptedException ex) {
                    // IGNORE
                }
                LocalTransaction ts = pair.getFirst();
                Status status = pair.getSecond();
                   
                if (trace.val)
                    LOG.trace(String.format("%s - Ready to restart transaction [status=%s]", ts, status));
                Status ret = hstore_site.transactionRestart(ts, status);
                if (trace.val)
                    LOG.trace(String.format("%s - Got return result %s after restarting", ts, ret));
               
                ts.unmarkNeedsRestart();
                hstore_site.queueDeleteTransaction(ts.getTransactionId(), status);
View Full Code Here

            // Depending on what we need to do for this type txn, we will send
            // either an ABORT_THROTTLED or an ABORT_REJECT in our response
            // An ABORT_THROTTLED means that the client will back-off of a bit
            // before sending another txn request, where as an ABORT_REJECT means
            // that it will just try immediately
            Status status = Status.ABORT_REJECT;
            if (debug.val)
                LOG.debug(String.format("%s - Hit with a %s response from partition %d " +
                          "[queueSize=%d]",
                          ts, status, ts.getBasePartition(),
                          this.executors[ts.getBasePartition()].getDebugContext().getWorkQueueSize()));
View Full Code Here

     * <B>Note:</B> The ClientResponse's status cannot be ABORT_MISPREDICT or ABORT_EVICTEDACCESS.
     * @param ts
     * @param cresponse
     */
    public void responseSend(LocalTransaction ts, ClientResponseImpl cresponse) {
        Status status = cresponse.getStatus();
        assert(cresponse != null) :
            "Missing ClientResponse for " + ts;
        assert(cresponse.getClientHandle() != -1) :
            "The client handle for " + ts + " was not set properly";
        assert(status != Status.ABORT_MISPREDICT && status != Status.ABORT_EVICTEDACCESS) :
View Full Code Here

     */
    public void responseSend(ClientResponseImpl cresponse,
                             RpcCallback<ClientResponseImpl> clientCallback,
                             long initiateTime,
                             int restartCounter) {
        Status status = cresponse.getStatus();
        // If the txn committed/aborted, then we can send the response directly back to the
        // client here. Note that we don't even need to call HStoreSite.finishTransaction()
        // since that doesn't do anything that we haven't already done!
        if (debug.val) {
View Full Code Here

                this.t = t;
            }

            @Override
            public void clientCallback(ClientResponse clientResponse) {
                final Status status = clientResponse.getStatus();
                if (status != Status.OK) {
                    if (status == Status.ABORT_CONNECTION_LOST){
                        /*
                         * Status of the last transaction involving the tournament
                         * is unknown it could have committed. Recovery code would
View Full Code Here

    public static boolean checkLatency = false;

    static class AsyncCallback implements ProcedureCallback {
        @Override
        public synchronized void clientCallback(ClientResponse clientResponse) {
            final Status status = clientResponse.getStatus();

            if (status != Status.OK) {
                System.err.println("Failed to execute!!!");
                System.err.println(clientResponse.getStatusString());
                System.err.println(clientResponse.getException());
View Full Code Here

TOP

Related Classes of edu.brown.hstore.Hstoreservice.Status

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.