Hi All!

I am implementing a custom InputFormat.
Its custom RecordReader uses LineRecordReader.LineReader inside.

In some cases its read() method returns 0, i.e. reads 0 bytes. This
happen also in unit test where it reads form a regular file on UNIX
filesystem.
What does it mean and how should I handle it/avoid it?

After examining the sources I can see that zero count of bytes read
comes from the value returned by FSDataInputStream.read().

In which situations can this happen? -1 would mean end of file, 0 can
mean that no data was available (but end of file still not reached) -
I can not understand how this can happen in case of local file.

Please give me advice :)

Regards,
Alexey Tigarev
<ti...@nlp.od.ua> Jabber: ti...@jabber.od.ua Skype: t__gra

Как программисту стать фрилансером и заработать первую $1000 на oDesk:
http://freelance-start.com/earn-first-1000-on-odesk

Reply via email to