An example of storm storm in local mode cannot delete a file

I am running a storm starter project ( https://github.com/nathanmarz/storm-starter ), and after some time it starts the following error.

23135 [main] ERROR org.apache.zookeeper.server.NIOServerCnxn - Thread Thread[main,5,main] died java.io.IOException: Unable to delete file: C:\Users\[user directory]\AppData\Local\Temp\a0894222-6a8a-4f80-8655-3ad6a0c10021\version-2\log.1 at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1390) 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 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:413) at backtype.storm.testing$kill_local_storm_cluster.invoke(testing.clj:164) at backtype.storm.LocalCluster$_shutdown.invoke(LocalCluster.clj:32) at backtype.storm.LocalCluster.shutdown(Unknown Source) at storm.starter.ExclamationTopology.main(ExclamationTopology.java:82) 

I tried changing the permissions of the "AppData" directory, but this does not seem to affect it. This error occurs when it is run on the command line, as well as within eclipse.

+6
source share
1 answer

For this problem of deleting files on Windows, this problem still exists in storm version 0.8.2. At the moment, it has helped me. You may need to comment on the methods of cluster.killTopology() and cluster.shutdown() as shown below to avoid file deletion errors.

  LocalCluster cluster = new LocalCluster(); cluster.submitTopology("test", conf, builder.createTopology()); Utils.sleep(10000); // cluster.killTopology("test"); // cluster.shutdown(); 

Hope this helps

+10
source

Source: https://habr.com/ru/post/945458/


All Articles