You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Valentin Kulichenko <va...@gmail.com> on 2015/02/01 05:33:32 UTC

Re: Cluster group for cache server nodes

Look good. Ticket: https://issues.apache.org/jira/browse/IGNITE-158

On Fri, Jan 30, 2015 at 7:48 PM, Dmitriy Setrakyan <ds...@apache.org>
wrote:

> How about having the following:
>
> - forDataNodes(cacheName)
> - forClientNodes(cacheName)
> - forCacheNodes(cacheName)
>
> D.
>
> On Fri, Jan 30, 2015 at 8:33 PM, Valentin Kulichenko <
> valentin.kulichenko@gmail.com> wrote:
>
> > ClusterGroup provides forCache method that allows to get a group of nodes
> > with the provided cache. But it includes CLIENT_ONLY nodes which are not
> > needed in most cases (if you want to execute some computations with
> cached
> > data, you need only data nodes).
> >
> > I suggest to add forDataNodes(String cacheName, @Nullable String...
> > cacheNames) method that will exclude client nodes.
> >
> > Alternatively we can add a boolean flag to existing forCache method, like
> > this:
> >
> > forCache(boolean includeClients, String cacheName, @Nullable String...
> > cacheNames)
> >
> > Thoughts?
> >
>

Re: Cluster group for cache server nodes

Posted by Dmitriy Setrakyan <ds...@apache.org>.
I see your point. I don't want to depend on DistributionMode at API level
though, because we may decide to get rid or CLIENT_ONLY one in future and
just have dynamic clients that don't need to be initialized.

Let's just get rid of varargs for now, as you suggested.

D.

On Tue, Feb 3, 2015 at 5:36 AM, Yakov Zhdanov <yz...@apache.org> wrote:

> Guys,
>
> The ticket has been implemented and will be merged soon.
>
> However, after reviewing it I have the following comments:
> 1. Why we need String vararg parameter? I dont think that getting
> ClusterGroup containing of nodes carrying different caches is a wide use
> case.
> 2. Current API does not allow me to filter only CLIENT_ONLY nodes. How
> about adding vararg parameter to forCacheNodes - forCacheNodes(@Nullable
> String cacheName, DistributionMode... modes) - if param is empty all nodes
> are returned.
>
> --Yakov
>
> 2015-02-01 7:33 GMT+03:00 Valentin Kulichenko <
> valentin.kulichenko@gmail.com
> >:
>
> > Look good. Ticket: https://issues.apache.org/jira/browse/IGNITE-158
> >
> > On Fri, Jan 30, 2015 at 7:48 PM, Dmitriy Setrakyan <
> dsetrakyan@apache.org>
> > wrote:
> >
> > > How about having the following:
> > >
> > > - forDataNodes(cacheName)
> > > - forClientNodes(cacheName)
> > > - forCacheNodes(cacheName)
> > >
> > > D.
> > >
> > > On Fri, Jan 30, 2015 at 8:33 PM, Valentin Kulichenko <
> > > valentin.kulichenko@gmail.com> wrote:
> > >
> > > > ClusterGroup provides forCache method that allows to get a group of
> > nodes
> > > > with the provided cache. But it includes CLIENT_ONLY nodes which are
> > not
> > > > needed in most cases (if you want to execute some computations with
> > > cached
> > > > data, you need only data nodes).
> > > >
> > > > I suggest to add forDataNodes(String cacheName, @Nullable String...
> > > > cacheNames) method that will exclude client nodes.
> > > >
> > > > Alternatively we can add a boolean flag to existing forCache method,
> > like
> > > > this:
> > > >
> > > > forCache(boolean includeClients, String cacheName, @Nullable
> String...
> > > > cacheNames)
> > > >
> > > > Thoughts?
> > > >
> > >
> >
>

Re: Cluster group for cache server nodes

Posted by Konstantin Boudnik <co...@apache.org>.
Not to be a nag, but don't you think keeping JIRA-specific review comments on
JIRA will be more helpful for later attempts to restore the conversation (if
needed)? Cause now it's going to be two sources of the information: a JIRA an
this thread whichi is only loosely connected to it.

