Hello Bobby,

Thanks a lot for your rapid answer.
At least there's hope for improvement in LocalCluster when 2.x will be
available as a stable release.
For 1.x, you mention that I could use Clojure APIs.
But unless I'm mistaking, Clojure is just "yet another JVM compliant"
language, so isn't there a way to use this API with Java (maybe at the
expense of using Java reflection API?)

Best regards,
Alexandre


2017-09-06 22:29 GMT+02:00 Bobby Evans <ev...@oath.com.invalid>:

> Under 2.x LocalCluster is much more fully featured and you can set daemon
> configs using the LocalCluster.Builder.withDaemonConf.  But for all other
> versions of storm the only way to change things like the daemon conf are
> through the clojure API, which I assume you don't want to use.
>
> So sorry but no there is no better way right now unless you want to move to
> an unreleased version of Storm.
>
> If you do want to clean it up and make support for something like this more
> official I would love to see it happen, but I don't really have a lot of
> time to make the changes myself right now.
>
> -
> Bobby
>
>
> On Wed, Sep 6, 2017 at 3:05 PM Alexandre Vermeerbergen <
> avermeerber...@gmail.com> wrote:
>
> > 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