Examples of RpcException


Examples of org.apache.drill.exec.rpc.RpcException

    return new ServerHandshakeHandler<UserToBitHandshake>(RpcType.HANDSHAKE, UserToBitHandshake.PARSER){

      @Override
      public MessageLite getHandshakeResponse(UserToBitHandshake inbound) throws Exception {
        logger.debug("Handling handshake from user to bit. {}", inbound);
        if(inbound.getRpcVersion() != UserRpcConfig.RPC_VERSION) throw new RpcException(String.format("Invalid rpc version.  Expected %d, actual %d.", inbound.getRpcVersion(), UserRpcConfig.RPC_VERSION));
        return BitToUserHandshake.newBuilder().setRpcVersion(UserRpcConfig.RPC_VERSION).build();
      }

    };
  }
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

    case RpcType.QUERY_HANDLE_VALUE:
      return QueryId.getDefaultInstance();
    case RpcType.QUERY_RESULT_VALUE:
      return QueryResult.getDefaultInstance();
    }
    throw new RpcException(String.format("Unable to deal with RpcType of %d", rpcType));
  }
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

    switch (rpcType) {
    case RpcType.QUERY_RESULT_VALUE:
      queryResultHandler.batchArrived(pBody, dBody);
      return new Response(RpcType.ACK, Ack.getDefaultInstance());
    default:
      throw new RpcException(String.format("Unknown Rpc Type %d. ", rpcType));
    }

  }
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

  @Override
  protected void validateHandshake(BitToUserHandshake inbound) throws RpcException {
    logger.debug("Handling handshake from bit to user. {}", inbound);
    if (inbound.getRpcVersion() != UserRpcConfig.RPC_VERSION)
      throw new RpcException(String.format("Invalid rpc version.  Expected %d, actual %d.", inbound.getRpcVersion(),
          UserRpcConfig.RPC_VERSION));

  }
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

      try {
        FragmentRecordBatch header = get(pBody, FragmentRecordBatch.PARSER);
        incomingRecordBatch(connection, header, dBody);
        return BitRpcConfig.OK;
      } catch (FragmentSetupException e) {
        throw new RpcException("Failure receiving record batch.", e);
      }

    default:
      throw new RpcException("Not yet supported.");
    }

  }
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

    return new ServerHandshakeHandler<BitHandshake>(RpcType.HANDSHAKE, BitHandshake.PARSER){
     
      @Override
      public MessageLite getHandshakeResponse(BitHandshake inbound) throws Exception {
//        logger.debug("Handling handshake from other bit. {}", inbound);
        if(inbound.getRpcVersion() != BitRpcConfig.RPC_VERSION) throw new RpcException(String.format("Invalid rpc version.  Expected %d, actual %d.", inbound.getRpcVersion(), BitRpcConfig.RPC_VERSION));
        if(!inbound.hasEndpoint() || inbound.getEndpoint().getAddress().isEmpty() || inbound.getEndpoint().getBitPort() < 1) throw new RpcException(String.format("RPC didn't provide valid counter endpoint information.  Received %s.", inbound.getEndpoint()));
        connection.setEndpoint(inbound.getEndpoint());

        // add the
        BitConnectionManager manager = connectionRegistry.getConnectionManager(inbound.getEndpoint());
       
View Full Code Here

Examples of org.apache.drill.exec.rpc.RpcException

    return handler.handle(connection, rpcType, pBody, dBody);
  }

  @Override
  protected void validateHandshake(BitHandshake handshake) throws RpcException {
    if(handshake.getRpcVersion() != BitRpcConfig.RPC_VERSION) throw new RpcException(String.format("Invalid rpc version.  Expected %d, actual %d.", handshake.getRpcVersion(), BitRpcConfig.RPC_VERSION));
  }
View Full Code Here

Examples of org.eclipse.ecf.remoteservice.rpc.RpcException

    return result;
  }

  protected void handleException(String message, Throwable e) throws RpcException {
    logException(message, e);
    throw new RpcException(message, e);
  }
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcException

        final OtpErlangObject res = backend.call(ERLIDE_BUILDER, "source_clash", "ls",
                (Object) dirList);
        if (res instanceof OtpErlangList) {
            return (OtpErlangList) res;
        }
        throw new RpcException("bad result from erlide_builder:source_clash: " + res);
    }
View Full Code Here

Examples of org.erlide.runtime.rpc.RpcException

            final OtpMbox mbox = localNode.createMbox();
            args1[0] = mbox.self();
            new RpcResultReceiver(mbox, cb);
            rpcCast(localNode, nodeName, false, gleader, m, f, signature, args1);
        } catch (final SignatureException e) {
            throw new RpcException(e);
        }
    }
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.