You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Philip Zeyliger (JIRA)" <ji...@apache.org> on 2009/10/16 05:22:31 UTC
[jira] Created: (AVRO-153) Naming conventions for avro records and
protocols
Naming conventions for avro records and protocols
-------------------------------------------------
Key: AVRO-153
URL: https://issues.apache.org/jira/browse/AVRO-153
Project: Avro
Issue Type: Improvement
Reporter: Philip Zeyliger
It would be nice to add a few paragraphs to the spec with suggested naming conventions. I'm ambivalent as to what they actually are, but while the paint hasn't fully settled, it might be nice to lead the project in one direction or another.
Any thoughts on what the best style here is?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AVRO-153) Naming conventions for avro records
and protocols
Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12778511#action_12778511 ]
Jeff Hammerbacher commented on AVRO-153:
----------------------------------------
Pulling in some comments from Doug on the dev mailing list about the expanded scope for this issue:
{quote}
The spec should be updated. Schemas can specify a namespace. If they're nested in another schema or protocol then the namespace defaults to the namespace of the containing schema or protocol.
Another thing that should be updated in the spec is that a name can be namespace-qualified. This is useful to refer to types in a different namespace, e.g., a field like:
{"name": "foo", "type": "org.apache.hadoop.util.MD5"}
This is related to https://issues.apache.org/jira/browse/AVRO-153.
The spec currently prohibits dots in identifiers. We should clarify that dots are permitted in namespaces, and that, if present in a name, the last dot separates the name from the namespace.
{quote}
> Naming conventions for avro records and protocols
> -------------------------------------------------
>
> Key: AVRO-153
> URL: https://issues.apache.org/jira/browse/AVRO-153
> Project: Avro
> Issue Type: Improvement
> Components: spec
> Reporter: Philip Zeyliger
>
> It would be nice to add a few paragraphs to the spec with suggested naming conventions. I'm ambivalent as to what they actually are, but while the paint hasn't fully settled, it might be nice to lead the project in one direction or another.
> Any thoughts on what the best style here is?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AVRO-153) Naming conventions for avro schemas,
records and protocols
Posted by "Jeff Hammerbacher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeff Hammerbacher updated AVRO-153:
-----------------------------------
Summary: Naming conventions for avro schemas, records and protocols (was: Naming conventions for avro records and protocols)
> Naming conventions for avro schemas, records and protocols
> ----------------------------------------------------------
>
> Key: AVRO-153
> URL: https://issues.apache.org/jira/browse/AVRO-153
> Project: Avro
> Issue Type: Improvement
> Components: spec
> Reporter: Philip Zeyliger
>
> It would be nice to add a few paragraphs to the spec with suggested naming conventions. I'm ambivalent as to what they actually are, but while the paint hasn't fully settled, it might be nice to lead the project in one direction or another.
> Any thoughts on what the best style here is?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AVRO-153) Naming conventions for avro records and
protocols
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Doug Cutting updated AVRO-153:
------------------------------
Component/s: spec
We currently define identifiers with:
{quote}
Record, field and enum names must:
- start with [A-Za-z_]
- subsequently contain only [A-Za-z0-9_]
{quote}
We however don't say anything about namespaces. I propose that namespaces must be a series of dot-delimited identifiers as defined above.
As for encouraged naming conventions, I'd opt for Java's:
- namespaces are hierarchical, with the root at left, starting with a reversed domain name.
- namespace elements are lowercase
- record and enum names are capitalized CamelCase
- field and message names are uncapitalized camelCase
- enum symbols are all-cap
- acronyms embeeded in names are capitalized, e.g., Md5Hash, BaseUrl, etc.
> Naming conventions for avro records and protocols
> -------------------------------------------------
>
> Key: AVRO-153
> URL: https://issues.apache.org/jira/browse/AVRO-153
> Project: Avro
> Issue Type: Improvement
> Components: spec
> Reporter: Philip Zeyliger
>
> It would be nice to add a few paragraphs to the spec with suggested naming conventions. I'm ambivalent as to what they actually are, but while the paint hasn't fully settled, it might be nice to lead the project in one direction or another.
> Any thoughts on what the best style here is?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.