[jira] [Comment Edited] (YARN-8763) Add WebSocket logic to the Node Manager web server to establish servlet
[ https://issues.apache.org/jira/browse/YARN-8763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16640482#comment-16640482 ] Zian Chen edited comment on YARN-8763 at 10/6/18 12:01 AM: --- [~eyang] sorry for getting back late. I'm curious why TestContainerManager been triggered too. Anyway, i tried the patch 004 locally and TestContainerManager UTs all passed, And I updated patch 005 with your suggestions. Let's see how patch-005 goes. was (Author: zian chen): [~eyang] sorry for getting back late. I'm curious why TestContainerManager been triggered too. Anyway, i tried the patch 003 locally and TestContainerManager UTs all passed, And I updated patch 004 with your suggestions. Let's see how patch-004 goes. > Add WebSocket logic to the Node Manager web server to establish servlet > --- > > Key: YARN-8763 > URL: https://issues.apache.org/jira/browse/YARN-8763 > Project: Hadoop YARN > Issue Type: Sub-task >Reporter: Zian Chen >Assignee: Zian Chen >Priority: Major > Labels: Docker > Attachments: YARN-8763-001.patch, YARN-8763.002.patch, > YARN-8763.003.patch, YARN-8763.004.patch > > > The reason we want to use WebSocket servlet to serve the backend instead of > establishing the connection through HTTP is that WebSocket solves a few > issues with HTTP which needed for our scenario, > # In HTTP, the request is always initiated by the client and the response is > processed by the server — making HTTP a unidirectional protocol, while web > socket provides the Bi-directional protocol which means either client/server > can send a message to the other party. > # Full-duplex communication — client and server can talk to each other > independently at the same time > # Single TCP connection — After upgrading the HTTP connection in the > beginning, client and server communicate over that same TCP connection > throughout the lifecycle of WebSocket connection -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org
[jira] [Comment Edited] (YARN-8763) Add WebSocket logic to the Node Manager web server to establish servlet
[ https://issues.apache.org/jira/browse/YARN-8763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16637100#comment-16637100 ] Eric Yang edited comment on YARN-8763 at 10/3/18 3:47 PM: -- [~Zian Chen] Thank you for the patch. A few minor problems: {code} +@WebServlet(urlPatterns="/container/$containerId") {code} I think it should be written as: {code} +@WebServlet(urlPatterns="/container/*") {code} As far as I can tell, $containerId is not used in the code, nor the correct way to express WebServlet annotation expression. ContainerShellClientSocket needs to be renamed to ContainerShellClientSocketTest for testing purpose only. We need to write a real version of ContainerShellClientSocket in src/main in YARN-8778. Check style and findbugs errors needs to be cleaned up. The rest of the patch looks good. TestNNProxy unit test failure is not related to this patch. was (Author: eyang): [~Zian Chen] Thank you for the patch. A few minor problems: {code} +@WebServlet(urlPatterns="/container/$containerId") {code} I think it should be written as: {code} +@WebServlet(urlPatterns="/container/*") {code} As far as I can tell, $containerId is not used in the code, nor the correct way to express WebServlet annotation expression. ContainerShellClientSocket needs to be renamed to ContainerShellClientSocketTest for testing purpose only. We need to write a real version of ContainerShellClientSocket in src/main in YARN-8778. Check style and findbugs errors needs to be cleaned up. The rest of the patch looks good. > Add WebSocket logic to the Node Manager web server to establish servlet > --- > > Key: YARN-8763 > URL: https://issues.apache.org/jira/browse/YARN-8763 > Project: Hadoop YARN > Issue Type: Sub-task >Reporter: Zian Chen >Assignee: Zian Chen >Priority: Major > Labels: Docker > Attachments: YARN-8763-001.patch, YARN-8763.002.patch, > YARN-8763.003.patch > > > The reason we want to use WebSocket servlet to serve the backend instead of > establishing the connection through HTTP is that WebSocket solves a few > issues with HTTP which needed for our scenario, > # In HTTP, the request is always initiated by the client and the response is > processed by the server — making HTTP a unidirectional protocol, while web > socket provides the Bi-directional protocol which means either client/server > can send a message to the other party. > # Full-duplex communication — client and server can talk to each other > independently at the same time > # Single TCP connection — After upgrading the HTTP connection in the > beginning, client and server communicate over that same TCP connection > throughout the lifecycle of WebSocket connection -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org