You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Victor <vi...@gmail.com> on 2020/07/01 04:08:03 UTC
Re: Setting Cache Size using Max Records
Yes, user upfront defines a config and the idea indeed is to convert the
number of records to total bytes.
Followup around this. Given i want to calculate the exact row entry size
upfront, even before the data is added. Couple of queries,
1. Is there a way(api) just based on the Cache (table), be able to inspect
the capacity a row can hold based on the column datatypes?
2. Can the Dataregion be set post the cache is created?
Thanks,
Victor
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Setting Cache Size using Max Records
Posted by Victor <vi...@gmail.com>.
From what i have read so far, seems like if i have 2 caches each to be
configured with 50MB, then i need to define 2 identical regions with unique
names and apply to each of the caches.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Setting Cache Size using Max Records
Posted by Victor <vi...@gmail.com>.
Thanks Denis this helps.
Btw, one thing to check, if you create a 25MB region and multiple cache's
are associated to that region, do all the caches share the region capacity
or just share the configuration but each cache will be allocated a 25MB
capacity?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Setting Cache Size using Max Records
Posted by Denis Magda <dm...@apache.org>.
1. There is no any public API for that but you can follow a workaround
suggested here
<https://stackoverflow.com/questions/49780044/apache-ignite-binaryobject-bloat>.
If you have a POJO class of your domain object, then create an instance,
convert it to BinaryObjectImpl and get the array size (as suggested on
StackOverflow).
2. No, you have to set the size in advance. However, the combination of
initial and max size might do the trick for you. Use the initial size for
after you calculate the value for an expected number of records the cache
has to store while the max size can give you an extra space to deal with
the calculation/estimations errors.
-
Denis
On Tue, Jun 30, 2020 at 9:08 PM Victor <vi...@gmail.com> wrote:
> Yes, user upfront defines a config and the idea indeed is to convert the
> number of records to total bytes.
>
> Followup around this. Given i want to calculate the exact row entry size
> upfront, even before the data is added. Couple of queries,
>
> 1. Is there a way(api) just based on the Cache (table), be able to inspect
> the capacity a row can hold based on the column datatypes?
> 2. Can the Dataregion be set post the cache is created?
>
> Thanks,
> Victor
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>