[ https://issues.apache.org/jira/browse/HDFS-4866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13682913#comment-13682913 ]
Chris Nauroth commented on HDFS-4866: ------------------------------------- Recapping some offline discussion, the backwards-incompatibility is unavoidable. The RPC method name goes on the wire. Unfortunately, we have no choice but to make a backwards-incompatible change to enable a C client. At least the scope is limited to namenode protocol and not something more widely deployed like the client protocol. +1 for the patch. I plan to commit this and flag it as backwards-incompatible, but I'll wait one more day in case the other watchers on this issue want to offer additional feedback. Thinking ahead to future development using protobuf, we may want to declare a set of officially supported language bindings, take the union of all those languages' reserved words, and declare them off-limits in the proto specs. This could go into the code review checklist as a reminder. > Protocol buffer support cannot compile under C > ---------------------------------------------- > > Key: HDFS-4866 > URL: https://issues.apache.org/jira/browse/HDFS-4866 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 3.0.0, 2.1.0-beta > Reporter: Ralph Castain > Assignee: Arpit Agarwal > Priority: Blocker > Attachments: HDFS-4866.branch-2.001.patch, HDFS-4866.trunk.001.patch, > NamenodeProtocol.pb-c.c, NamenodeProtocol.pb-c.h, pcreate.pl > > > 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