[jira] [Comment Edited] (HBASE-17754) [C++] RawAsyncTable

2017-03-15 Thread Enis Soztutar (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15926857#comment-15926857
 ] 

Enis Soztutar edited comment on HBASE-17754 at 3/15/17 10:07 PM:
-

Thanks for the new patch.

# We should keep the unit test. client-test is like system test.
# I was referring this
{noformat}
std::pair>,
  Future>  Get(const hbase::Get& get);
{noformat}
Why do we need the std::pair? Can we simplify this?
# This is the sequence of call
{noformat}
template 
std::shared_ptr 
RawAsyncTable::CreateCallerBuilder
{noformat}
returns builder, and builder->build() returns 
AsyncSingleRequestRpcRetryingCaller,
then AsyncSingleRequestRpcRetryingCaller.call() returns RESP which is the 
hbase::Result.
# you may need to do cast like this, std::shared_ptr itself is agnostic of 
polymorphism of the enclosed type.
{noformat}
115 std::shared_ptr RpcClient::CreateRpcChannel(const 
std::string ,
116 uint16_t port, std::shared_ptr ticket, int rpc_timeout) {
117 
118   std::shared_ptr channel = std::make_shared<
119   RpcChannelImplementation>(shared_from_this(), host, port, ticket,
120   rpc_timeout);
121 
122   /* static_pointer_cast is safe since RpcChannelImplementation derives
123* from RpcChannel, otherwise, dynamic_pointer_cast should be used. */
124   return std::static_pointer_cast(channel);
125 }
{noformat}
Otherwise, v2 looks fine.


was (Author: xiaobingo):
Thanks for the new patch.

# We should keep the unit test. client-test is like system test.
# I was referring this
{noformat}
std::pair>,
  Future>  Get(const hbase::Get& get);
{noformat}
Why do we need the std::pair? Can we simplify this?
# This is the sequence of call
{noformat}
template 
std::shared_ptr 
RawAsyncTable::CreateCallerBuilder
{noformat}
returns builder, and builder->build() returns 
AsyncSingleRequestRpcRetryingCaller,
then AsyncSingleRequestRpcRetryingCaller.call() returns RESP which is the 
hbase::Result.
{noformat}
# you may need to do cast like this, std::shared_ptr itself is agnostic of 
polymorphism of the enclosed type.
115 std::shared_ptr RpcClient::CreateRpcChannel(const 
std::string ,
116 uint16_t port, std::shared_ptr ticket, int rpc_timeout) {
117 
118   std::shared_ptr channel = std::make_shared<
119   RpcChannelImplementation>(shared_from_this(), host, port, ticket,
120   rpc_timeout);
121 
122   /* static_pointer_cast is safe since RpcChannelImplementation derives
123* from RpcChannel, otherwise, dynamic_pointer_cast should be used. */
124   return std::static_pointer_cast(channel);
125 }

Otherwise, v2 looks fine.

> [C++] RawAsyncTable
> ---
>
> Key: HBASE-17754
> URL: https://issues.apache.org/jira/browse/HBASE-17754
> Project: HBase
>  Issue Type: Sub-task
>Reporter: Enis Soztutar
>Assignee: Enis Soztutar
> Attachments: hbase-17754_v0.patch, hbase-17754_v1.patch, 
> hbase-17754-v2.patch
>
>
> We need RawAsyncTable to connect {{table.h}} to the async retrying callers. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Comment Edited] (HBASE-17754) [C++] RawAsyncTable

2017-03-15 Thread Xiaobing Zhou (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-17754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15926857#comment-15926857
 ] 

Xiaobing Zhou edited comment on HBASE-17754 at 3/15/17 8:00 PM:


Thanks for the new patch.

# We should keep the unit test. client-test is like system test.
# I was referring this
{noformat}
std::pair>,
  Future>  Get(const hbase::Get& get);
{noformat}
Why do we need the std::pair? Can we simplify this?
# This is the sequence of call
{noformat}
template 
std::shared_ptr 
RawAsyncTable::CreateCallerBuilder
{noformat}
returns builder, and builder->build() returns 
AsyncSingleRequestRpcRetryingCaller,
then AsyncSingleRequestRpcRetryingCaller.call() returns RESP which is the 
hbase::Result.
{noformat}
# you may need to do cast like this, std::shared_ptr itself is agnostic of 
polymorphism of the enclosed type.
115 std::shared_ptr RpcClient::CreateRpcChannel(const 
std::string ,
116 uint16_t port, std::shared_ptr ticket, int rpc_timeout) {
117 
118   std::shared_ptr channel = std::make_shared<
119   RpcChannelImplementation>(shared_from_this(), host, port, ticket,
120   rpc_timeout);
121 
122   /* static_pointer_cast is safe since RpcChannelImplementation derives
123* from RpcChannel, otherwise, dynamic_pointer_cast should be used. */
124   return std::static_pointer_cast(channel);
125 }

Otherwise, v2 looks fine.


was (Author: xiaobingo):
Thanks for the new patch.

# We should keep the unit test. client-test is like system test.

# I was referring this
{noformat}
std::pair>,
  Future>  Get(const hbase::Get& get);
{noformat}
Why do we need the std::pair? Can we simplify this?

# This is the sequence of call
{noformat}
template 
std::shared_ptr 
RawAsyncTable::CreateCallerBuilder
{noformat}
returns builder, and builder->build() returns 
AsyncSingleRequestRpcRetryingCaller,
then AsyncSingleRequestRpcRetryingCaller.call() returns RESP which is the 
hbase::Result.
{noformat}


# you may need to do cast like this, std::shared_ptr itself is agnostic of 
polymorphism of the enclosed type.
115 std::shared_ptr RpcClient::CreateRpcChannel(const 
std::string ,
116 uint16_t port, std::shared_ptr ticket, int rpc_timeout) {
117 
118   std::shared_ptr channel = std::make_shared<
119   RpcChannelImplementation>(shared_from_this(), host, port, ticket,
120   rpc_timeout);
121 
122   /* static_pointer_cast is safe since RpcChannelImplementation derives
123* from RpcChannel, otherwise, dynamic_pointer_cast should be used. */
124   return std::static_pointer_cast(channel);
125 }

Otherwise, v2 looks fine.

> [C++] RawAsyncTable
> ---
>
> Key: HBASE-17754
> URL: https://issues.apache.org/jira/browse/HBASE-17754
> Project: HBase
>  Issue Type: Sub-task
>Reporter: Enis Soztutar
>Assignee: Enis Soztutar
> Attachments: hbase-17754_v0.patch, hbase-17754_v1.patch, 
> hbase-17754-v2.patch
>
>
> We need RawAsyncTable to connect {{table.h}} to the async retrying callers. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)