Package com.linkedin.r2.filter

Examples of com.linkedin.r2.filter.FilterChain


  private void executeRequestThroughParseqDebugHandler(URI uri, Callback<RestResponse> callback)
  {
    ParseqTraceDebugRequestHandler requestHandler = new ParseqTraceDebugRequestHandler();
    RestRequestBuilder requestBuilder = new RestRequestBuilder(uri);
    RestRequest request = requestBuilder.build();
    RequestContext requestContext = new RequestContext();

    requestHandler.handleRequest(request,
                                  requestContext,
                                  new RestLiDebugRequestHandler.ResourceDebugRequestHandler()
                                  {
View Full Code Here


                }
            }

        } catch(ExecutionException e) {
            if(e.getCause() instanceof RestException) {
                RestException exception = (RestException) e.getCause();
                if(logger.isDebugEnabled()) {
                    logger.debug("REST EXCEPTION STATUS : " + exception.getResponse().getStatus());
                }
                if(exception.getResponse().getStatus() == NOT_FOUND.getCode()) {
                    return false;
                }
            } else {
                throw new VoldemortException("Unknown HTTP request execution exception: "
                                             + e.getMessage(), e);
View Full Code Here

                    logger.debug("Did not get any response!");
                }
            }
        } catch(ExecutionException e) {
            if(e.getCause() instanceof RestException) {
                RestException exception = (RestException) e.getCause();
                if(logger.isDebugEnabled()) {
                    logger.debug("REST EXCEPTION STATUS : " + exception.getResponse().getStatus());
                }

            } else {
                throw new VoldemortException("Unknown HTTP request execution exception: "
                                             + e.getMessage(), e);
View Full Code Here

            RestResponse response = fetchGetResponse(rb, FETCH_SCHEMA_TIMEOUT_MS);
            return response.getEntity().asString("UTF-8");
        } catch(ExecutionException e) {
            if(e.getCause() instanceof RestException) {
                RestException exception = (RestException) e.getCause();
                if(logger.isDebugEnabled()) {
                    logger.debug("REST EXCEPTION STATUS : " + exception.getResponse().getStatus());
                }
            } else {
                throw new VoldemortException("Unknown HTTP request execution exception: "
                                             + e.getMessage(), e);
            }
View Full Code Here

                    logger.debug("Empty response !");
                }
            }
        } catch(ExecutionException e) {
            if(e.getCause() instanceof RestException) {
                RestException exception = (RestException) e.getCause();
                if(logger.isDebugEnabled()) {
                    logger.debug("REST EXCEPTION STATUS : " + exception.getResponse().getStatus());
                }

                int httpErrorStatus = exception.getResponse().getStatus();
                if(httpErrorStatus == BAD_REQUEST.getCode()) {
                    throw new VoldemortException("Bad request: " + e.getMessage(), e);
                } else if(httpErrorStatus == PRECONDITION_FAILED.getCode()) {
                    throw new ObsoleteVersionException(e.getMessage());
                } else if(httpErrorStatus == REQUEST_TIMEOUT.getCode()
View Full Code Here

                    }
                }
            }
        } catch(ExecutionException e) {
            if(e.getCause() instanceof RestException) {
                RestException exception = (RestException) e.getCause();
                if(logger.isDebugEnabled()) {
                    logger.debug("REST EXCEPTION STATUS : " + exception.getResponse().getStatus());
                }
            } else {
                throw new VoldemortException("Unknown HTTP request execution exception: "
                                             + e.getMessage(), e);
            }
View Full Code Here

                    logger.debug("Did not get any response!");
                }
            }
        } catch(ExecutionException e) {
            if(e.getCause() instanceof RestException) {
                RestException exception = (RestException) e.getCause();
                if(logger.isDebugEnabled()) {
                    logger.debug("REST EXCEPTION STATUS : " + exception.getResponse().getStatus());
                }

            } else {
                throw new VoldemortException("Unknown HTTP request execution exception: "
                                             + e.getMessage(), e);
View Full Code Here

    }

    private void handleRequestAndResponseException(Exception e) {
        if(e instanceof ExecutionException) {
            if(e.getCause() instanceof RestException) {
                RestException re = (RestException) e.getCause();
                if(logger.isDebugEnabled()) {
                    logger.debug("REST Exception Status: " + re.getResponse().getStatus());
                }
            } else {
                throw new VoldemortException("Unknown HTTP request execution exception: "
                                             + e.getMessage(), e);
            }
View Full Code Here

                if(serializedVC != null && serializedVC.length() > 0) {
                    rb.setHeader(RestMessageHeaders.X_VOLD_VECTOR_CLOCK, serializedVC);
                }
            }

            RestRequest request = rb.build();
            Future<RestResponse> f = client.restRequest(request);

            // This will block
            RestResponse response = f.get();
            final ByteString entity = response.getEntity();
View Full Code Here

                                     this.routingTypeCode);
        }
        if(this.zoneId != INVALID_ZONE_ID) {
            requestBuilder.setHeader(RestMessageHeaders.X_VOLD_ZONE_ID, String.valueOf(this.zoneId));
        }
        RestRequest request = requestBuilder.build();
        Future<RestResponse> f = client.restRequest(request);
        // This will block
        return f.get();
    }
View Full Code Here

TOP

Related Classes of com.linkedin.r2.filter.FilterChain

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.