[
https://issues.apache.org/jira/browse/STORM-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403717#comment-15403717
]
ASF GitHub Bot commented on STORM-1038:
---------------------------------------
Github user satishd commented on a diff in the pull request:
https://github.com/apache/storm/pull/1591#discussion_r73129527
--- Diff:
storm-core/src/jvm/org/apache/storm/messaging/netty/KerberosSaslClientHandler.java
---
@@ -46,56 +44,48 @@ public KerberosSaslClientHandler(ISaslClient client,
Map storm_conf, String jaas
}
@Override
- public void channelConnected(ChannelHandlerContext ctx,
- ChannelStateEvent event) {
+ public void channelActive(ChannelHandlerContext ctx) throws Exception {
// register the newly established channel
- Channel channel = ctx.getChannel();
- client.channelConnected(channel);
+ Channel channel = ctx.channel();
+ client.channelReady();
LOG.info("Connection established from {} to {}",
- channel.getLocalAddress(), channel.getRemoteAddress());
+ channel.localAddress(), channel.remoteAddress());
try {
- KerberosSaslNettyClient saslNettyClient =
KerberosSaslNettyClientState.getKerberosSaslNettyClient
- .get(channel);
+ KerberosSaslNettyClient saslNettyClient =
channel.attr(KerberosSaslNettyClientState.KERBEROS_SASL_NETTY_CLIENT).get();
if (saslNettyClient == null) {
LOG.debug("Creating saslNettyClient now for channel: {}",
channel);
saslNettyClient = new KerberosSaslNettyClient(storm_conf,
jaas_section);
-
KerberosSaslNettyClientState.getKerberosSaslNettyClient.set(channel,
-
saslNettyClient);
+
channel.attr(KerberosSaslNettyClientState.KERBEROS_SASL_NETTY_CLIENT).set(saslNettyClient);
}
LOG.debug("Going to initiate Kerberos negotiations.");
byte[] initialChallenge = saslNettyClient.saslResponse(new
SaslMessageToken(new byte[0]));
LOG.debug("Sending initial challenge: {}", initialChallenge);
- channel.write(new SaslMessageToken(initialChallenge));
+ channel.writeAndFlush(new SaslMessageToken(initialChallenge));
--- End diff --
Why is it changed to use `writeAndFlush`?
> Upgrade netty transport from 3.x to 4.x
> ---------------------------------------
>
> Key: STORM-1038
> URL: https://issues.apache.org/jira/browse/STORM-1038
> Project: Apache Storm
> Issue Type: Dependency upgrade
> Components: storm-core
> Reporter: Hang Sun
> Priority: Minor
> Labels: performance
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> It will be nice to upgrade netty to 4.x to take advantage of its more
> efficient memory usage.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)