Just a thought...
  Cos

On Tue, Feb 03, 2015 at 05:36PM, Yakov Zhdanov wrote:
> Guys,
> 
> The ticket has been implemented and will be merged soon.
> 
> However, after reviewing it I have the following comments:
> 1. Why we need String vararg parameter? I dont think that getting
> ClusterGroup containing of nodes carrying different caches is a wide use
> case.
> 2. Current API does not allow me to filter only CLIENT_ONLY nodes. How
> about adding vararg parameter to forCacheNodes - forCacheNodes(@Nullable
> String cacheName, DistributionMode... modes) - if param is empty all nodes
> are returned.
> 
> --Yakov
> 
> 2015-02-01 7:33 GMT+03:00 Valentin Kulichenko <valentin.kulichenko@gmail.com
> >:
> 
> > Look good. Ticket: https://issues.apache.org/jira/browse/IGNITE-158
> >
> > On Fri, Jan 30, 2015 at 7:48 PM, Dmitriy Setrakyan <ds...@apache.org>
> > wrote:
> >
> > > How about having the following:
> > >
> > > - forDataNodes(cacheName)
> > > - forClientNodes(cacheName)
> > > - forCacheNodes(cacheName)
> > >
> > > D.
> > >
> > > On Fri, Jan 30, 2015 at 8:33 PM, Valentin Kulichenko <
> > > valentin.kulichenko@gmail.com> wrote:
> > >
> > > > ClusterGroup provides forCache method that allows to get a group of
> > nodes
> > > > with the provided cache. But it includes CLIENT_ONLY nodes which are
> > not
> > > > needed in most cases (if you want to execute some computations with
> > > cached
> > > > data, you need only data nodes).
> > > >
> > > > I suggest to add forDataNodes(String cacheName, @Nullable String...
> > > > cacheNames) method that will exclude client nodes.
> > > >
> > > > Alternatively we can add a boolean flag to existing forCache method,
> > like
> > > > this:
> > > >
> > > > forCache(boolean includeClients, String cacheName, @Nullable String...
> > > > cacheNames)
> > > >
> > > > Thoughts?
> > > >
> > >
> >

Re: Cluster group for cache server nodes

Posted by Yakov Zhdanov <yz...@apache.org>.
Guys,

The ticket has been implemented and will be merged soon.

However, after reviewing it I have the following comments:
1. Why we need String vararg parameter? I dont think that getting
ClusterGroup containing of nodes carrying different caches is a wide use
case.
2. Current API does not allow me to filter only CLIENT_ONLY nodes. How
about adding vararg parameter to forCacheNodes - forCacheNodes(@Nullable
String cacheName, DistributionMode... modes) - if param is empty all nodes
are returned.

--Yakov

2015-02-01 7:33 GMT+03:00 Valentin Kulichenko <valentin.kulichenko@gmail.com
>:

> Look good. Ticket: https://issues.apache.org/jira/browse/IGNITE-158
>
> On Fri, Jan 30, 2015 at 7:48 PM, Dmitriy Setrakyan <ds...@apache.org>
> wrote:
>
> > How about having the following:
> >
> > - forDataNodes(cacheName)
> > - forClientNodes(cacheName)
> > - forCacheNodes(cacheName)
> >
> > D.
> >
> > On Fri, Jan 30, 2015 at 8:33 PM, Valentin Kulichenko <
> > valentin.kulichenko@gmail.com> wrote:
> >
> > > ClusterGroup provides forCache method that allows to get a group of
> nodes
> > > with the provided cache. But it includes CLIENT_ONLY nodes which are
> not
> > > needed in most cases (if you want to execute some computations with
> > cached
> > > data, you need only data nodes).
> > >
> > > I suggest to add forDataNodes(String cacheName, @Nullable String...
> > > cacheNames) method that will exclude client nodes.
> > >
> > > Alternatively we can add a boolean flag to existing forCache method,
> like
> > > this:
> > >
> > > forCache(boolean includeClients, String cacheName, @Nullable String...
> > > cacheNames)
> > >
> > > Thoughts?
> > >
> >
>