1.表象
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:113)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.lambda$execute$1(OpenConnectionCommand.java:97)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2.深究原因,找到日志在
启动SQuirreL,可以通过Windows->View SQuirrel Logs查看运行日志。
看到 could not resolve do2cloud02 , please check your network
在hosts文件加了记录后问题解决
参考:https://yq.aliyun.com/articles/630486
http://hbase.group/question/200
用一个例子来演示会更加清晰
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
1 FutureTask实现原理 下图所示为FutureTask的继承关系,我们以此为基础分析一下Future接口的具体实现; 2 FutureTask七种任务状态 future task内部定义了任务执行的七种状态,如下所示: 状态的流转可以简单总结如下: …