You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Marc Sturlese <ma...@gmail.com> on 2011/03/17 13:31:15 UTC

check if a sequenceFile is corrupted

Is there any way to check if a seqfile is corrupted without iterate over all
its keys/values till it crashes?
I've seen that I can get an IOException when opening it or an IOException
reading the X key/value (depending on when it was corrupted).  
Thanks in advance

--
View this message in context: http://lucene.472066.n3.nabble.com/check-if-a-sequenceFile-is-corrupted-tp2693230p2693230.html
Sent from the Hadoop lucene-users mailing list archive at Nabble.com.

Re: check if a sequenceFile is corrupted

Posted by Edward Capriolo <ed...@gmail.com>.
On Thursday, March 17, 2011, Marc Sturlese <ma...@gmail.com> wrote:
> Is there any way to check if a seqfile is corrupted without iterate over all
> its keys/values till it crashes?
> I've seen that I can get an IOException when opening it or an IOException
> reading the X key/value (depending on when it was corrupted).
> Thanks in advance
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/check-if-a-sequenceFile-is-corrupted-tp2693230p2693230.html
> Sent from the Hadoop lucene-users mailing list archive at Nabble.com.
>

No it does not seem possible to know if a file is damaged without
reading it (logically).

Hadoop dfs -text xxxxxx ; echo $?

Should give you non zero but that still involves reading the file.