[
https://issues.apache.org/jira/browse/HADOOP-9606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13669877#comment-13669877
]
Ralph Castain commented on HADOOP-9606:
---------------------------------------
Details of the error when executing the protobuf-c parser on
NamenodeProtocol.proto:
protoc-c --c_out=. -I . -I<path-to-other-imports> NamenodeProtocol.proto
The "register" function appears on line 714 of the resulting
NamenodeProtocol.pb-c.h file:
{code}
void (*register)(Hadoop__Hdfs__NamenodeProtocolService_Service *service,
const Hadoop__Hdfs__RegisterRequestProto *input,
Hadoop__Hdfs__RegisterResponseProto_Closure closure,
void *closure_data);
{code}
It's a direct consequence of line 228 in the .proto file:
{code}
/*
* Request to register a sub-ordinate namenode
*/
rpc register(RegisterRequestProto) returns(RegisterResponseProto);
{code}
The rpc needs to be renamed to something non-reserved.
> Protocol buffer support cannot compile under C
> ----------------------------------------------
>
> Key: HADOOP-9606
> URL: https://issues.apache.org/jira/browse/HADOOP-9606
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 2.0.4-alpha
> Reporter: Ralph Castain
>
> When compiling Hadoop's .proto descriptions for use in C, an error occurs
> because one of the RPC's in NamenodeProtocol.proto is named "register". This
> name is a reserved word in languages such as C. When using the Java and C++
> languages, the name is hidden inside a class and therefore doesn't cause an
> error. Unfortunately, that is not the case in non-class languages such as C.
> Note: generating the C translation of the .proto files requires installation
> of the protobuf-c package from google:
> http://code.google.com/p/protobuf-c/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira