nathanmarz/storm — pull request #102 by dkincaid (2012-01-16 02:33:37+00:00)
Title: File delete problem on Windows

We ran into a problem on a Windows system when Storm is deleting files from the tmp directory. We should be using the canonical path from the File object. This is especially important on Windows systems in my experience. Here is the exception it was throwing.

java.io.IOException: Unable to delete file: C:\Users\KALYOS~1\AppData\Local\Temp\8cfaaa2d-a34f-4a9f-a30a-ef74a0721260\version-2\log.1
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1390) t org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1044)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:977)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1381)
at backtype.storm.util$rmr.invoke(util.clj:277)
at backtype.storm.testing$kill_local_storm_cluster.invoke(testing.clj:156)
at backtype.storm.LocalCluster$_shutdown.invoke(LocalCluster.clj:21)
at backtype.storm.LocalCluster.shutdown(Unknown Source)
at com.idexx.data.etl.storm.DataServicesETLTopology.shutdownLocalTopology(DataServicesETLTopology.java:167)
at integration.com.idexx.data.etl.AbstractDataEltHsqldbTopologyTests.afterSuite(AbstractDataEltHsqldbTopologyTests.java:56)

This doesn't completely fix the problem we're having, but eliminates a potential problem. Now the problem appears to be that there may be another process or thread holding a lock on that file.