I am calling sqlloader to load data file to data base from java. Log file is generated for that. The log file generation can take long time depending upon the size of the data file. From separate java call I need to know whether the log file writing is completed or not. If the log file writing is completed then I will show "Load Complete" or else I will say "Load Running." But how to know whether the log file is fully completed or still in making?
Asked
Active
Viewed 185 times
0
-
Have you checked out the solutions offered [here](http://stackoverflow.com/questions/750471/how-to-know-whether-a-file-copying-is-in-progress-complete-in-java-1-6)? – Andrew Logvinov Feb 27 '12 at 05:35
1 Answers
0
You could search for Elapsed time
in log file. If it is there, it is done. Otherwise still running.

Vaandu
- 4,857
- 12
- 49
- 75
-
I tried that. But if the size of the log file is very high and has huge number of lines then it is not an efficient way. It is taking to much time to read the whole file and search for the specific word. Need to try somrthing else. – Sweet Dream Feb 27 '12 at 05:40
-
oh ok. I have tried the same in Unix script. If possible, write some unix script and try calling it. – Vaandu Feb 27 '12 at 05:46