[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16102285#comment-16102285 ] Xiaobing Zhou commented on HBASE-18338: --- Nice to have this, thanks [~enis]. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Fix For: HBASE-14850 > > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch, > HBASE-18338.005.patch, HBASE-18338.006.patch, hbase-18338-addendum.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16095502#comment-16095502 ] Hadoop QA commented on HBASE-18338: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s{color} | {color:blue} Docker mode activated. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 4s{color} | {color:red} HBASE-18338 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.4.0/precommit-patchnames for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HBASE-18338 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12878265/HBASE-18338.006.patch | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/7740/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch, > HBASE-18338.005.patch, HBASE-18338.006.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16095472#comment-16095472 ] Xiaobing Zhou commented on HBASE-18338: --- Posted v6: # moved HBASE_CLIENT_RPC_TEST_MODE as suggested # did some code formatting. Simply passing IOBuf in and out in SaslHandler is tried, but RpcTestServer is not able to get any request. I'd debug this in follow up patch. Right now keep it as v5 is. Thanks for review [~enis]! > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch, > HBASE-18338.005.patch, HBASE-18338.006.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16095469#comment-16095469 ] Hadoop QA commented on HBASE-18338: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s{color} | {color:blue} Docker mode activated. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 4s{color} | {color:red} HBASE-18338 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.4.0/precommit-patchnames for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HBASE-18338 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12878263/HBASE-18338.006.patch | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/7739/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch, > HBASE-18338.005.patch, HBASE-18338.006.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16093873#comment-16093873 ] Enis Soztutar commented on HBASE-18338: --- bq. introduces Configuration::HBASE_CLIENT_RPC_TEST_MODE to bypass some code for RPC test only, otherwise tests will fail given RpcTestServer implementation. SaslHandler should behave as a transparent proxy for the unit tests, but it is also doing the connection preamble. Maybe that is why it was failing with the unit test. Can you please move the constants HBASE_CLIENT_RPC_TEST_MODE from Configuration to be somewhere else in the rpc-related classes. Maybe in RpcSerde or something. Instead of this: {code} + if (!conf_->GetBool( + Configuration::HBASE_CLIENT_RPC_TEST_MODE, + Configuration::DEFAULT_HBASE_CLIENT_RPC_TEST_MODE)) { +secure = security::User::IsSecurityEnabled(*conf_); +pipeline->addBack(SaslHandler{user_util_.user_name(secure), conf_}); + } {code} we should add the handler, but inside the handler, not write the preamble similar to how you have done it in the ClientHandler. Can you please run bin/format-code.sh inside the docker container, as well as make lint for the lint errors. Otherwise looks good. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch, > HBASE-18338.005.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16092370#comment-16092370 ] Hadoop QA commented on HBASE-18338: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s{color} | {color:blue} Docker mode activated. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 4s{color} | {color:red} HBASE-18338 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.4.0/precommit-patchnames for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HBASE-18338 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12877905/HBASE-18338.005.patch | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/7707/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch, > HBASE-18338.005.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16092369#comment-16092369 ] Xiaobing Zhou commented on HBASE-18338: --- posted patch v5. # reuses RpcClient in test # binds to port 0 to be ephemeral # throws exception in test # removes rpc-test-client.h and rpc-test-client-handler.h Let's refill the TODO in follow up patch, thanks [~enis] for reviews. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch, > HBASE-18338.005.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16090909#comment-16090909 ] Hadoop QA commented on HBASE-18338: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s{color} | {color:blue} Docker mode activated. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 5s{color} | {color:red} HBASE-18338 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.4.0/precommit-patchnames for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HBASE-18338 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12877688/HBASE-18338.004.patch | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/7687/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16090846#comment-16090846 ] Enis Soztutar commented on HBASE-18338: --- - {{rpc.h -> rpc-serde.h}} this is good. - Are these coming in this patch, or to be filled out later? {code} + } else if (method_name == "error") { +//TODO: + } else if (method_name == "pause") { +//TODO: + } else if (method_name == "addr") { +//TODO: + } {code} - Should this default to 0 so that OS will select an empty port for the unit test? {code} +DEFINE_int32(port, 8080, "test server port"); {code} - This does not fail the unit test, probably re-throw?: {code} + } catch (const std::exception& e) { +VLOG(2) << exceptionStr(e) << std::endl; + } {code} - Test server and handler looks good. bq. So reviews can skip rpc-test-client.h and rpc-test-client-handler.h. So, what is the plan for this patch? Commit these two classes for now, and remove them in the follow up patch? > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16090668#comment-16090668 ] Xiaobing Zhou commented on HBASE-18338: --- Posted v4: # add dispatch code to ping/echo/error ... implementation # did some refactoring to be modular. # did clean work Will reuse RpcClient in the next patch instead of rpc-test-client.h and rpc-test-client-handler.h which exist only for the reason of avoiding dependencies initially. So reviews can skip rpc-test-client.h and rpc-test-client-handler.h. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch, HBASE-18338.004.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16086635#comment-16086635 ] Xiaobing Zhou commented on HBASE-18338: --- Posted v3: # implemented Echo, however, there's no dispatch code to easily add other test functions # added unit test for Echo, see also hbase-rpc-test.cc Will add dispatch code based on method name for next and do some clean work. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch, HBASE-18338.003.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16084771#comment-16084771 ] Xiaobing Zhou commented on HBASE-18338: --- Posted v2: # being able to do ping/pong # removed Bonk and Xtruct # fixed all compile issues Will port protobuf types into RPC test client/server by protobuf-compiling test.proto and test_rpc_service.proto. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch, > HBASE-18338.002.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16081271#comment-16081271 ] Xiaobing Zhou commented on HBASE-18338: --- Posted v1. # learned from wangle RPC example, built an HBase test client and test server and the corresponding client/server handlers. # bridged native hbase::request and hbase::response into Bonk and Xtruct to do easy test Need some work to make it runnable in context of native hbase::request and hbase::response. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch, HBASE-18338.001.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-18338) [C++] Implement RpcTestServer
[ https://issues.apache.org/jira/browse/HBASE-18338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16078753#comment-16078753 ] Xiaobing Zhou commented on HBASE-18338: --- Posted v0. # simplified the implementation a lot. # added RpcTestServerHandler and RpcTestServerPipelineFactory # added test.proto and test_rpc_service.proto from Java side in order to implement server stubs like echo/ping Will add implementation of server stubs to hook protobuf engine into RpcTestServerHandler in next patch. > [C++] Implement RpcTestServer > - > > Key: HBASE-18338 > URL: https://issues.apache.org/jira/browse/HBASE-18338 > Project: HBase > Issue Type: Sub-task >Reporter: Xiaobing Zhou >Assignee: Xiaobing Zhou > Attachments: HBASE-18338.000.patch > > > This is a spin-off from HBASE-18078. We need RpcTestServer to simulate > various communication scenarios, e.g. timeout, connection aborted, long > running services and so on. -- This message was sent by Atlassian JIRA (v6.4.14#64029)