|
20 | 20 |
|
21 | 21 | import static org.apache.hadoop.hbase.ipc.IPCUtil.toIOE; |
22 | 22 | import static org.apache.hadoop.hbase.ipc.IPCUtil.wrapException; |
23 | | - |
24 | | -import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; |
25 | | -import org.apache.hbase.thirdparty.com.google.common.base.Preconditions; |
26 | | -import org.apache.hbase.thirdparty.com.google.common.cache.CacheBuilder; |
27 | | -import org.apache.hbase.thirdparty.com.google.common.cache.CacheLoader; |
28 | | -import org.apache.hbase.thirdparty.com.google.common.cache.LoadingCache; |
29 | | -import org.apache.hbase.thirdparty.com.google.protobuf.BlockingRpcChannel; |
30 | | -import org.apache.hbase.thirdparty.com.google.protobuf.Descriptors; |
31 | | -import org.apache.hbase.thirdparty.com.google.protobuf.Message; |
32 | | -import org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel; |
33 | | -import org.apache.hbase.thirdparty.com.google.protobuf.RpcController; |
34 | | -import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException; |
35 | | -import org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback; |
36 | | - |
37 | | -import org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer; |
38 | | - |
39 | 23 | import java.io.IOException; |
40 | 24 | import java.net.InetSocketAddress; |
41 | 25 | import java.net.SocketAddress; |
|
52 | 36 | import java.util.concurrent.ScheduledFuture; |
53 | 37 | import java.util.concurrent.TimeUnit; |
54 | 38 | import java.util.concurrent.atomic.AtomicInteger; |
55 | | - |
56 | | -import java.util.stream.Collectors; |
57 | 39 | import org.apache.hadoop.conf.Configuration; |
58 | 40 | import org.apache.hadoop.hbase.HConstants; |
59 | 41 | import org.apache.hadoop.hbase.ServerName; |
60 | | -import org.apache.yetus.audience.InterfaceAudience; |
61 | | -import org.slf4j.Logger; |
62 | | -import org.slf4j.LoggerFactory; |
63 | 42 | import org.apache.hadoop.hbase.client.MetricsConnection; |
64 | 43 | import org.apache.hadoop.hbase.codec.Codec; |
65 | 44 | import org.apache.hadoop.hbase.codec.KeyValueCodec; |
|
74 | 53 | import org.apache.hadoop.ipc.RemoteException; |
75 | 54 | import org.apache.hadoop.security.token.TokenIdentifier; |
76 | 55 | import org.apache.hadoop.security.token.TokenSelector; |
77 | | - |
| 56 | +import org.apache.yetus.audience.InterfaceAudience; |
| 57 | +import org.slf4j.Logger; |
| 58 | +import org.slf4j.LoggerFactory; |
| 59 | +import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; |
| 60 | +import org.apache.hbase.thirdparty.com.google.common.base.Preconditions; |
| 61 | +import org.apache.hbase.thirdparty.com.google.common.cache.CacheBuilder; |
| 62 | +import org.apache.hbase.thirdparty.com.google.common.cache.CacheLoader; |
| 63 | +import org.apache.hbase.thirdparty.com.google.common.cache.LoadingCache; |
| 64 | +import org.apache.hbase.thirdparty.com.google.protobuf.BlockingRpcChannel; |
| 65 | +import org.apache.hbase.thirdparty.com.google.protobuf.Descriptors; |
| 66 | +import org.apache.hbase.thirdparty.com.google.protobuf.Message; |
| 67 | +import org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback; |
| 68 | +import org.apache.hbase.thirdparty.com.google.protobuf.RpcChannel; |
| 69 | +import org.apache.hbase.thirdparty.com.google.protobuf.RpcController; |
| 70 | +import org.apache.hbase.thirdparty.com.google.protobuf.ServiceException; |
| 71 | +import org.apache.hbase.thirdparty.io.netty.util.HashedWheelTimer; |
78 | 72 | import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos; |
79 | 73 |
|
80 | 74 | /** |
@@ -234,7 +228,9 @@ private void cleanupIdleConnections() { |
234 | 228 | // have some pending calls on connection so we should not shutdown the connection outside. |
235 | 229 | // The connection itself will disconnect if there is no pending call for maxIdleTime. |
236 | 230 | if (conn.getLastTouched() < closeBeforeTime && !conn.isActive()) { |
237 | | - if (LOG.isTraceEnabled()) LOG.trace("Cleanup idle connection to " + conn.remoteId().address); |
| 231 | + if (LOG.isTraceEnabled()) { |
| 232 | + LOG.trace("Cleanup idle connection to " + conn.remoteId().address); |
| 233 | + } |
238 | 234 | connections.removeValue(conn.remoteId(), conn); |
239 | 235 | conn.cleanupConnection(); |
240 | 236 | } |
|
0 commit comments