You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Dan Burkert <db...@nearinfinity.com> on 2013/07/10 00:45:15 UTC

Protobuf message style

Google's protobuf style guide (https://developers.google.com/protocol-buffers/docs/style) lays out the convention that message field names should be underscore_seperated and services should be MixedCase.  The .proto's in trunk do not follow this style; instead they follow Java naming conventions.  The protobuf compiler will automatically change the style of names to match the language it is compiling for, but it is unable to do so if the protobuf style is not used.  As a result, using the HBase proto files from languages with different naming conventions than Java is a little bit more painful.

Since a core feature of moving to protobufs is opening the door to wire compatible implementations in other languages, I think this may want to be addressed.  This commit (https://github.com/danburkert/hbase/commit/6f23cb3a0da99c0cd6dbc6ac7c548dffb833e106) on my fork changes the naming convention in the protos.  As you can see, the resulting .java files that the protobuf compiler puts out are functionally the same (with the same correct Java naming style).  If requested I will happily create a JIRA and add the commit as a patch. 

-- 
Dan Burkert


Re: Protobuf message style

Posted by Stack <st...@duboce.net>.
On Tue, Jul 9, 2013 at 3:45 PM, Dan Burkert <db...@nearinfinity.com>wrote:

> Google's protobuf style guide (
> https://developers.google.com/protocol-buffers/docs/style) lays out the
> convention that message field names should be underscore_seperated and
> services should be MixedCase.  The .proto's in trunk do not follow this
> style; instead they follow Java naming conventions.  The protobuf compiler
> will automatically change the style of names to match the language it is
> compiling for, but it is unable to do so if the protobuf style is not used.
>  As a result, using the HBase proto files from languages with different
> naming conventions than Java is a little bit more painful.
>
> Since a core feature of moving to protobufs is opening the door to wire
> compatible implementations in other languages, I think this may want to be
> addressed.  This commit (
> https://github.com/danburkert/hbase/commit/6f23cb3a0da99c0cd6dbc6ac7c548dffb833e106)
> on my fork changes the naming convention in the protos.  As you can see,
> the resulting .java files that the protobuf compiler puts out are
> functionally the same (with the same correct Java naming style).  If
> requested I will happily create a JIRA and add the commit as a patch.
>

Please.  I'll commit.  Thanks Dan.
St.Ack