You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Sumanta Ghosh <su...@yahoo.com> on 2017/03/04 07:05:53 UTC

CacheStore.loadCache loading data for 1024 partitions for a single node

Hi,
It seems the primaryPartitions method of Affinity class returns 1024
partitions for the local node, even if it is a single node only application.
Should it not only return only those partition ids relevant? following is my
configuration, have I missed anything?
CacheConfiguration<Long, QueryableOrganizationProfile>
queryableOrgProfileConfig = new
CacheConfiguration<>("QueryableOrganizationProfiles");
		queryableOrgProfileConfig.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
	
queryableOrgProfileConfig.setCacheStoreFactory(FactoryBuilder.factoryOf(QueryableOrgCacheStore.class));



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheStore-loadCache-loading-data-for-1024-partitions-for-a-single-node-tp11028.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: CacheStore.loadCache loading data for 1024 partitions for a single node

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

You can set AffinityFunction to cache configuration providing certain
partitions number to existed AF or implements your own AF.
For more information see
org.apache.ignite.cache.affinity.AffinityFunction.partitions().

On Tue, Mar 7, 2017 at 8:03 PM, Sumanta Ghosh <su...@yahoo.com>
wrote:

> It is not causing problems so to say; however I am concerned then we have
> 1024 queries executed per cache during startup; in case there is any
> configuration to set up the total number of partitions, that would give us
> more control I believe.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/CacheStore-loadCache-loading-
> data-for-1024-partitions-for-a-single-node-tp11028p11059.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Best regards,
Andrey V. Mashenkov

Re: CacheStore.loadCache loading data for 1024 partitions for a single node

Posted by Sumanta Ghosh <su...@yahoo.com>.
It is not causing problems so to say; however I am concerned then we have
1024 queries executed per cache during startup; in case there is any
configuration to set up the total number of partitions, that would give us
more control I believe.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheStore-loadCache-loading-data-for-1024-partitions-for-a-single-node-tp11028p11059.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: CacheStore.loadCache loading data for 1024 partitions for a single node

Posted by vkulichenko <va...@gmail.com>.
Why is it too high? Is it causing any problems?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheStore-loadCache-loading-data-for-1024-partitions-for-a-single-node-tp11028p11048.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: CacheStore.loadCache loading data for 1024 partitions for a single node

Posted by Sumanta Ghosh <su...@yahoo.com>.
Hi Val,
Thanks. In that case, how can I reduce the number of partitions - for a
single node development environment, 1024 is too high.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheStore-loadCache-loading-data-for-1024-partitions-for-a-single-node-tp11028p11041.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: CacheStore.loadCache loading data for 1024 partitions for a single node

Posted by vkulichenko <va...@gmail.com>.
This is correct behavior. If there is only one node in topology, it holds all
1024 partitions for the cache. Once you add one more node, you will notice
that partitions are distributed across topology.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/CacheStore-loadCache-loading-data-for-1024-partitions-for-a-single-node-tp11028p11034.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.