Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.4.0
-
Reviewed
Description
When reading the code, I found that some usage methods are outdated due to the upgrade of netty components.
1.DatanodeHttpServer#Constructor
@Deprecated public static final ChannelOption<Integer> WRITE_BUFFER_HIGH_WATER_MARK = valueOf("WRITE_BUFFER_HIGH_WATER_MARK"); Deprecated. Use WRITE_BUFFER_WATER_MARK @Deprecated public static final ChannelOption<Integer> WRITE_BUFFER_LOW_WATER_MARK = valueOf("WRITE_BUFFER_LOW_WATER_MARK"); Deprecated. Use WRITE_BUFFER_WATER_MARK ----- this.httpServer.childOption( ChannelOption.WRITE_BUFFER_HIGH_WATER_MARK, conf.getInt( DFSConfigKeys.DFS_WEBHDFS_NETTY_HIGH_WATERMARK, DFSConfigKeys.DFS_WEBHDFS_NETTY_HIGH_WATERMARK_DEFAULT)); this.httpServer.childOption( ChannelOption.WRITE_BUFFER_LOW_WATER_MARK, conf.getInt( DFSConfigKeys.DFS_WEBHDFS_NETTY_LOW_WATERMARK, DFSConfigKeys.DFS_WEBHDFS_NETTY_LOW_WATERMARK_DEFAULT));
2.Duplicate code
ChannelFuture f = httpServer.bind(infoAddr); try { f.syncUninterruptibly(); } catch (Throwable e) { if (e instanceof BindException) { throw NetUtils.wrapException(null, 0, infoAddr.getHostName(), infoAddr.getPort(), (SocketException) e); } else { throw e; } } httpAddress = (InetSocketAddress) f.channel().localAddress(); LOG.info("Listening HTTP traffic on " + httpAddress);
3.io.netty.bootstrap.ChannelFactory Deprecated
use io.netty.channel.ChannelFactory instead.
/** @deprecated */ @Deprecated public interface ChannelFactory<T extends Channel> { T newChannel(); }
Attachments
Issue Links
- links to