Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> In Java, how can I create an equivalent of an Apache Avro container file without being forced to use a File as a medium?


Copy link to this message
-
Re: In Java, how can I create an equivalent of an Apache Avro container file without being forced to use a File as a medium?
In addition to Joe's comments:

On the write side, DataFileWriter.create() can take a file or an output
stream.
http://avro.apache.org/docs/1.5.4/api/java/org/apache/avro/file/DataFileWrit
er.html

On the read side, DataFileStream can be used if the input does not have
random access and can be represented with an InputStream.
If the input has random access, implement SeekableInput and then construct a
DataFileReader with it:
http://avro.apache.org/docs/1.5.4/api/java/org/apache/avro/file/SeekableInpu
t.html
http://avro.apache.org/docs/1.5.4/api/java/org/apache/avro/file/DataFileRead
er.html
On 9/24/11 2:14 AM, "Bernard Liang" <[EMAIL PROTECTED]> wrote:

> Hello,
>
> This is somewhat of a more advanced question regarding the Java implementation
> of Avro. The details are located at the following link:
>
> http://stackoverflow.com/questions/7537959/in-java-how-can-i-create-an-equival
> ent-of-an-apache-avro-container-file-without
>
> If there is anyone that might be able to assist me with this, I would like to
> get in contact with you.
>
> Best regards,
> Bernard Liang