/** * Intentionally make this method package-private, avoiding user directly * new an instance through this constructor. * * @param rpcConnectionKey RpcConnectionKey * @param eventLoopGroup Thread pool of netty's * @param rpcParams Rpc connection parameters (see RpcConstants) * * @throws ClassNotFoundException * @throws NoSuchMethodException * @see RpcConstants */ public BlockingRpcClient(EventLoopGroup eventLoopGroup, RpcConnectionKey rpcConnectionKey, Properties rpcParams) throws ClassNotFoundException, NoSuchMethodException { super(rpcConnectionKey, rpcParams); this.stubMethod = getServiceClass().getMethod("newBlockingStub", BlockingRpcChannel.class); this.rpcChannel = new ProxyRpcChannel(); this.handler = new ClientChannelInboundHandler(); long socketTimeoutMills = Long.parseLong( rpcParams.getProperty(CLIENT_SOCKET_TIMEOUT, String.valueOf(CLIENT_SOCKET_TIMEOUT_DEFAULT))); // Enable proactive hang detection final boolean hangDetectionEnabled = Boolean.parseBoolean( rpcParams.getProperty(CLIENT_HANG_DETECTION, String.valueOf(CLIENT_HANG_DETECTION_DEFAULT))); init(new ProtoClientChannelInitializer(handler, RpcResponse.getDefaultInstance(), socketTimeoutMills, hangDetectionEnabled), eventLoopGroup); }
BlockingRpcClient(RpcConnectionKey rpcConnectionKey, int retries, int idleTimeSeconds) throws ClassNotFoundException, NoSuchMethodException { super(rpcConnectionKey, retries); stubMethod = getServiceClass().getMethod("newBlockingStub", BlockingRpcChannel.class); rpcChannel = new ProxyRpcChannel(); inboundHandler = new ClientChannelInboundHandler(); init(new ProtoChannelInitializer(inboundHandler, RpcResponse.getDefaultInstance(), idleTimeSeconds)); }
AsyncRpcClient(RpcConnectionKey rpcConnectionKey, int retries, int idleTimeSeconds) throws ClassNotFoundException, NoSuchMethodException { super(rpcConnectionKey, retries); stubMethod = getServiceClass().getMethod("newStub", RpcChannel.class); rpcChannel = new ProxyRpcChannel(); inboundHandler = new ClientChannelInboundHandler(); init(new ProtoChannelInitializer(inboundHandler, RpcResponse.getDefaultInstance(), idleTimeSeconds)); }
public Builder mergeFrom(org.apache.tajo.rpc.RpcProtos.RpcResponse other) { if (other == org.apache.tajo.rpc.RpcProtos.RpcResponse.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); } if (other.hasResponseMessage()) { setResponseMessage(other.getResponseMessage()); } if (other.hasErrorClass()) { bitField0_ |= 0x00000004; errorClass_ = other.errorClass_; onChanged(); } if (other.hasErrorMessage()) { bitField0_ |= 0x00000008; errorMessage_ = other.errorMessage_; onChanged(); } if (other.hasErrorTrace()) { bitField0_ |= 0x00000010; errorTrace_ = other.errorTrace_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.tajo.rpc.RpcProtos.RpcResponse other) { if (other == org.apache.tajo.rpc.RpcProtos.RpcResponse.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); } if (other.hasResponseMessage()) { setResponseMessage(other.getResponseMessage()); } if (other.hasErrorClass()) { bitField0_ |= 0x00000004; errorClass_ = other.errorClass_; onChanged(); } if (other.hasErrorMessage()) { bitField0_ |= 0x00000008; errorMessage_ = other.errorMessage_; onChanged(); } if (other.hasErrorTrace()) { bitField0_ |= 0x00000010; errorTrace_ = other.errorTrace_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public org.apache.tajo.rpc.RpcProtos.RpcResponse getDefaultInstanceForType() { return org.apache.tajo.rpc.RpcProtos.RpcResponse.getDefaultInstance(); }
public org.apache.tajo.rpc.RpcProtos.RpcResponse getDefaultInstanceForType() { return org.apache.tajo.rpc.RpcProtos.RpcResponse.getDefaultInstance(); }
public org.apache.tajo.rpc.RpcProtos.RpcResponse getDefaultInstanceForType() { return org.apache.tajo.rpc.RpcProtos.RpcResponse.getDefaultInstance(); }
/** * <code>optional bytes response_message = 2;</code> */ public Builder clearResponseMessage() { bitField0_ = (bitField0_ & ~0x00000002); responseMessage_ = getDefaultInstance().getResponseMessage(); onChanged(); return this; }
/** * <code>optional string error_class = 3;</code> */ public Builder clearErrorClass() { bitField0_ = (bitField0_ & ~0x00000004); errorClass_ = getDefaultInstance().getErrorClass(); onChanged(); return this; } /**
/** * <code>optional bytes response_message = 2;</code> */ public Builder clearResponseMessage() { bitField0_ = (bitField0_ & ~0x00000002); responseMessage_ = getDefaultInstance().getResponseMessage(); onChanged(); return this; }
/** * <code>optional string error_trace = 5;</code> */ public Builder clearErrorTrace() { bitField0_ = (bitField0_ & ~0x00000010); errorTrace_ = getDefaultInstance().getErrorTrace(); onChanged(); return this; } /**
/** * <code>optional bytes response_message = 2;</code> */ public Builder clearResponseMessage() { bitField0_ = (bitField0_ & ~0x00000002); responseMessage_ = getDefaultInstance().getResponseMessage(); onChanged(); return this; }
/** * <code>optional string error_message = 4;</code> */ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000008); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } /**
/** * <code>optional string error_class = 3;</code> */ public Builder clearErrorClass() { bitField0_ = (bitField0_ & ~0x00000004); errorClass_ = getDefaultInstance().getErrorClass(); onChanged(); return this; } /**
/** * <code>optional string error_trace = 5;</code> */ public Builder clearErrorTrace() { bitField0_ = (bitField0_ & ~0x00000010); errorTrace_ = getDefaultInstance().getErrorTrace(); onChanged(); return this; } /**
/** * <code>optional string error_message = 4;</code> */ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000008); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } /**
/** * <code>optional string error_message = 4;</code> */ public Builder clearErrorMessage() { bitField0_ = (bitField0_ & ~0x00000008); errorMessage_ = getDefaultInstance().getErrorMessage(); onChanged(); return this; } /**
/** * <code>optional string error_trace = 5;</code> */ public Builder clearErrorTrace() { bitField0_ = (bitField0_ & ~0x00000010); errorTrace_ = getDefaultInstance().getErrorTrace(); onChanged(); return this; } /**
/** * <code>optional string error_class = 3;</code> */ public Builder clearErrorClass() { bitField0_ = (bitField0_ & ~0x00000004); errorClass_ = getDefaultInstance().getErrorClass(); onChanged(); return this; } /**