提交 d3a1da47 编写于 作者: C CalvinKirs

code style

上级 45780793
......@@ -72,6 +72,7 @@ public class ConsumerInterceptor {
rsp = nettyClient.sendMsg(host, protocol, async);
} catch (InterruptedException e) {
logger.warn("send msg error ", e);
Thread.currentThread().interrupt();
}
//success
if (null != rsp && rsp.getStatus() == 0) {
......
......@@ -39,9 +39,9 @@ public class RpcFuture implements Future<Object> {
private long requestId;
public RpcFuture(RpcRequest rpcRequest,long requestId) {
public RpcFuture(RpcRequest rpcRequest, long requestId) {
this.request = rpcRequest;
this.requestId=requestId;
this.requestId = requestId;
}
@Override
......@@ -71,9 +71,9 @@ public class RpcFuture implements Future<Object> {
}
@Override
public RpcResponse get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
public RpcResponse get(long timeout, TimeUnit unit) throws InterruptedException {
boolean success = latch.await(timeout, unit);
if (!success) {
if (!success) {
throw new RuntimeException("Timeout exception. Request id: " + requestId
+ ". Request class name: " + this.request.getClassName()
+ ". Request method: " + this.request.getMethodName());
......
......@@ -21,6 +21,6 @@ import org.apache.dolphinscheduler.rpc.remote.NettyServer;
public class Server {
public static void main(String[] args) {
NettyServer nettyServer=new NettyServer(new NettyServerConfig());
NettyServer nettyServer = new NettyServer(new NettyServerConfig());
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册