Package voldemort.store

Examples of voldemort.store.UnreachableStoreException


        } catch(InterruptedException e) {

            if(logger.isDebugEnabled())
                debugMsgStr += "unreachable: " + e.getMessage();

            throw new UnreachableStoreException("Failure in " + operationName + " on "
                                                + destination + ": " + e.getMessage(), e);
        } catch(IOException e) {
            clientRequestExecutor.close();

            if(logger.isDebugEnabled())
                debugMsgStr += "failure: " + e.getMessage();

            throw new UnreachableStoreException("Failure in " + operationName + " on "
                                                + destination + ": " + e.getMessage(), e);
        } finally {
            if(blockingClientRequest != null && !blockingClientRequest.isComplete()) {
                // close the executor if we timed out
                clientRequestExecutor.close();
View Full Code Here


            try {
                // To hand control back to the owner of the
                // AsyncResourceRequest, treat "destroy" as an exception since
                // there is no resource to pass into useResource, and the
                // timeout has not expired.
                Exception e = new UnreachableStoreException("Resource request destroyed before resource checked out.");
                resourceRequest.handleException(e);
            } catch(Exception ex) {
                logger.error("Exception while destroying resource request:", ex);
            }
        }
View Full Code Here

                            } catch(Exception e) {
                                if(logger.isEnabledFor(Level.WARN))
                                    logger.warn(e, e);
                            }
                        } else {
                            UnreachableStoreException ex = new UnreachableStoreException("Failure in "
                                                                                         + operationName
                                                                                         + ": time out exceeded");
                            try {
                                callback.requestComplete(ex, diff / Time.NS_PER_MS);
                            } catch(Exception e) {
View Full Code Here

            SocketAndStreams sas = pool.checkout(destination);
            updateStats(System.nanoTime() - start);

            return sas;
        } catch(Exception e) {
            throw new UnreachableStoreException("Failure while checking out socket for "
                                                + destination + ": ", e);
        }
    }
View Full Code Here

        if(!isComplete)
            throw new IllegalStateException("Client response not complete, cannot determine result");

        if(!isParsed)
            throw new UnreachableStoreException("Client response not read/parsed, cannot determine result");

        if(error instanceof IOException)
            throw (IOException) error;
        else if(error instanceof VoldemortException)
            throw (VoldemortException) error;
View Full Code Here

            // a ClientRequestExector resource will be leaked. Cannot safely
            // deal with this here since clientRequestExecutor is not assigned
            // in this catch. Even if it was, clientRequestExecutore.close()
            // checks in the SocketDestination resource and so is not safe to
            // call.
            throw new UnreachableStoreException("Failure while checking out socket for "
                                                + destination + ": ", e);
        } finally {
            if(stats != null) {
                stats.recordCheckoutTimeUs(destination, (System.nanoTime() - startTimeNs)
                                                        / Time.NS_PER_US);
View Full Code Here

        @Override
        public void handleException(Exception e) {
            updateStats();
            if(!(e instanceof UnreachableStoreException))
                e = new UnreachableStoreException("Failure in " + operationName + ": "
                                                  + e.getMessage(), e);
            try {
                // Because PerformParallel(Put||Delete|GetAll)Requests define
                // 'callback' via an anonymous class, callback can be null if
                // the client factory closes down and some other thread invokes
View Full Code Here

    public static void recordException(FailureDetector failureDetector,
                                       Node node,
                                       long requestTime,
                                       UnreachableStoreException e) {
        ((MutableStoreVerifier) failureDetector.getConfig().getStoreVerifier()).setErrorStore(node,
                                                                                              new UnreachableStoreException("junit injected test error"));
        failureDetector.recordException(node, requestTime, e);
    }
View Full Code Here

    @Override
    public void recordSuccess(Node node, long requestTime) {
        checkArgs(node, requestTime);

        boolean isSuccess = true;
        UnreachableStoreException e = null;

        if(requestTime > getConfig().getRequestLengthThreshold()) {
            // Consider slow requests as "soft" errors that are counted against
            // us in our success threshold.
            e = new UnreachableStoreException("Node " + node.getId()
                                              + " recording success, but request time ("
                                              + requestTime + ") exceeded threshold ("
                                              + getConfig().getRequestLengthThreshold() + ")");

            isSuccess = false;
View Full Code Here

                if(response.getValue() instanceof Exception
                   && !(response.getValue() instanceof ObsoleteVersionException)) {
                    if(!failedNodes.contains(node))
                        failedNodes.add(node);
                    if(response.getValue() instanceof UnreachableStoreException) {
                        UnreachableStoreException use = (UnreachableStoreException) response.getValue();

                        if(loggerDebugEnabled) {
                            logger.debug("Write of key " + slop.getKey() + " for "
                                         + slop.getNodeId() + " to node " + node
                                         + " failed due to unreachable: " + use.getMessage());
                        }

                        failureDetector.recordException(node, (System.nanoTime() - startNs)
                                                              / Time.NS_PER_MS, use);
                    }
View Full Code Here

TOP

Related Classes of voldemort.store.UnreachableStoreException

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.