Java long task - Did it stop writing to file?
Posted
by rockit
on Stack Overflow
See other posts from Stack Overflow
or by rockit
Published on 2010-03-16T19:29:37Z
Indexed on
2010/03/16
19:31 UTC
Read the original article
Hit count: 216
java
I am writing a lot of data to a file, and while keeping my eye on the file it eventually stopped growing in size.
Essentially my task is getting information from a database, and printing out all non-unique values in column A.
Since there are many rows to the database table, and the database table is across my network, this is taking days to complete. Thus I'm concerned that since the file isn't growing, that it isn't actually writing to the file anymore.
- Which is odd, I have no "catch"'s in my code, so if there was a problem writing to file, wouldn't it have thrown an error?!
Should I let the task complete (estimate 2-3 days from today), or is there something else that I don't know going on here making my application not write to the file?!
my algorithm goes something like this
Declare file Create new file Open file for writing get database connection get resultset from database for each row in the resultset - write column "A" to file - if row# % 100000 then write to screen "completed " + row# + " rows" when no more rows exist close file write to screen - "completed"
© Stack Overflow or respective owner