[
https://issues.apache.org/jira/browse/AVRO-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907281#action_12907281
]
Philip Zeyliger commented on AVRO-659:
--------------------------------------
Generically helping applications find a text file that they need to load in
their application is really up to the developer. AVRO shouldn't really get
involved at that layer. (In Java, you would just through it in your jar and
load it with getResource(). In python, good luck de-referencing __file__ and
hoping you're not in an egg, but that's a different story.
That said, there's nothing preventing us (or our users) from creating an
avsc2py program that maps "[null, int]" into a "schema.py" file with "SCHEMA =
'"[null, int]"'", i.e., creates a python file with the schema appropriately
escaped so that it can be loaded that way.
> Portable specification of the location of schema and protocol files
> -------------------------------------------------------------------
>
> Key: AVRO-659
> URL: https://issues.apache.org/jira/browse/AVRO-659
> Project: Avro
> Issue Type: New Feature
> Reporter: Jeff Hammerbacher
>
> Avro doesn't require code generation, which is great. However, if you want to
> use a protocol or a schema, your code needs to know where to find it. When
> your code is ported to new systems, the protocol or schema file must be
> placed in the same place as on the previous system for things to work
> correctly.
> For importing modules in a portable fashion, Python provides a default set of
> places it will look for modules and an environment variable called PYTHONPATH
> that programs can use to override these defaults. It may be useful to explore
> similar constructs for Avro implementations that don't do code generation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.