You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by davida <da...@live.com> on 2017/02/06 06:38:30 UTC

How to deploy cache to selected cluster group

Hi all, 

Is there a way to deploy cache to predefined cluster group(defined by custom
attributes) instead of deploying to every server node ? 



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-deploy-cache-to-selected-cluster-group-tp10437.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to deploy cache to selected cluster group

Posted by davida <da...@live.com>.
Thanks Guys, 

I was able to implement NodeFilter (using IgnitePredicate<ClusterNode>) in
Java and supply it using SpringConfig.xml in ApacheIgnite.NET. 



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-deploy-cache-to-selected-cluster-group-tp10437p10454.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to deploy cache to selected cluster group

Posted by Pavel Tupitsyn <pt...@apache.org>.
Hi David,

You are right, Ignite.NET does not support CacheConfiguration.NodeFilter.
(there are plans though: https://issues.apache.org/jira/browse/IGNITE-2890).

For now you can implement such a filter in Java and use it with Ignite.NET
by providing it via IgniteConfiguration.SpringConfigUrl.

Pavel

On Mon, Feb 6, 2017 at 1:32 PM, davida <da...@live.com> wrote:

> Yes Andrey, but it seems that option does not exist for .NET/C#.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/How-to-deploy-cache-to-selected-
> cluster-group-tp10437p10449.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Re: How to deploy cache to selected cluster group

Posted by davida <da...@live.com>.
Yes Andrey, but it seems that option does not exist for .NET/C#.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-deploy-cache-to-selected-cluster-group-tp10437p10449.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to deploy cache to selected cluster group

Posted by Andrey Gura <ag...@apache.org>.
David,

you can use CacheConfiguration.setNodeFilter() for definition some
nodes where cache will be created.

On Mon, Feb 6, 2017 at 12:03 PM, Andrey Mashenkov
<am...@gridgain.com> wrote:
> Hi David,
>
> Please, take a look at  Ignite.services(ClusterGroup grp) [1]
>
> [1] http://apacheignite.gridgain.org/docs/service-grid#igniteservices
>
> On Mon, Feb 6, 2017 at 9:38 AM, davida <da...@live.com> wrote:
>>
>> Hi all,
>>
>> Is there a way to deploy cache to predefined cluster group(defined by
>> custom
>> attributes) instead of deploying to every server node ?
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-ignite-users.70518.x6.nabble.com/How-to-deploy-cache-to-selected-cluster-group-tp10437.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
>

Re: How to deploy cache to selected cluster group

Posted by Andrey Mashenkov <an...@gmail.com>.
Hi David,

It was my misunderstanding.

Yes, NodeFilter set in CacheConfiguration will meet your needs.

On Mon, Feb 6, 2017 at 1:20 PM, davida <da...@live.com> wrote:

> Hi Andrey,
>
> Yes, service deployment offers rich functionality in terms of deployment
> options, but I am asking about similar functionality related to
> deploying/creating caches in .NET/C#.
>
> I have found something similar here (Microservices example on top of
> ApacheIgnite: https://github.com/dmagda/MicroServicesExample) using
> IgnitePredicate, but it seems the API does not exist for .NET/C#.
>
> Here is the code from the repository:
>
> <bean class="org.apache.ignite.configuration.CacheConfiguration">
>                     <property name="name" value="vehicles"/>
>                     <property name="memoryMode" value="OFFHEAP_TIERED"/>
>
>                     <property name="nodeFilter">
>                         <bean class="common.filters.DataNodeFilter"/>
>                     </property>
> </bean>
>
> public class DataNodeFilter implements IgnitePredicate<ClusterNode>
> {
>     public boolean apply(ClusterNode node) {
>         Boolean dataNode = node.attribute("data.node");
>
>         return dataNode != null && dataNode;
>     }
> }
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/How-to-deploy-cache-to-selected-
> cluster-group-tp10437p10447.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
С уважением,
Машенков Андрей Владимирович
Тел. +7-921-932-61-82

Best regards,
Andrey V. Mashenkov
Cerr: +7-921-932-61-82

Re: How to deploy cache to selected cluster group

Posted by davida <da...@live.com>.
Hi Andrey, 

Yes, service deployment offers rich functionality in terms of deployment
options, but I am asking about similar functionality related to
deploying/creating caches in .NET/C#. 

I have found something similar here (Microservices example on top of
ApacheIgnite: https://github.com/dmagda/MicroServicesExample) using
IgnitePredicate, but it seems the API does not exist for .NET/C#.

Here is the code from the repository:

<bean class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="vehicles"/>
                    <property name="memoryMode" value="OFFHEAP_TIERED"/>

                    <property name="nodeFilter">
                        <bean class="common.filters.DataNodeFilter"/>
                    </property>
</bean>

public class DataNodeFilter implements IgnitePredicate<ClusterNode>
{
    public boolean apply(ClusterNode node) {
        Boolean dataNode = node.attribute("data.node");

        return dataNode != null && dataNode;
    }
}



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-deploy-cache-to-selected-cluster-group-tp10437p10447.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: How to deploy cache to selected cluster group

Posted by Andrey Mashenkov <am...@gridgain.com>.
Hi David,

Please, take a look at  Ignite.services(ClusterGroup grp) [1]

[1] http://apacheignite.gridgain.org/docs/service-grid#igniteservices

On Mon, Feb 6, 2017 at 9:38 AM, davida <da...@live.com> wrote:

> Hi all,
>
> Is there a way to deploy cache to predefined cluster group(defined by
> custom
> attributes) instead of deploying to every server node ?
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/How-to-deploy-cache-to-selected-
> cluster-group-tp10437.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>