Github user navis commented on a diff in the pull request:
https://github.com/apache/tajo/pull/412#discussion_r26354442
--- Diff: tajo-rpc/src/main/java/org/apache/tajo/rpc/AsyncRpcClient.java ---
@@ -113,16 +87,11 @@ public void close() {
}
private class ProxyRpcChannel implements RpcChannel {
- private final ClientChannelInboundHandler handler;
-
- public ProxyRpcChannel() {
- this.handler = getChannel().pipeline()
- .get(ClientChannelInboundHandler.class);
+ private ClientChannelInboundHandler handler;
- if (handler == null) {
- throw new IllegalArgumentException("Channel does not have " +
- "proper handler");
- }
+ private ClientChannelInboundHandler handler() {
+ return handler == null ? handler = getChannel().pipeline()
--- End diff --
The code part cannot be reached if this connection is not acquired,
asserting the channel is established already. And callMethod() is already
regarding getChannel() returns not-null value. I'll add RuntimeException on
getChannel() if it can be null.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---