Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter storm example running in local mode cannot delete file

I am running the storm starter project (https://github.com/nathanmarz/storm-starter) and it throws the following error after running for a little while.

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 have tried changing the permissions of the "AppData" directory but this appears to not affect it. This error comes up running it on the command line as well as from within eclipse.

like image 750
Shawn Avatar asked May 20 '13 21:05

Shawn


Video Answer


1 Answers

Per this File delete problem on Windows, this problem still exists in storm version 0.8.2. As of now, the below workaround worked for me. You may need to comment out the cluster.killTopology() and cluster.shutdown() methods, as shown below, to avoid the file deletion error.

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

Hope, this helps

like image 175
Niranjan Sarvi Avatar answered Nov 15 '22 11:11

Niranjan Sarvi