Question

I have a java application that reads from a bunch of text files (about 50gbs worth). each file is anywhere from 5kb to 35mb. The files themselves are created from another java application that is run on demand but hasnt been run in around a week. the file uses a number of delimiters like

| ; ,

My app has been runnin fine but started throwing an error recently with a number format exeception. upon examination I see that one of the commas has been flipped to a $

0.43916,22970.43081,6.76182$527640691.38786,|10,

My question is this. Is this possible that this "flip" is happening because of drive corruption? It seems a bit farfetched that only 1 character in the entire file would change. Timestamp on the file verifies that it wasn't "accidentaly" modified by another program.

I'm really scratching my head on this one.

Was it helpful?

Solution 2

Turns out it was drive corruption. Ran a CHKDISK and came up with errors.

OTHER TIPS

It's unlikely, but definitely possible. In fact, only one bit would have to change between a , (00100100) and a $ (00101100). Disks typically have things like checksums and error correcting codes built in so that if corruption does occur, they're able to correct it, or at the least, let you know that it has occurred. But still, silent corruption is not unheard-of and is probably more likely to happen with an SSD vs a conventional hard drive.

Still, the first place to look is definitely the code that generated the file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top