Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> How to define Protocol from AVDL?


Copy link to this message
-
Re: How to define Protocol from AVDL?
Yes thank you Doug. This was the answer.

W dniu 03.09.2013 19:15, Doug Cutting pisze:
> This can be accomplished with something like:
>
>    import org.apache.avro.compiler.idl.Idl;
>    ...
>      Protocol p = new Idl(new File("MyProtocol.avdl")).CompilationUnit();
>    ...
>
> This should be better documented.
>
> Doug
>
> On Mon, Sep 2, 2013 at 3:57 AM, michał <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> This is my first time with mailing list.
>> Question:
>>
>> The reading od AVPR is easy:
>>
>> Protocol protocol = Protocol.parse(new File("ht-proto.avpr"));
>>
>> But this does not work for IDL files (AVDL).
>>
>> How to read the AVDL file so I could accomplish the following task but using
>> AVDL instead of AVPR:
>>
>> public static void main (String[] args)  {
>>       Main.class.getResourceAsStream("net/protocol_man.avdl");
>>       Protocol protocol  >>
>> Protocol.parse(Main.class.getResourceAsStream("net/protocol_man.avpr"));
>>                                                     //this doesnt work for
>> AVDL file
>>   }
>>
>>
>>
>>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB