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

Enis Soztutar commented on HBASE-17051:
---------------------------------------

Thanks [~xiaobingo] for the patch. 

I'm getting a compilation error, is it only me? 
{code}
root@18181e5809da:/usr/src/hbase/hbase-native-client# make 
g++ -c connection/connection-pool-test.cc -o 
build/debug/connection/connection-pool-test.o -D_GLIBCXX_USE_CXX11_ABI=0 -g 
-Wall -std=c++14 -pedantic -fPIC -I. -Ibuild/
g++ -c connection/rpc-client.cc -o build/debug/connection/rpc-client.o 
-D_GLIBCXX_USE_CXX11_ABI=0 -g -Wall -std=c++14 -pedantic -fPIC -I. -Ibuild/
In file included from 
/usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h:33:0,
                 from /usr/include/c++/5/bits/allocator.h:46,
                 from /usr/include/c++/5/string:41,
                 from /usr/local/include/google/protobuf/message.h:114,
                 from ./connection/request.h:21,
                 from connection/rpc-client.h:22,
                 from connection/rpc-client.cc:20:
/usr/include/c++/5/ext/new_allocator.h: In instantiation of 'void 
__gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = 
google::protobuf::RpcChannel; _Args = {hbase::RpcChannelImplementation*&}; _Tp 
= google::protobuf::RpcChannel]':
/usr/include/c++/5/bits/alloc_traits.h:530:4:   required from 'static void 
std::allocator_traits<std::allocator<_CharT> 
>::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, 
_Up*, _Args&& ...) [with _Up = google::protobuf::RpcChannel; _Args = 
{hbase::RpcChannelImplementation*&}; _Tp = google::protobuf::RpcChannel; 
std::allocator_traits<std::allocator<_CharT> >::allocator_type = 
std::allocator<google::protobuf::RpcChannel>]'
/usr/include/c++/5/bits/shared_ptr_base.h:522:39:   required from 
'std::_Sp_counted_ptr_inplace<_Tp, _Alloc, 
_Lp>::_Sp_counted_ptr_inplace(_Alloc, _Args&& ...) [with _Args = 
{hbase::RpcChannelImplementation*&}; _Tp = google::protobuf::RpcChannel; _Alloc 
= std::allocator<google::protobuf::RpcChannel>; __gnu_cxx::_Lock_policy _Lp = 
(__gnu_cxx::_Lock_policy)2u]'
/usr/include/c++/5/bits/shared_ptr_base.h:617:4:   required from 
'std::__shared_count<_Lp>::__shared_count(std::_Sp_make_shared_tag, _Tp*, const 
_Alloc&, _Args&& ...) [with _Tp = google::protobuf::RpcChannel; _Alloc = 
std::allocator<google::protobuf::RpcChannel>; _Args = 
{hbase::RpcChannelImplementation*&}; __gnu_cxx::_Lock_policy _Lp = 
(__gnu_cxx::_Lock_policy)2u]'
/usr/include/c++/5/bits/shared_ptr_base.h:1097:35:   required from 
'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const 
_Alloc&, _Args&& ...) [with _Alloc = 
std::allocator<google::protobuf::RpcChannel>; _Args = 
{hbase::RpcChannelImplementation*&}; _Tp = google::protobuf::RpcChannel; 
__gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]'
/usr/include/c++/5/bits/shared_ptr.h:319:64:   required from 
'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, 
_Args&& ...) [with _Alloc = std::allocator<google::protobuf::RpcChannel>; _Args 
= {hbase::RpcChannelImplementation*&}; _Tp = google::protobuf::RpcChannel]'
/usr/include/c++/5/bits/shared_ptr.h:620:39:   required from 
'std::shared_ptr<_Tp1> std::allocate_shared(const _Alloc&, _Args&& ...) [with 
_Tp = google::protobuf::RpcChannel; _Alloc = 
std::allocator<google::protobuf::RpcChannel>; _Args = 
{hbase::RpcChannelImplementation*&}]'
/usr/include/c++/5/bits/shared_ptr.h:635:39:   required from 
'std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp = 
google::protobuf::RpcChannel; _Args = {hbase::RpcChannelImplementation*&}]'
connection/rpc-client.cc:120:46:   required from here
/usr/include/c++/5/ext/new_allocator.h:120:4: error: invalid new-expression of 
abstract class type 'google::protobuf::RpcChannel'
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
    ^
In file included from connection/rpc-client.h:28:0,
                 from connection/rpc-client.cc:20:
/usr/local/include/google/protobuf/service.h:269:26: note:   because the 
following virtual functions are pure within 'google::protobuf::RpcChannel':
 class LIBPROTOBUF_EXPORT RpcChannel {
                          ^
/usr/local/include/google/protobuf/service.h:279:16: note:      virtual void 
google::protobuf::RpcChannel::CallMethod(const 
google::protobuf::MethodDescriptor*, google::protobuf::RpcController*, const 
google::protobuf::Message*, google::protobuf::Message*, 
google::protobuf::Closure*)
   virtual void CallMethod(const MethodDescriptor* method,
                ^
Makefile:112: recipe for target 'build/debug/connection/rpc-client.o' failed
{code}

> libhbase++: implement RPC client and connection management
> ----------------------------------------------------------
>
>                 Key: HBASE-17051
>                 URL: https://issues.apache.org/jira/browse/HBASE-17051
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>         Attachments: HBASE-17051-HBASE-14850.000.patch, 
> HBASE-17051-HBASE-14850.001.patch, HBASE-17051-HBASE-14850.002.patch, 
> HBASE-17051-HBASE-14850.003.patch, HBASE-17051-HBASE-14850.004.patch, 
> HBASE-17051-HBASE-14850.005.patch
>
>
> This proposes building RPC client and connection management layer, which 
> supports the equivalent functions resides in RpcClient.java and 
> RpcConnection.java. Specifically, handler/pipeline concepts will be used for 
> implementation, similar to NettyRpcClient and NettyRpcConnection in java side.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to