Removing CustomThreadedSelectorServer.java#6454
Conversation
| TServerUtils.clientAddress | ||
| .set(sock.getInetAddress().getHostAddress() + ":" + sock.getPort()); |
There was a problem hiding this comment.
I believe all of this custom stuff is just to extract this client address from the socket, so we can use it elsewhere (probably for logging). I don't think we can delete this without replacing it with a different mechanism to get the client address.
The field we are using reflection to read used to be accessible in previous versions of Thrift, and then it was made private, which caused us to make this class to work around that. We may still need this workaround, unless Thrift provided another means to obtain the client address from the connection.
There was a problem hiding this comment.
It looks like TSocket, TNonblockingSocket and TNonblockingSSLSocket now implement https://github.com/apache/thrift/blob/master/lib/java/src/main/java/org/apache/thrift/transport/SocketAddressProvider.java. We should probably use those methods to get both the local and remote addresses.
Investigated relevance of CustomThreadedSelectorServer.java
return new ServerAddress(new CustomThreadedSelectorServer(options), address);Result: