avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Fung JP (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AVRO-1724) avrogen.exe "import" handling
Date Tue, 01 Sep 2015 08:16:46 GMT
Norman Fung JP created AVRO-1724:

             Summary: avrogen.exe "import" handling
                 Key: AVRO-1724
                 URL: https://issues.apache.org/jira/browse/AVRO-1724
             Project: Avro
          Issue Type: Bug
            Reporter: Norman Fung JP

I have two simple JSON Schema in SAMEfolder:

Content in "simpleA.avsc" as follows:
 "namespace": "com.bearstearns",
 "type": "record",
 "name": "simpleA",
 "imports": ["simpleB.avsc"],

Content in "simpleB.avsc" as follows:
{"namespace": "com.bearstearns",
 "type": "record",
 "name": "simpleB",

Avrogen can be downloaded from Download from http://apache.communilink.net/avro/avro-1.7.7/avro-csharp-1.7.7.tar.gz

>From Command Prompt,
    avrogen -s simpleA.avsc outputDir

The error message is:
    "Exception occurred. Undefined name: simpleB"

I also try using avrogen -p switch in combination with protocol file, no joy.
For this method, I first define the protocol file "bearstearns.avdl"
protocol BearStearns {
	import schema "simpleA.avsc";
	import schema "simpleB.avsc";

Then from command prompt:
avrogen -p bearstearns.avdl outputDir

This time, the error message is,
Exception occurred. Invalid JSON format: @namespace("com.bearstearns")
protocol BearStearns {
        import schema "simpleA.avsc";
        import schema "simpleB.avsc";

Actually is Avro support for dotnet ready yet? Avro official doc for C# is completely empty:
Their guys even created a ticket for this in DEC 2013. https://issues.apache.org/jira/browse/AVRO-1420
As of August 2015, Avro doc for C# remains empty. And not much foot print in Internet (C#
and Avro I meant). 

•	Official: https://avro.apache.org/docs/1.7.7/index.html 
•	Download utility avrogen.exe: http://apache.communilink.net/avro/avro-1.7.7/ 
•	http://www.tutorialspoint.com/avro/serialization_by_generating_class.htm 
•	http://www.michael-noll.com/blog/2013/03/17/reading-and-writing-avro-files-from-the-command-line/

This message was sent by Atlassian JIRA

View raw message