@@ -251,8 +251,10 @@ public void start() {
251251 // walk through directory tree
252252 Singleton .getSingletonInstance ().getMainFrame ().setStatusMessage (
253253 "Scanning path: " + startPoint .getPath ());
254- Counter counter = new Counter ();
255- AtomicCounter workerCounter = new AtomicCounter ();
254+ log .info ("Starting preprocess scan of image files in: " +
255+ startPoint .getPath ());
256+ Counter counter = new Counter ();
257+ AtomicCounter workerCounter = new AtomicCounter ();
256258 // count files to scan
257259 countFiles (startPoint , counter );
258260 setPercentComplete (0 );
@@ -264,7 +266,7 @@ public void start() {
264266 // Create executor service once for entire scan to prevent premature
265267 // shutdown during recursive directory traversal (fixes issue where only
266268 // a few files were processed when scanning many files)
267-
269+
268270 // Clean up any existing executor service from previous runs
269271 if (executorService != null && !executorService .isTerminated ()) {
270272 log .warn ("Executor service from previous run still exists, shutting it down" );
@@ -276,7 +278,7 @@ public void start() {
276278 Thread .currentThread ().interrupt ();
277279 }
278280 }
279-
281+
280282 int concurrencyLevel = Integer .parseInt (
281283 Singleton .getSingletonInstance ()
282284 .getProperties ()
@@ -287,12 +289,12 @@ public void start() {
287289 for (int i = 0 ; i < locks .length ; ++i ) {
288290 locks [i ] = new ReentrantLock ();
289291 }
290-
292+
291293 log .info ("Starting file scan with " + concurrencyLevel + " threads, total files to process: " + counter .getTotal ());
292294 checkFiles (startPoint , counter , workerCounter );
293-
295+
294296 // Shutdown executor and wait for all tasks to complete
295- log .info ("File scanning completed, shutting down executor and waiting for " +
297+ log .info ("File scanning completed, shutting down executor and waiting for " +
296298 workerCounter .getFilesSeen () + " processing tasks to finish" );
297299 executorService .shutdown ();
298300 try {
@@ -302,7 +304,7 @@ public void start() {
302304 long startWait = System .currentTimeMillis ();
303305 if (!executorService .awaitTermination (12 , TimeUnit .HOURS )) {
304306 long waitedMinutes = (System .currentTimeMillis () - startWait ) / 60000 ;
305- log .warn ("Execution pool did not terminate within 12 hours (waited " +
307+ log .warn ("Execution pool did not terminate within 12 hours (waited " +
306308 waitedMinutes + " minutes), forcing shutdown. " +
307309 "Files processed: " + workerCounter .getFilesSeen () + " of " + counter .getTotal ());
308310 executorService .shutdownNow ();
@@ -314,7 +316,7 @@ public void start() {
314316 log .info ("All processing tasks completed successfully after " + waitedSeconds + " seconds" );
315317 }
316318 } catch (InterruptedException e ) {
317- log .error ("Execution pool interrupted during termination, processed " +
319+ log .error ("Execution pool interrupted during termination, processed " +
318320 workerCounter .getFilesSeen () + " of " + counter .getTotal () + " files" , e );
319321 executorService .shutdownNow ();
320322 Thread .currentThread ().interrupt ();
0 commit comments