You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Pavel Tupitsyn <pt...@apache.org> on 2016/07/28 08:54:50 UTC

IgniteConfiguration.igniteWorkDir only works one time

Igniters,

Work directory can be set only once per process, see U.setWorkDirectory
method.

So if there are multiple nodes in a process, or a node is stopped and then
started,
IgniteConfiguration.igniteWorkDir is ignored (IGNITE-3597
<https://issues.apache.org/jira/browse/IGNITE-3597>).

Is there any reason for storing this statically?

Pavel.

Re: IgniteConfiguration.igniteWorkDir only works one time

Posted by Dmitriy Setrakyan <ds...@apache.org>.
I like the IgniteConfiguration.workDirectory approach.

On Thu, Jul 28, 2016 at 7:00 AM, Vladimir Ozerov <vo...@gridgain.com>
wrote:

> I believe this was done for convenience so that we can get working
> directory from any code piece.
>
> This approach looks wrong to me, though. First, it breaks isolation between
> nodes. This becomes more and more critical as we implement more
> integrations and as users draw more attention to our client nodes. I
> believe that soon starting several nodes in the same process will become
> absolutely normal use case. Second, it hides bug. For example, we have lots
> of unit tests which start multiple nodes in the same process. And I clearly
> remember how we almost missed extremely critical bug with marshaller, which
> could broke the whole cluster.
>
> Having said that, I believe must fix that in Java ASAP. There should be no
> static work dir variable. It should reside somewhere inside kernal context
> or be explicitly set to* IgniteConfiguration.workDirectory* when node
> starts. The second option is better, because in this case user will have
> access to working directory as well.
>
> Any more ideas?
>
> Vladimir.
>
> On Thu, Jul 28, 2016 at 11:54 AM, Pavel Tupitsyn <pt...@apache.org>
> wrote:
>
> > Igniters,
> >
> > Work directory can be set only once per process, see U.setWorkDirectory
> > method.
> >
> > So if there are multiple nodes in a process, or a node is stopped and
> then
> > started,
> > IgniteConfiguration.igniteWorkDir is ignored (IGNITE-3597
> > <https://issues.apache.org/jira/browse/IGNITE-3597>).
> >
> > Is there any reason for storing this statically?
> >
> > Pavel.
> >
>

Re: IgniteConfiguration.igniteWorkDir only works one time

Posted by Vladimir Ozerov <vo...@gridgain.com>.
I believe this was done for convenience so that we can get working
directory from any code piece.

This approach looks wrong to me, though. First, it breaks isolation between
nodes. This becomes more and more critical as we implement more
integrations and as users draw more attention to our client nodes. I
believe that soon starting several nodes in the same process will become
absolutely normal use case. Second, it hides bug. For example, we have lots
of unit tests which start multiple nodes in the same process. And I clearly
remember how we almost missed extremely critical bug with marshaller, which
could broke the whole cluster.

Having said that, I believe must fix that in Java ASAP. There should be no
static work dir variable. It should reside somewhere inside kernal context
or be explicitly set to* IgniteConfiguration.workDirectory* when node
starts. The second option is better, because in this case user will have
access to working directory as well.

Any more ideas?

Vladimir.

On Thu, Jul 28, 2016 at 11:54 AM, Pavel Tupitsyn <pt...@apache.org>
wrote:

> Igniters,
>
> Work directory can be set only once per process, see U.setWorkDirectory
> method.
>
> So if there are multiple nodes in a process, or a node is stopped and then
> started,
> IgniteConfiguration.igniteWorkDir is ignored (IGNITE-3597
> <https://issues.apache.org/jira/browse/IGNITE-3597>).
>
> Is there any reason for storing this statically?
>
> Pavel.
>