source binary file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

source binary file

Lydia Ickler
Hi,

how would I read a BinaryFile from HDFS with the Flink Java API?

I can only find the Scala way…

All the best,
Lydia
Reply | Threaded
Open this post in threaded view
|

Re: source binary file

Fabian Hueske-2
Hi Lydia,

you need to implement a custom InputFormat to read binary files.
Usually you can extend the FileInputFormat.
The implementation depends a lot on your use case, for example whether each binary file is read into a single or multiple records and how records are delimited if there are more than one in records per file.

Best, Fabian

2015-10-06 11:04 GMT+02:00 Lydia Ickler <[hidden email]>:
Hi,

how would I read a BinaryFile from HDFS with the Flink Java API?

I can only find the Scala way…

All the best,
Lydia