Hello,

I have noticed that when I run topologies in LocalCluster mode (for
automated test purposes), there are residual files left in a directory
corresponding to System.getProperty("user.dir")+"/logs".

Inside this directory, a subdirectory called "workers-artifacts" is created
when the topology is submitted, and it contains again a subdir then some
files ; nothing is cleaned up when the topology shuts down.

This causes our tests to fail in our automated test replay system, because
tests are ran with a special user id which has no write permission in
System.getProperty("user.dir")+"/logs".

I have tried change this behavior by using these setters on the Config
object passed to LocalCluster.submitTopology:

        Config conf = new Config();
        conf.setDebug(true);

        conf.put(Config.STORM_LOCAL_DIR, "/tmp/localdir");
        conf.put(Config.STORM_WORKERS_ARTIFACTS_DIR, "/tmp/localdir");

but it changed nothing.

I finally found a by-pass by putting this line at the beginning of our test
code:

        System.setProperty("user.dir", "/tmp/localdir");

But I feel that it's a dirty hack.

What is the official way to control LocalCluster's behavior which regards
to these directories & files ?

Best regards,
Alexandre Vermeerbergen

Reply via email to