HDFS-17028. RBF: Optimize debug logs of class ConnectionPool and other related class. (#5694). Contributed by farmmamba.
Reviewed-by: Inigo Goiri <inigoiri@apache.org> Signed-off-by: Ayush Saxena <ayushsaxena@apache.org>
This commit is contained in:
parent
1d0c9ab433
commit
2243cfd225
|
@ -150,8 +150,8 @@ public class ConnectionContext {
|
|||
// this is an erroneous case, but we have to close the connection
|
||||
// anyway since there will be connection leak if we don't do so
|
||||
// the connection has been moved out of the pool
|
||||
LOG.error("Active connection with {} handlers will be closed",
|
||||
this.numThreads);
|
||||
LOG.error("Active connection with {} handlers will be closed, ConnectionContext is {}",
|
||||
this.numThreads, this);
|
||||
}
|
||||
this.closed = true;
|
||||
Object proxy = this.client.getProxy();
|
||||
|
@ -170,7 +170,10 @@ public class ConnectionContext {
|
|||
Class<?> clazz = proxy.getClass();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(clazz.getSimpleName())
|
||||
sb.append("hashcode:")
|
||||
.append(hashCode())
|
||||
.append(" ")
|
||||
.append(clazz.getSimpleName())
|
||||
.append("@")
|
||||
.append(addr)
|
||||
.append("x")
|
||||
|
|
|
@ -482,7 +482,7 @@ public class ConnectionManager {
|
|||
pool.getMaxSize(), pool);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
LOG.error("Cannot create a new connection", e);
|
||||
LOG.error("Cannot create a new connection for {} {}", pool, e);
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
LOG.error("The connection creator was interrupted");
|
||||
|
|
|
@ -286,8 +286,8 @@ public class ConnectionPool {
|
|||
}
|
||||
this.connections = tmpConnections;
|
||||
}
|
||||
LOG.debug("Expected to remove {} connection and actually removed {} connections",
|
||||
num, removed.size());
|
||||
LOG.debug("Expected to remove {} connection and actually removed {} connections "
|
||||
+ "for connectionPool: {}", num, removed.size(), connectionPoolId);
|
||||
return removed;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue