[
https://issues.apache.org/jira/browse/HADOOP-11245?focusedWorklogId=584932&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-584932
]
ASF GitHub Bot logged work on HADOOP-11245:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 19/Apr/21 07:37
Start Date: 19/Apr/21 07:37
Worklog Time Spent: 10m
Work Description: jojochuang commented on a change in pull request #2832:
URL: https://github.com/apache/hadoop/pull/2832#discussion_r615608993
##########
File path:
hadoop-common-project/hadoop-nfs/src/main/java/org/apache/hadoop/oncrpc/SimpleTcpClient.java
##########
@@ -48,40 +47,42 @@ public SimpleTcpClient(String host, int port, XDR request,
Boolean oneShot) {
this.request = request;
this.oneShot = oneShot;
}
-
- protected ChannelPipelineFactory setPipelineFactory() {
- this.pipelineFactory = new ChannelPipelineFactory() {
+
+ protected ChannelInitializer<SocketChannel> setChannelHandler() {
+ return new ChannelInitializer<SocketChannel>() {
@Override
- public ChannelPipeline getPipeline() {
- return Channels.pipeline(
+ protected void initChannel(SocketChannel ch) throws Exception {
+ ChannelPipeline p = ch.pipeline();
+ p.addLast(
RpcUtil.constructRpcFrameDecoder(),
- new SimpleTcpClientHandler(request));
+ new SimpleTcpClientHandler(request)
+ );
}
};
- return this.pipelineFactory;
}
public void run() {
// Configure the client.
- ChannelFactory factory = new NioClientSocketChannelFactory(
- Executors.newCachedThreadPool(), Executors.newCachedThreadPool(), 1,
1);
- ClientBootstrap bootstrap = new ClientBootstrap(factory);
-
- // Set up the pipeline factory.
- bootstrap.setPipelineFactory(setPipelineFactory());
+ NioEventLoopGroup workerGroup = new NioEventLoopGroup();
Review comment:
it's actually used by UT only. I'll add @VisibleForTesting to make it
clear.
(The only exception is TestOutOfOrderWrite class. It is a test but written
in a standalone application style, not in JUnit style. So, still a test)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 584932)
Time Spent: 2.5h (was: 2h 20m)
> Update NFS gateway to use Netty4
> --------------------------------
>
> Key: HADOOP-11245
> URL: https://issues.apache.org/jira/browse/HADOOP-11245
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: nfs
> Reporter: Brandon Li
> Assignee: Wei-Chiu Chuang
> Priority: Major
> Labels: pull-request-available
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]