Examples of RpcFailure


Examples of org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure

          throw ex;
        }
        break;

      case RESPONSE_FAILURE:
        RpcFailure failure = RpcFailure.parseFrom(new ByteBufInputStream(msg.pBody, msg.pBody.readableBytes()));
        queue.updateFailedFuture(msg.coordinationId, failure);
        if (RpcConstants.EXTRA_DEBUGGING)
          logger.debug("Updated rpc future with coordinationId {} with failure ", msg.coordinationId, failure);
        break;
View Full Code Here

Examples of org.apache.drill.exec.proto.GeneralRPCProtos.RpcFailure

          throw ex;
        }
        break;

      case RESPONSE_FAILURE:
        RpcFailure failure = RpcFailure.parseFrom(new ByteBufInputStream(msg.pBody, msg.pBody.readableBytes()));
        queue.updateFailedFuture(msg.coordinationId, failure);
        msg.release();
        if (RpcConstants.EXTRA_DEBUGGING)
          logger.debug("Updated rpc future with coordinationId {} with failure ", msg.coordinationId, failure);
        break;
View Full Code Here

Examples of org.apache.spark.network.protocol.RpcFailure

    TransportResponseHandler handler = new TransportResponseHandler(new LocalChannel());
    RpcResponseCallback callback = mock(RpcResponseCallback.class);
    handler.addRpcRequest(12345, callback);
    assertEquals(1, handler.numOutstandingRequests());

    handler.handle(new RpcFailure(54321, "uh-oh!")); // should be ignored
    assertEquals(1, handler.numOutstandingRequests());

    handler.handle(new RpcFailure(12345, "oh no"));
    verify(callback, times(1)).onFailure((Throwable) any());
    assertEquals(0, handler.numOutstandingRequests());
  }
View Full Code Here

Examples of org.apache.spark.network.protocol.RpcFailure

    testServerToClient(new ChunkFetchSuccess(new StreamChunkId(1, 2), new TestManagedBuffer(0)));
    testServerToClient(new ChunkFetchFailure(new StreamChunkId(1, 2), "this is an error"));
    testServerToClient(new ChunkFetchFailure(new StreamChunkId(1, 2), ""));
    testServerToClient(new RpcResponse(12345, new byte[0]));
    testServerToClient(new RpcResponse(12345, new byte[1000]));
    testServerToClient(new RpcFailure(0, "this is an error"));
    testServerToClient(new RpcFailure(0, ""));
  }
View Full Code Here

Examples of org.apache.spark.network.protocol.RpcFailure

          respond(new RpcResponse(req.requestId, response));
        }

        @Override
        public void onFailure(Throwable e) {
          respond(new RpcFailure(req.requestId, Throwables.getStackTraceAsString(e)));
        }
      });
    } catch (Exception e) {
      logger.error("Error while invoking RpcHandler#receive() on RPC id " + req.requestId, e);
      respond(new RpcFailure(req.requestId, Throwables.getStackTraceAsString(e)));
    }
  }
View Full Code Here

Examples of org.apache.spark.network.protocol.RpcFailure

      } else {
        outstandingRpcs.remove(resp.requestId);
        listener.onSuccess(resp.response);
      }
    } else if (message instanceof RpcFailure) {
      RpcFailure resp = (RpcFailure) message;
      RpcResponseCallback listener = outstandingRpcs.get(resp.requestId);
      if (listener == null) {
        logger.warn("Ignoring response for RPC {} from {} ({}) since it is not outstanding",
          resp.requestId, remoteAddress, resp.errorString);
      } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.