Package org.jboss.netty.handler.codec.http

Examples of org.jboss.netty.handler.codec.http.QueryStringDecoder


                TajoWorkerProtocol.PartitionType.HASH_PARTITION, intermediateEntries);

    List<String> taList = TUtil.newList();
    for (URI uri : uris) {
      final Map<String, List<String>> params =
          new QueryStringDecoder(uri).getParameters();
      taList.addAll(splitMaps(params.get("ta")));
    }

    int checkTaskId = 0;
    for (String ta : taList) {
View Full Code Here


    }
  }

  private QueryStringDecoder getDecoder(MessageEvent e) {
    HttpRequest request = (HttpRequest) e.getMessage();
    return new QueryStringDecoder(request.getUri());
  }
View Full Code Here

          || !ShuffleHeader.DEFAULT_HTTP_HEADER_VERSION.equals(
              request.getHeader(ShuffleHeader.HTTP_HEADER_VERSION))) {
        sendError(ctx, "Incompatible shuffle request version", BAD_REQUEST);
      }
      final Map<String,List<String>> q =
        new QueryStringDecoder(request.getUri()).getParameters();
      final List<String> keepAliveList = q.get("keepAlive");
      boolean keepAliveParam = false;
      if (keepAliveList != null && keepAliveList.size() == 1) {
        keepAliveParam = Boolean.valueOf(keepAliveList.get(0));
        if (LOG.isDebugEnabled()) {
View Full Code Here

      if (request.getMethod() != GET) {
          sendError(ctx, METHOD_NOT_ALLOWED);
          return;
      }
      final Map<String,List<String>> q =
        new QueryStringDecoder(request.getUri()).getParameters();
      final List<String> mapIds = splitMaps(q.get("map"));
      final List<String> reduceQ = q.get("reduce");
      final List<String> jobQ = q.get("job");
      if (LOG.isDebugEnabled()) {
        LOG.debug("RECV: " + request.getUri() +
View Full Code Here

                TajoWorkerProtocol.ShuffleType.HASH_SHUFFLE, intermediateEntries);

    List<String> taList = TUtil.newList();
    for (URI uri : uris) {
      final Map<String, List<String>> params =
          new QueryStringDecoder(uri).getParameters();
      taList.addAll(splitMaps(params.get("ta")));
    }

    int checkTaskId = 0;
    for (String ta : taList) {
View Full Code Here

      } else {
        // getPath() will return '/database'.
        databaseName = this.uri.getPath().split("/")[1];
      }

      params = new QueryStringDecoder(rawURI).getParameters();
    } catch (SQLException se) {
      throw se;
    } catch (Throwable t) { // for unexpected exceptions like ArrayIndexOutOfBoundsException.
      throw new SQLException("Invalid JDBC URI: " + rawURI, "TAJO-001");
    }
View Full Code Here

    req.bodyHandler(new Handler<Buffer>() {
        @Override
      public void handle(Buffer buff) {
        String contentType = req.headers().get("Content-Type");
        if ("application/x-www-form-urlencoded".equals(contentType)) {
          QueryStringDecoder qsd = new QueryStringDecoder(buff.toString(), false);
          Map<String, List<String>> params = qsd.getParameters();

          List<String> loginSessionIdList = params.get(JsonFieldConstants.SESSION_USER_ID);
          List<String> usernameList = params.get(JsonFieldConstants.SESSION_USERNAME);
          if (loginSessionIdList == null || loginSessionIdList.size() == 0 ||
              usernameList == null || usernameList.size() == 0) {
View Full Code Here

  @GET
  @Path("data/explore/tables")
  public void getTables(HttpRequest request, HttpResponder responder) {
    LOG.trace("Received get tables for current user");
    Map<String, List<String>> queryParams = new QueryStringDecoder(request.getUri()).getParameters();
    List<String> databaseNames = queryParams.get("db");
    try {
      responder.sendJson(HttpResponseStatus.OK, exploreService.getTables(
        (databaseNames != null && !databaseNames.isEmpty()) ? databaseNames.get(0) : null));
    } catch (ExploreException e) {
View Full Code Here

  @GET
  @Path("/data/explore/queries")
  public void getQueryLiveHandles(HttpRequest request, HttpResponder responder) {
    try {
      Map<String, List<String>> args = new QueryStringDecoder(request.getUri()).getParameters();

      int limit = args.containsKey("limit") ? Integer.parseInt(args.get("limit").get(0)) : 50;
      long offset = args.containsKey("offset") ? Long.parseLong(args.get("offset").get(0)) : Long.MAX_VALUE;
      String cursor = args.containsKey("cursor") ? args.get("cursor").get(0).toLowerCase() : "next";
View Full Code Here

          || !ShuffleHeader.DEFAULT_HTTP_HEADER_VERSION.equals(
              request.getHeader(ShuffleHeader.HTTP_HEADER_VERSION))) {
        sendError(ctx, "Incompatible shuffle request version", BAD_REQUEST);
      }
      final Map<String,List<String>> q =
        new QueryStringDecoder(request.getUri()).getParameters();
      final List<String> mapIds = splitMaps(q.get("map"));
      final List<String> reduceQ = q.get("reduce");
      final List<String> jobQ = q.get("job");
      if (LOG.isDebugEnabled()) {
        LOG.debug("RECV: " + request.getUri() +
View Full Code Here

TOP

Related Classes of org.jboss.netty.handler.codec.http.QueryStringDecoder

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.