You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org> on 2009/12/01 14:28:20 UTC

[jira] Created: (AVRO-246) Java schema parser should take schema from InputStream in addition to file

Java schema parser should take schema from InputStream in addition to file
--------------------------------------------------------------------------

                 Key: AVRO-246
                 URL: https://issues.apache.org/jira/browse/AVRO-246
             Project: Avro
          Issue Type: Improvement
            Reporter: Thiruvalluvan M. G.
            Assignee: Thiruvalluvan M. G.
            Priority: Minor


Accepting the schema from an InputStream (in addition to the current File) enables many use-cases like taking schema from a resource in a jar file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-246) Java schema parser should take schema from InputStream in addition to file

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787639#action_12787639 ] 

Doug Cutting commented on AVRO-246:
-----------------------------------

+1 This looks good.  Can you also please add a simple javadoc comment, stating something like, "Construct a Schema from JSON text."  The parse(File) method also needs similar javadoc.

> Java schema parser should take schema from InputStream in addition to file
> --------------------------------------------------------------------------
>
>                 Key: AVRO-246
>                 URL: https://issues.apache.org/jira/browse/AVRO-246
>             Project: Avro
>          Issue Type: Improvement
>            Reporter: Thiruvalluvan M. G.
>            Assignee: Thiruvalluvan M. G.
>            Priority: Minor
>         Attachments: AVRO-246.patch, AVRO-246.patch
>
>
> Accepting the schema from an InputStream (in addition to the current File) enables many use-cases like taking schema from a resource in a jar file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-246) Java schema parser should take schema from InputStream in addition to file

Posted by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. updated AVRO-246:
-------------------------------------

    Attachment: AVRO-246.patch

Good point Doug.  Restored parse(File) to the original.

> Java schema parser should take schema from InputStream in addition to file
> --------------------------------------------------------------------------
>
>                 Key: AVRO-246
>                 URL: https://issues.apache.org/jira/browse/AVRO-246
>             Project: Avro
>          Issue Type: Improvement
>            Reporter: Thiruvalluvan M. G.
>            Assignee: Thiruvalluvan M. G.
>            Priority: Minor
>         Attachments: AVRO-246.patch, AVRO-246.patch
>
>
> Accepting the schema from an InputStream (in addition to the current File) enables many use-cases like taking schema from a resource in a jar file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-246) Java schema parser should take schema from InputStream in addition to file

Posted by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. updated AVRO-246:
-------------------------------------

    Status: Patch Available  (was: Open)

> Java schema parser should take schema from InputStream in addition to file
> --------------------------------------------------------------------------
>
>                 Key: AVRO-246
>                 URL: https://issues.apache.org/jira/browse/AVRO-246
>             Project: Avro
>          Issue Type: Improvement
>            Reporter: Thiruvalluvan M. G.
>            Assignee: Thiruvalluvan M. G.
>            Priority: Minor
>         Attachments: AVRO-246.patch
>
>
> Accepting the schema from an InputStream (in addition to the current File) enables many use-cases like taking schema from a resource in a jar file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-246) Java schema parser should take schema from InputStream in addition to file

Posted by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. updated AVRO-246:
-------------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Committed revision 888720 after adding comments and a test.

> Java schema parser should take schema from InputStream in addition to file
> --------------------------------------------------------------------------
>
>                 Key: AVRO-246
>                 URL: https://issues.apache.org/jira/browse/AVRO-246
>             Project: Avro
>          Issue Type: Improvement
>            Reporter: Thiruvalluvan M. G.
>            Assignee: Thiruvalluvan M. G.
>            Priority: Minor
>         Attachments: AVRO-246.patch, AVRO-246.patch
>
>
> Accepting the schema from an InputStream (in addition to the current File) enables many use-cases like taking schema from a resource in a jar file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AVRO-246) Java schema parser should take schema from InputStream in addition to file

Posted by "Thiruvalluvan M. G. (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AVRO-246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiruvalluvan M. G. updated AVRO-246:
-------------------------------------

    Attachment: AVRO-246.patch

This patch addresses the problem. Though I could have made Jackson accept java.io.File directly in File version of parse, I decided to delegate to to InputStream version so that there is no duplication of try/catch.

> Java schema parser should take schema from InputStream in addition to file
> --------------------------------------------------------------------------
>
>                 Key: AVRO-246
>                 URL: https://issues.apache.org/jira/browse/AVRO-246
>             Project: Avro
>          Issue Type: Improvement
>            Reporter: Thiruvalluvan M. G.
>            Assignee: Thiruvalluvan M. G.
>            Priority: Minor
>         Attachments: AVRO-246.patch
>
>
> Accepting the schema from an InputStream (in addition to the current File) enables many use-cases like taking schema from a resource in a jar file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AVRO-246) Java schema parser should take schema from InputStream in addition to file

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AVRO-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787145#action_12787145 ] 

Doug Cutting commented on AVRO-246:
-----------------------------------

The advantage of passing the File directly to Jackson is that Jackson can then generate error messages that include the file name and line number.

> Java schema parser should take schema from InputStream in addition to file
> --------------------------------------------------------------------------
>
>                 Key: AVRO-246
>                 URL: https://issues.apache.org/jira/browse/AVRO-246
>             Project: Avro
>          Issue Type: Improvement
>            Reporter: Thiruvalluvan M. G.
>            Assignee: Thiruvalluvan M. G.
>            Priority: Minor
>         Attachments: AVRO-246.patch
>
>
> Accepting the schema from an InputStream (in addition to the current File) enables many use-cases like taking schema from a resource in a jar file.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.