mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-02 12:17:43 +08:00
code style
This commit is contained in:
parent
d3a1da47a7
commit
3ba03213fe
@ -21,10 +21,8 @@ import org.apache.dolphinscheduler.rpc.common.RpcRequest;
|
||||
import org.apache.dolphinscheduler.rpc.common.RpcResponse;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
/**
|
||||
* RpcFuture
|
||||
@ -61,6 +59,7 @@ public class RpcFuture implements Future<Object> {
|
||||
|
||||
@Override
|
||||
public RpcResponse get() throws InterruptedException {
|
||||
// the timeout period should be defined by the business party
|
||||
boolean success = latch.await(5, TimeUnit.SECONDS);
|
||||
if (!success) {
|
||||
throw new RuntimeException("Timeout exception. Request id: " + this.requestId
|
||||
|
@ -33,7 +33,7 @@ public class UserService implements IUserService {
|
||||
@Override
|
||||
public Integer hi(int num) {
|
||||
|
||||
System.out.println("hihihihi+"+num);
|
||||
System.out.println("hihihihi+" + num);
|
||||
return ++num;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user