Re: Cache configuration

2020-08-18 Thread Ilya Kasnacheev
Hello!

You can start a new client node which will have these new caches in its
configuration.

When it joins the cluster it will create all these caches. Then you can
disconnect/shut it down.

You can also use e.g. REST API or CREATE TABLE clause to create new caches.
There's a lot of ways to create a cache without code change.

Regards.
-- 
Ilya Kasnacheev


вт, 18 авг. 2020 г. в 11:27, C Ravikiran :

> Thank you for the replay.
> Now my existing code, don't have ignite templates.
> To add templates, need to modify the code, but we don't have access for
> the code modification.
>
> On Tue, 18 Aug, 2020, 2:47 am Evgenii Zhuravlev, 
> wrote:
>
>> Hi,
>>
>> You can add cache configuration to the xml file with the *(for example,
>> cache-*) at the end. After this, caches with names that fit this
>> template(cache-1 for template cache-*)  will use it's cache configuration.
>>
>> Evgenii
>>
>> вс, 16 авг. 2020 г. в 07:03, C Ravikiran :
>>
>>> As for the below, I have to change in xml and java code also.
>>>
>>> Is there there any other possibility, without changing the java code,
>>> and changing only xml file, shall we achive cache configuration??
>>>
>>> As we don't have the java code access, we have the access to the
>>> configuration
>>> xml file.
>>>
>>> Could you please help me with this?
>>>
>>> Regards,
>>> Ravikiran C
>>>
>>>
>>>
>>>
>>> On Sun, 16 Aug, 2020, 12:57 am John Smith, 
>>> wrote:
>>>
>>>> You can create templates in the XML and programmatically when you say
>>>> getOrCreate() you can specify the template to use and pass in random name
>>>> for the cache name ...
>>>>
>>>>
>>>> https://apacheignite.readme.io/docs/cache-template#:~:text=Cache%20templates%20are%20useful%20when,CREATE%20TABLE%20and%20REST%20commands
>>>> .
>>>>
>>>> On Sat., Aug. 15, 2020, 8:53 a.m. itsmeravikiran.c, <
>>>> itsmeravikira...@gmail.com> wrote:
>>>>
>>>>> My cache ids are dynamic.
>>>>> Is it possible to add cache configuration in xml.
>>>>> I have checked, name property is mandatory. But i cannot add the name
>>>>> as
>>>>> it's dynamic name.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>>>
>>>>


Re: Cache configuration

2020-08-18 Thread C Ravikiran
Thank you for the replay.
Now my existing code, don't have ignite templates.
To add templates, need to modify the code, but we don't have access for the
code modification.

On Tue, 18 Aug, 2020, 2:47 am Evgenii Zhuravlev, 
wrote:

> Hi,
>
> You can add cache configuration to the xml file with the *(for example,
> cache-*) at the end. After this, caches with names that fit this
> template(cache-1 for template cache-*)  will use it's cache configuration.
>
> Evgenii
>
> вс, 16 авг. 2020 г. в 07:03, C Ravikiran :
>
>> As for the below, I have to change in xml and java code also.
>>
>> Is there there any other possibility, without changing the java code, and
>> changing only xml file, shall we achive cache configuration??
>>
>> As we don't have the java code access, we have the access to the
>> configuration
>> xml file.
>>
>> Could you please help me with this?
>>
>> Regards,
>> Ravikiran C
>>
>>
>>
>>
>> On Sun, 16 Aug, 2020, 12:57 am John Smith, 
>> wrote:
>>
>>> You can create templates in the XML and programmatically when you say
>>> getOrCreate() you can specify the template to use and pass in random name
>>> for the cache name ...
>>>
>>>
>>> https://apacheignite.readme.io/docs/cache-template#:~:text=Cache%20templates%20are%20useful%20when,CREATE%20TABLE%20and%20REST%20commands
>>> .
>>>
>>> On Sat., Aug. 15, 2020, 8:53 a.m. itsmeravikiran.c, <
>>> itsmeravikira...@gmail.com> wrote:
>>>
>>>> My cache ids are dynamic.
>>>> Is it possible to add cache configuration in xml.
>>>> I have checked, name property is mandatory. But i cannot add the name as
>>>> it's dynamic name.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>>
>>>


Re: Cache configuration

2020-08-17 Thread Evgenii Zhuravlev
Hi,

You can add cache configuration to the xml file with the *(for example,
cache-*) at the end. After this, caches with names that fit this
template(cache-1 for template cache-*)  will use it's cache configuration.

Evgenii

вс, 16 авг. 2020 г. в 07:03, C Ravikiran :

> As for the below, I have to change in xml and java code also.
>
> Is there there any other possibility, without changing the java code, and
> changing only xml file, shall we achive cache configuration??
>
> As we don't have the java code access, we have the access to the
> configuration
> xml file.
>
> Could you please help me with this?
>
> Regards,
> Ravikiran C
>
>
>
>
> On Sun, 16 Aug, 2020, 12:57 am John Smith,  wrote:
>
>> You can create templates in the XML and programmatically when you say
>> getOrCreate() you can specify the template to use and pass in random name
>> for the cache name ...
>>
>>
>> https://apacheignite.readme.io/docs/cache-template#:~:text=Cache%20templates%20are%20useful%20when,CREATE%20TABLE%20and%20REST%20commands
>> .
>>
>> On Sat., Aug. 15, 2020, 8:53 a.m. itsmeravikiran.c, <
>> itsmeravikira...@gmail.com> wrote:
>>
>>> My cache ids are dynamic.
>>> Is it possible to add cache configuration in xml.
>>> I have checked, name property is mandatory. But i cannot add the name as
>>> it's dynamic name.
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>


Re: Cache configuration

2020-08-16 Thread C Ravikiran
As for the below, I have to change in xml and java code also.

Is there there any other possibility, without changing the java code, and
changing only xml file, shall we achive cache configuration??

As we don't have the java code access, we have the access to the
configuration
xml file.

Could you please help me with this?

Regards,
Ravikiran C




On Sun, 16 Aug, 2020, 12:57 am John Smith,  wrote:

> You can create templates in the XML and programmatically when you say
> getOrCreate() you can specify the template to use and pass in random name
> for the cache name ...
>
>
> https://apacheignite.readme.io/docs/cache-template#:~:text=Cache%20templates%20are%20useful%20when,CREATE%20TABLE%20and%20REST%20commands
> .
>
> On Sat., Aug. 15, 2020, 8:53 a.m. itsmeravikiran.c, <
> itsmeravikira...@gmail.com> wrote:
>
>> My cache ids are dynamic.
>> Is it possible to add cache configuration in xml.
>> I have checked, name property is mandatory. But i cannot add the name as
>> it's dynamic name.
>>
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>


Re: Cache configuration

2020-08-15 Thread John Smith
You can create templates in the XML and programmatically when you say
getOrCreate() you can specify the template to use and pass in random name
for the cache name ...

https://apacheignite.readme.io/docs/cache-template#:~:text=Cache%20templates%20are%20useful%20when,CREATE%20TABLE%20and%20REST%20commands
.

On Sat., Aug. 15, 2020, 8:53 a.m. itsmeravikiran.c, <
itsmeravikira...@gmail.com> wrote:

> My cache ids are dynamic.
> Is it possible to add cache configuration in xml.
> I have checked, name property is mandatory. But i cannot add the name as
> it's dynamic name.
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Cache configuration

2020-08-15 Thread itsmeravikiran.c
My cache ids are dynamic.
Is it possible to add cache configuration in xml. 
I have checked, name property is mandatory. But i cannot add the name as
it's dynamic name. 





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Near cache configuration for partitioned cache

2020-03-25 Thread Evgenii Zhuravlev
Dominik,

This cache was already created in the cluster with Near Cace for all nodes.
Once created, this configuration can't be changed, so, it's needed to clean
persistence data or just destroy the cache and create it without Near Cache
in configuration. After this, you can dynamically add Near caches for
clients.

Evgenii

ср, 25 мар. 2020 г. в 01:02, Dominik Przybysz :

> Hi,
> between first test with near cache configured in xml and configuring near
> cache via java code i cleaned data.
> But why should I clean data on server nodes when I add near cache only on
> client nodes to gain performance?
> Now I am testing ignite so I could do this, but it won't be acceptable
> when running on production.
>
> wt., 24 mar 2020 o 16:47 Evgenii Zhuravlev 
> napisał(a):
>
>> Hi,
>>
>> I see that you have persistence, did you clean the persistence directory
>> before changing configuration?
>>
>> Evgenii
>>
>> вт, 24 мар. 2020 г. в 02:33, Dominik Przybysz :
>>
>>> Hi,
>>> I configured client node as you described in you email and heap usage on
>>> server nodes does not look as expected:
>>>
>>>
>>> +===+
>>> |   Node ID8(@), IP   | CPUs | Heap Used | CPU Load |   Up Time
>>>| Size (Primary / Backup) | Hi/Mi/Rd/Wr  |
>>>
>>> +===+
>>> | 112132F5(@n3), 10.100.0.230 | 4| 36.49 %   | 76.50 %  |
>>> 00:13:10.385 | Total: 75069 (75069 / 0)| Hi: 19636833 |
>>> | |  |   |  |
>>>|   Heap: 75069 (75069 / )   | Mi: 39403166 |
>>> | |  |   |  |
>>>|   Off-Heap: 0 (0 / 0)   | Rd: 5903 |
>>> | |  |   |  |
>>>|   Off-Heap Memory: 0| Wr: 0|
>>>
>>> +-+--+---+--+--+-+--+
>>> | 74786280(@n2), 10.100.0.239 | 4| 33.94 %   | 81.07 %  |
>>> 01:06:23.896 | Total: 74817 (74817 / 0)| Hi: 22447160 |
>>> | |  |   |  |
>>>|   Heap: 74817 (74817 / )   | Mi: 44987105 |
>>> | |  |   |  |
>>>|   Off-Heap: 0 (0 / 0)   | Rd: 67434265 |
>>> | |  |   |  |
>>>|   Off-Heap Memory: 0| Wr: 0|
>>>
>>> +-+--+---+--+--+-+--+
>>> | 5AB7B5FD(@n0), 10.100.0.205 | 4| 69.39 %   | 15.50 %  |
>>> 00:52:54.529 | Total: 2706142 (1460736 / 1245406)  | Hi: 43629857 |
>>> | |  |   |  |
>>>|   Heap: 15 (15 / ) | Mi: 0|
>>> | |  |   |  |
>>>|   Off-Heap: 2556142 (1310736 / 1245406) | Rd: 43629857 |
>>> | |  |   |  |
>>>|   Off-Heap Memory: | Wr: 52347667 |
>>>
>>> +-+--+---+--+--+-+--+
>>> | 0608CF95(@n1), 10.100.0.206 | 4| 42.24 %   | 17.07 %  |
>>> 00:52:39.093 | Total: 2706142 (1395406 / 1310736)  | Hi: 43644401 |
>>> | |  |   |  |
>>>|   Heap: 15 (15 / ) | Mi: 0|
>>> | |  |   |  |
>>>|   Off-Heap: 2556142 (1245406 / 1310736) | Rd: 43644401 |
>>> | |  |   |  |
>>>|   Off-Heap Memory: | Wr: 52347791 |
>>>
>>> +---+
>>>
>>> 1st and 2nd entries are clients and 3rd and 4th are server nodes.
>>> My client nodes has LRU near cache with size 10 and I am querying
>>> cache with 15 random data.
>>> But why the

Re: Near cache configuration for partitioned cache

2020-03-25 Thread Dominik Przybysz
Hi,
between first test with near cache configured in xml and configuring near
cache via java code i cleaned data.
But why should I clean data on server nodes when I add near cache only on
client nodes to gain performance?
Now I am testing ignite so I could do this, but it won't be acceptable when
running on production.

wt., 24 mar 2020 o 16:47 Evgenii Zhuravlev 
napisał(a):

> Hi,
>
> I see that you have persistence, did you clean the persistence directory
> before changing configuration?
>
> Evgenii
>
> вт, 24 мар. 2020 г. в 02:33, Dominik Przybysz :
>
>> Hi,
>> I configured client node as you described in you email and heap usage on
>> server nodes does not look as expected:
>>
>>
>> +===+
>> |   Node ID8(@), IP   | CPUs | Heap Used | CPU Load |   Up Time
>>  | Size (Primary / Backup) | Hi/Mi/Rd/Wr  |
>>
>> +===+
>> | 112132F5(@n3), 10.100.0.230 | 4| 36.49 %   | 76.50 %  |
>> 00:13:10.385 | Total: 75069 (75069 / 0)| Hi: 19636833 |
>> | |  |   |  |
>>  |   Heap: 75069 (75069 / )   | Mi: 39403166 |
>> | |  |   |  |
>>  |   Off-Heap: 0 (0 / 0)   | Rd: 5903 |
>> | |  |   |  |
>>  |   Off-Heap Memory: 0| Wr: 0|
>>
>> +-+--+---+--+--+-+--+
>> | 74786280(@n2), 10.100.0.239 | 4| 33.94 %   | 81.07 %  |
>> 01:06:23.896 | Total: 74817 (74817 / 0)| Hi: 22447160 |
>> | |  |   |  |
>>  |   Heap: 74817 (74817 / )   | Mi: 44987105 |
>> | |  |   |  |
>>  |   Off-Heap: 0 (0 / 0)   | Rd: 67434265 |
>> | |  |   |  |
>>  |   Off-Heap Memory: 0| Wr: 0|
>>
>> +-+--+---+--+--+-+--+
>> | 5AB7B5FD(@n0), 10.100.0.205 | 4| 69.39 %   | 15.50 %  |
>> 00:52:54.529 | Total: 2706142 (1460736 / 1245406)  | Hi: 43629857 |
>> | |  |   |  |
>>  |   Heap: 15 (15 / ) | Mi: 0|
>> | |  |   |  |
>>  |   Off-Heap: 2556142 (1310736 / 1245406) | Rd: 43629857 |
>> | |  |   |  |
>>  |   Off-Heap Memory: | Wr: 52347667 |
>>
>> +-+--+---+--+--+-+--+
>> | 0608CF95(@n1), 10.100.0.206 | 4| 42.24 %   | 17.07 %  |
>> 00:52:39.093 | Total: 2706142 (1395406 / 1310736)  | Hi: 43644401 |
>> | |  |   |  |
>>  |   Heap: 15 (15 / ) | Mi: 0|
>> | |  |   |  |
>>  |   Off-Heap: 2556142 (1245406 / 1310736) | Rd: 43644401 |
>> | |  |   |  |
>>  |   Off-Heap Memory: | Wr: 52347791 |
>>
>> +---+
>>
>> 1st and 2nd entries are clients and 3rd and 4th are server nodes.
>> My client nodes has LRU near cache with size 10 and I am querying
>> cache with 15 random data.
>> But why there are heap entries on server nodes?
>>
>> wt., 24 mar 2020 o 08:40 Dominik Przybysz 
>> napisał(a):
>>
>>> Hi,
>>> exactly I want to have near cache only on client nodes. I will check
>>> your advice with dynamic cache.
>>> I have two server nodes which keep data and I want to get data from them
>>> via my client nodes.
>>> I am also  curious what had happened with heap on server nodes.
>>>
>>> pon., 23 mar 2020 o 23:13 Evgenii Zhuravlev 
>>> napisał(a):
>>>
>>>> Hi,
>>>>
>>>> Near Cache configuration in xml creates near caches for all nodes,
>>>

Re: Near cache configuration for partitioned cache

2020-03-24 Thread Evgenii Zhuravlev
Hi,

I see that you have persistence, did you clean the persistence directory
before changing configuration?

Evgenii

вт, 24 мар. 2020 г. в 02:33, Dominik Przybysz :

> Hi,
> I configured client node as you described in you email and heap usage on
> server nodes does not look as expected:
>
>
> +===+
> |   Node ID8(@), IP   | CPUs | Heap Used | CPU Load |   Up Time
>  | Size (Primary / Backup) | Hi/Mi/Rd/Wr  |
>
> +===+
> | 112132F5(@n3), 10.100.0.230 | 4| 36.49 %   | 76.50 %  | 00:13:10.385
> | Total: 75069 (75069 / 0)| Hi: 19636833 |
> | |  |   |  |
>  |   Heap: 75069 (75069 / )   | Mi: 39403166 |
> | |  |   |  |
>  |   Off-Heap: 0 (0 / 0)   | Rd: 5903 |
> | |  |   |  |
>  |   Off-Heap Memory: 0| Wr: 0|
>
> +-+--+---+--+--+-+--+
> | 74786280(@n2), 10.100.0.239 | 4| 33.94 %   | 81.07 %  | 01:06:23.896
> | Total: 74817 (74817 / 0)| Hi: 22447160 |
> | |  |   |  |
>  |   Heap: 74817 (74817 / )   | Mi: 44987105 |
> | |  |   |  |
>  |   Off-Heap: 0 (0 / 0)   | Rd: 67434265 |
> | |  |   |  |
>  |   Off-Heap Memory: 0| Wr: 0|
>
> +-+--+---+--+--+-+--+
> | 5AB7B5FD(@n0), 10.100.0.205 | 4| 69.39 %   | 15.50 %  | 00:52:54.529
> | Total: 2706142 (1460736 / 1245406)  | Hi: 43629857 |
> | |  |   |  |
>  |   Heap: 15 (15 / ) | Mi: 0|
> | |  |   |  |
>  |   Off-Heap: 2556142 (1310736 / 1245406) | Rd: 43629857 |
> | |  |   |  |
>  |   Off-Heap Memory: | Wr: 52347667 |
>
> +-+--+---+--+--+-+--+
> | 0608CF95(@n1), 10.100.0.206 | 4| 42.24 %   | 17.07 %  | 00:52:39.093
> | Total: 2706142 (1395406 / 1310736)  | Hi: 43644401 |
> | |  |   |  |
>  |   Heap: 15 (15 / ) | Mi: 0|
> | |  |   |  |
>  |   Off-Heap: 2556142 (1245406 / 1310736) | Rd: 43644401 |
> | |  |   |  |
>  |   Off-Heap Memory: | Wr: 52347791 |
>
> +---+
>
> 1st and 2nd entries are clients and 3rd and 4th are server nodes.
> My client nodes has LRU near cache with size 10 and I am querying
> cache with 15 random data.
> But why there are heap entries on server nodes?
>
> wt., 24 mar 2020 o 08:40 Dominik Przybysz 
> napisał(a):
>
>> Hi,
>> exactly I want to have near cache only on client nodes. I will check your
>> advice with dynamic cache.
>> I have two server nodes which keep data and I want to get data from them
>> via my client nodes.
>> I am also  curious what had happened with heap on server nodes.
>>
>> pon., 23 mar 2020 o 23:13 Evgenii Zhuravlev 
>> napisał(a):
>>
>>> Hi,
>>>
>>> Near Cache configuration in xml creates near caches for all nodes,
>>> including server nodes. As far as I understand, you want to have them on
>>> client side only, right? If so, I'd recommend to create them dynamically:
>>> https://www.gridgain.com/docs/latest/developers-guide/near-cache#creating-near-cache-dynamically-on-client-nodes
>>>
>>> What kind of operations are you running? Are you trying to access data
>>> on server from another server node? In any case, so many entries in Heap on
>>> server nodes looks strange.
>>>
>>> Evgenii
>>>
>>> пн, 23 мар. 2020 г. в 07:08, Dominik Przybysz :
>>>
>>>> Hi,
>>>> I am using Ignite 2

Re: Near cache configuration for partitioned cache

2020-03-24 Thread Dominik Przybysz
Hi,
I configured client node as you described in you email and heap usage on
server nodes does not look as expected:

+===+
|   Node ID8(@), IP   | CPUs | Heap Used | CPU Load |   Up Time
 | Size (Primary / Backup) | Hi/Mi/Rd/Wr  |
+===+
| 112132F5(@n3), 10.100.0.230 | 4| 36.49 %   | 76.50 %  | 00:13:10.385
| Total: 75069 (75069 / 0)| Hi: 19636833 |
| |  |   |  |
 |   Heap: 75069 (75069 / )   | Mi: 39403166 |
| |  |   |  |
 |   Off-Heap: 0 (0 / 0)   | Rd: 5903 |
| |  |   |  |
 |   Off-Heap Memory: 0| Wr: 0|
+-+--+---+--+--+-+--+
| 74786280(@n2), 10.100.0.239 | 4| 33.94 %   | 81.07 %  | 01:06:23.896
| Total: 74817 (74817 / 0)| Hi: 22447160 |
| |  |   |  |
 |   Heap: 74817 (74817 / )   | Mi: 44987105 |
| |  |   |  |
 |   Off-Heap: 0 (0 / 0)   | Rd: 67434265 |
| |  |   |  |
 |   Off-Heap Memory: 0| Wr: 0|
+-+--+---+--+--+-+--+
| 5AB7B5FD(@n0), 10.100.0.205 | 4| 69.39 %   | 15.50 %  | 00:52:54.529
| Total: 2706142 (1460736 / 1245406)  | Hi: 43629857 |
| |  |   |  |
 |   Heap: 15 (15 / ) | Mi: 0|
| |  |   |  |
 |   Off-Heap: 2556142 (1310736 / 1245406) | Rd: 43629857 |
| |  |   |  |
 |   Off-Heap Memory: | Wr: 52347667 |
+-+--+---+--+--+-+--+
| 0608CF95(@n1), 10.100.0.206 | 4| 42.24 %   | 17.07 %  | 00:52:39.093
| Total: 2706142 (1395406 / 1310736)  | Hi: 43644401 |
| |  |   |  |
 |   Heap: 15 (15 / ) | Mi: 0|
| |  |   |  |
 |   Off-Heap: 2556142 (1245406 / 1310736) | Rd: 43644401 |
| |  |   |  |
 |   Off-Heap Memory: | Wr: 52347791 |
+---+

1st and 2nd entries are clients and 3rd and 4th are server nodes.
My client nodes has LRU near cache with size 10 and I am querying cache
with 15 random data.
But why there are heap entries on server nodes?

wt., 24 mar 2020 o 08:40 Dominik Przybysz  napisał(a):

> Hi,
> exactly I want to have near cache only on client nodes. I will check your
> advice with dynamic cache.
> I have two server nodes which keep data and I want to get data from them
> via my client nodes.
> I am also  curious what had happened with heap on server nodes.
>
> pon., 23 mar 2020 o 23:13 Evgenii Zhuravlev 
> napisał(a):
>
>> Hi,
>>
>> Near Cache configuration in xml creates near caches for all nodes,
>> including server nodes. As far as I understand, you want to have them on
>> client side only, right? If so, I'd recommend to create them dynamically:
>> https://www.gridgain.com/docs/latest/developers-guide/near-cache#creating-near-cache-dynamically-on-client-nodes
>>
>> What kind of operations are you running? Are you trying to access data on
>> server from another server node? In any case, so many entries in Heap on
>> server nodes looks strange.
>>
>> Evgenii
>>
>> пн, 23 мар. 2020 г. в 07:08, Dominik Przybysz :
>>
>>> Hi,
>>> I am using Ignite 2.7.6 and I have 2 server nodes with one partitioned
>>> cache and configuration:
>>>
>>> 
>>> http://www.springframework.org/schema/beans;
>>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>>>xsi:schemaLocation="
>>>http://www.springframework.org/schema/beans
>>>http://www.springframework.org/schema/beans/spring-beans.xsd;>
>>>
>>> >> class="org.apache.ignite.configuration.IgniteConfigurati

Re: Near cache configuration for partitioned cache

2020-03-24 Thread Dominik Przybysz
Hi,
exactly I want to have near cache only on client nodes. I will check your
advice with dynamic cache.
I have two server nodes which keep data and I want to get data from them
via my client nodes.
I am also  curious what had happened with heap on server nodes.

pon., 23 mar 2020 o 23:13 Evgenii Zhuravlev 
napisał(a):

> Hi,
>
> Near Cache configuration in xml creates near caches for all nodes,
> including server nodes. As far as I understand, you want to have them on
> client side only, right? If so, I'd recommend to create them dynamically:
> https://www.gridgain.com/docs/latest/developers-guide/near-cache#creating-near-cache-dynamically-on-client-nodes
>
> What kind of operations are you running? Are you trying to access data on
> server from another server node? In any case, so many entries in Heap on
> server nodes looks strange.
>
> Evgenii
>
> пн, 23 мар. 2020 г. в 07:08, Dominik Przybysz :
>
>> Hi,
>> I am using Ignite 2.7.6 and I have 2 server nodes with one partitioned
>> cache and configuration:
>>
>> 
>> http://www.springframework.org/schema/beans;
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>>xsi:schemaLocation="
>>http://www.springframework.org/schema/beans
>>http://www.springframework.org/schema/beans/spring-beans.xsd;>
>>
>> > class="org.apache.ignite.configuration.IgniteConfiguration">
>> 
>> > class="org.apache.ignite.configuration.CacheConfiguration">
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> > class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
>> 
>> 
>> 
>>
>> 
>> > class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>> 
>> 
>> 
>> > class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>> 
>> 
>> ignite1:47100..47200
>> ignite2:47100..47200
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> > class="org.apache.ignite.configuration.ClientConnectorConfiguration">
>> 
>> 
>> 
>>
>> 
>> > class="org.apache.ignite.configuration.DataStorageConfiguration">
>> 
>> > class="org.apache.ignite.configuration.DataRegionConfiguration">
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>>
>> > value="{{ignite_system_thread_pool_size}}"/>
>> > value="{{ignite_cluster_data_streamer_thread_pool_size}}"/>
>> 
>> 
>>
>> I loaded 1,5mln entries into cluster via data streamer.
>> I tested this topology without near cache and everything was fine, but
>> when I tried to add near cache to my client nodes then server nodes started
>> to keep data on heap and reads rps dramatically fell down (150k rps to 10k
>> rps).
>>
>> My clients' configuration:
>>
>> 
>> http://www.springframework.org/schema/beans;
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>>xsi:schemaLocation="
>>http://www.springframework.org/schema/beans
>>http://www.springframework.org/schema/beans/spring-beans.xsd;>
>> > class="org.apache.ignite.configuration.IgniteConfiguration">
>> 
>> 
>> > class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>> 
>> > class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
>> 
>> 
>> ignite1:47100..47200
>> ignite2:47100..47200
>> 
>> 
>> 
>> 
>>   

Re: Near cache configuration for partitioned cache

2020-03-23 Thread Evgenii Zhuravlev
Hi,

Near Cache configuration in xml creates near caches for all nodes,
including server nodes. As far as I understand, you want to have them on
client side only, right? If so, I'd recommend to create them dynamically:
https://www.gridgain.com/docs/latest/developers-guide/near-cache#creating-near-cache-dynamically-on-client-nodes

What kind of operations are you running? Are you trying to access data on
server from another server node? In any case, so many entries in Heap on
server nodes looks strange.

Evgenii

пн, 23 мар. 2020 г. в 07:08, Dominik Przybysz :

> Hi,
> I am using Ignite 2.7.6 and I have 2 server nodes with one partitioned
> cache and configuration:
>
> 
> http://www.springframework.org/schema/beans;
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>xsi:schemaLocation="
>http://www.springframework.org/schema/beans
>http://www.springframework.org/schema/beans/spring-beans.xsd;>
>
>  class="org.apache.ignite.configuration.IgniteConfiguration">
> 
>  class="org.apache.ignite.configuration.CacheConfiguration">
> 
> 
> 
> 
> 
> 
>
> 
>  class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
> 
> 
> 
>
> 
>  class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
> 
> 
> 
>  class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
> 
> 
> ignite1:47100..47200
> ignite2:47100..47200
> 
> 
> 
> 
> 
> 
>
> 
>  class="org.apache.ignite.configuration.ClientConnectorConfiguration">
> 
> 
> 
>
> 
>  class="org.apache.ignite.configuration.DataStorageConfiguration">
> 
>  class="org.apache.ignite.configuration.DataRegionConfiguration">
> 
> 
> 
> 
> 
> 
> 
>
> 
>
>  value="{{ignite_system_thread_pool_size}}"/>
>  value="{{ignite_cluster_data_streamer_thread_pool_size}}"/>
> 
> 
>
> I loaded 1,5mln entries into cluster via data streamer.
> I tested this topology without near cache and everything was fine, but
> when I tried to add near cache to my client nodes then server nodes started
> to keep data on heap and reads rps dramatically fell down (150k rps to 10k
> rps).
>
> My clients' configuration:
>
> 
> http://www.springframework.org/schema/beans;
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>xsi:schemaLocation="
>http://www.springframework.org/schema/beans
>http://www.springframework.org/schema/beans/spring-beans.xsd;>
>  class="org.apache.ignite.configuration.IgniteConfiguration">
> 
> 
>  class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
> 
>  class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
> 
> 
> ignite1:47100..47200
> ignite2:47100..47200
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
>  class="org.apache.ignite.configuration.CacheConfiguration">
> 
> 
> 
> 
> 
>
> 
>  class="org.apache.ignite.configuration.NearCacheConfiguration">
> 
>  class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicyFactory">
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> On visor i see:
>
> Nodes for: cache1(@c0)
>
> +=

Near cache configuration for partitioned cache

2020-03-23 Thread Dominik Przybysz
4 (1499814 / ) | Mi: 0|
| |  |   |  |
 |   Off-Heap: 150 (769776 / 730224) | Rd: 17335702 |
| |  |   |  |
 |   Off-Heap Memory:   | Wr: 0|
+-+

1st and 2nd entry is client node, 3rd and 4th is server node.

What is wrong with my near cache configuration?
Do I have to mirror all cache configuration on server node into client
nodes configuration? (for example, when I miss backup parameter I received
exception "Affinity key backups mismatch")

-- 
Pozdrawiam / Regards,
Dominik Przybysz


Re: Server side cache configuration only

2020-01-31 Thread Ilya Kasnacheev
Hello!

2) Why? These classes will not be accessible by code running on Client.

Regards,
-- 
Ilya Kasnacheev


пн, 27 янв. 2020 г. в 23:43, Sabar Banks :

> Hello Ignite Community,
>
> My questions are:
>
> 1) Is it possible to only define cache configurations on the server side,
> via xml, and avoid defining caches on the client side?
>
> 2) Is it possible to only have data bean classes listed in a cache config,
> to ONLY exist on the server side physically? I am trying to only have the
> bean definitions in one place: server.
>
> Let me know
>
> Thanks.
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Server side cache configuration only

2020-01-27 Thread Mikael

Hi!

1) You do not need to have cache configuration on client side, I do that 
all the time.


2) Do not know

Mikael

Den 2020-01-27 kl. 21:42, skrev Sabar Banks:

Hello Ignite Community,

My questions are:

1) Is it possible to only define cache configurations on the server side,
via xml, and avoid defining caches on the client side?

2) Is it possible to only have data bean classes listed in a cache config,
to ONLY exist on the server side physically? I am trying to only have the
bean definitions in one place: server.

Let me know

Thanks.




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Server side cache configuration only

2020-01-27 Thread Sabar Banks
Hello Ignite Community, 

My questions are:

1) Is it possible to only define cache configurations on the server side,
via xml, and avoid defining caches on the client side? 

2) Is it possible to only have data bean classes listed in a cache config,
to ONLY exist on the server side physically? I am trying to only have the
bean definitions in one place: server.

Let me know

Thanks.  




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Do client nodes also have to define the cache configuration?

2019-02-27 Thread PBSLogitek
Thank you very much



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Do client nodes also have to define the cache configuration?

2019-02-27 Thread Ilya Kasnacheev
Hello!

No, it is not necessary. But you can supply additional configurations of
caches which will be started when client joins.

Regards,
-- 
Ilya Kasnacheev


ср, 27 февр. 2019 г. в 12:03, PBSLogitek :

> Hello
>
> I have a simple question. I have a server a node and some clients
> connecting
> to it. In my server xml configuration i have defined all caches. Now my
> question is do i have to define those caches in my client xml config to or
> is it not necessary? Will i get an error when i try to access a cache from
> a
> client that is not defined in xml?
>
> Thx
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Do client nodes also have to define the cache configuration?

2019-02-27 Thread PBSLogitek
Hello

I have a simple question. I have a server a node and some clients connecting
to it. In my server xml configuration i have defined all caches. Now my
question is do i have to define those caches in my client xml config to or
is it not necessary? Will i get an error when i try to access a cache from a
client that is not defined in xml?

Thx



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache Configuration Templates

2018-08-29 Thread Dave Harvey
The SQL interface does not allow you to configure details of the cache
except via templates.   The use case is I want to start with the cluster
specific defaults for a cache, and add some others.

I can create a empty real cache that has the defaults, and use its
configuration in the CacheConfiguration constructor,   but we already have
templates.

On Wed, Aug 29, 2018 at 4:55 AM, Ilya Kasnacheev 
wrote:

> Hello!
>
> Why don't you just use CREATE TABLE for that? I doubt there will be any
> significant overhead even if you never use any SQL and only use Cache API
> after that.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> вт, 28 авг. 2018 г. в 17:37, Dave Harvey :
>
>> I did a suggested edit adding the Spring configuration of templates.
>> The rest of the current semantics seem a bit odd, so I was somewhat at a
>> loss as to what to write.
>>
>> The wildcard approach means that I have to know the structure of the
>> cache name a priori.   Seems like there should be a Java API that is
>> equivalent to CREATE TABLE with allows a cache to be created from an
>> arbitrary template name, as well as a way to retrieve a copy of the
>> CacheConfiguration from a template name, so that it can subsequently be
>> enhanced.  I would assume that Ignite.cache(templateName) would fail if
>> the template name has a "*" in it, and instantiate a cache otherwise.
>>
>> On Mon, Aug 27, 2018 at 7:31 AM, Ilya Kasnacheev <
>> ilya.kasnach...@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> Unfortunately, cache templates are not documented that good. AFAIK they
>>> were mostly implemented to be able to reference to complex cache
>>> configurations with CREATE TABLE.
>>>
>>> As far as my understanding goes, caches from cacheConfigurations are
>>> actually started when grid starts.
>>>
>>> 1) I think that only the first one will be used to create a cache. Even
>>> if you join a node with distinct cacheConfigurations to the cluster, and it
>>> already has some caches started, those will just be re-used (by name).
>>> 2) Yes, you can have a cacheConfiguration with name "prefix*", which
>>> will lead to a) not starting this cache on grid start, and b) when you
>>> start a cache "prefix1" it will use configuration from template. There's a
>>> test for it named IgniteCacheConfigurationTemplateTest in code base.
>>> 3) Nothing will happen, it will return early if such cache already
>>> exists.
>>> 4) Yes.
>>> 5) Good question, I will have to check that. Still I won't rely on that
>>> and just always have this configuration around.
>>> 6) See above about the '*'.
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> сб, 25 авг. 2018 г. в 0:55, Dave Harvey :
>>>
 I found what I've read in this area confusing, and here is my current
 understanding.

 When creating an IgniteConfiguration in Java or XML, I can specify the
 property cacheConfiguration, which is an array of
 CacheConfigurations.  This causes Ignite to preserve these configurations,
 but this will not cause Ignite to create a cache. If I call
 Ignite.getOrCreateCache(string), if there is an existing cache, I will
 get that, otherwise a new cache will be created using that configuration.

 It seems like creating a cache with a configuration will add to this
 list, because Ignite.configuration.getCacheConfiguration() returns all
 caches.

 I can later call Ignite.addCacheConfiguration(). This will add a
 template to that list.

 Questions:
 1)  what happens if there are entries with duplicate names on
 IgniteConfiguration.setCacheConfiguration()   when this is used to
 create a grid?
 2) There was mention in one e-mail talking about a convention where
 templates have "*" in their name?
 3) What happens if addCacheConfiguration() tries to add a duplicate
 name?
 4) Is a template simply a cache that not fully instantiated?
 5) What about template persistence?   Are they persisted if they
 specify a region that is persistent?
 6) My use case is that I want to create caches based some default for
 the cluster, so in Java I would like to construct the new configuration
 from the a template of a known name.   So far, I can only see that I can
 call Ignite.configuration.getCacheConfiguration() and then search the
 array for a matching name.   Is there a better way?


 *Disclaimer*

 The information contained in this communication from the sender is
 confidential. It is intended solely for use by the recipient and others
 authorized to receive it. If you are not the recipient, you are hereby
 notified that any disclosure, copying, distribution or taking action in
 relation of the contents of this information is strictly prohibited and may
 be unlawful.

 This email has been scanned for viruses and malware, and may have been
 automatically archived by *Mimecast Ltd*, an innovator in Software as
 a Service (SaaS) 

Re: Cache Configuration Templates

2018-08-29 Thread Ilya Kasnacheev
Hello!

Why don't you just use CREATE TABLE for that? I doubt there will be any
significant overhead even if you never use any SQL and only use Cache API
after that.

Regards,
-- 
Ilya Kasnacheev


вт, 28 авг. 2018 г. в 17:37, Dave Harvey :

> I did a suggested edit adding the Spring configuration of templates.
> The rest of the current semantics seem a bit odd, so I was somewhat at a
> loss as to what to write.
>
> The wildcard approach means that I have to know the structure of the cache
> name a priori.   Seems like there should be a Java API that is equivalent
> to CREATE TABLE with allows a cache to be created from an arbitrary
> template name, as well as a way to retrieve a copy of the
> CacheConfiguration from a template name, so that it can subsequently be
> enhanced.  I would assume that Ignite.cache(templateName) would fail if
> the template name has a "*" in it, and instantiate a cache otherwise.
>
> On Mon, Aug 27, 2018 at 7:31 AM, Ilya Kasnacheev <
> ilya.kasnach...@gmail.com> wrote:
>
>> Hello!
>>
>> Unfortunately, cache templates are not documented that good. AFAIK they
>> were mostly implemented to be able to reference to complex cache
>> configurations with CREATE TABLE.
>>
>> As far as my understanding goes, caches from cacheConfigurations are
>> actually started when grid starts.
>>
>> 1) I think that only the first one will be used to create a cache. Even
>> if you join a node with distinct cacheConfigurations to the cluster, and it
>> already has some caches started, those will just be re-used (by name).
>> 2) Yes, you can have a cacheConfiguration with name "prefix*", which will
>> lead to a) not starting this cache on grid start, and b) when you start a
>> cache "prefix1" it will use configuration from template. There's a test for
>> it named IgniteCacheConfigurationTemplateTest in code base.
>> 3) Nothing will happen, it will return early if such cache already exists.
>> 4) Yes.
>> 5) Good question, I will have to check that. Still I won't rely on that
>> and just always have this configuration around.
>> 6) See above about the '*'.
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> сб, 25 авг. 2018 г. в 0:55, Dave Harvey :
>>
>>> I found what I've read in this area confusing, and here is my current
>>> understanding.
>>>
>>> When creating an IgniteConfiguration in Java or XML, I can specify the
>>> property cacheConfiguration, which is an array of CacheConfigurations.
>>> This causes Ignite to preserve these configurations, but this will not
>>> cause Ignite to create a cache. If I call
>>> Ignite.getOrCreateCache(string), if there is an existing cache, I will get
>>> that, otherwise a new cache will be created using that configuration.
>>>
>>> It seems like creating a cache with a configuration will add to this
>>> list, because Ignite.configuration.getCacheConfiguration() returns all
>>> caches.
>>>
>>> I can later call Ignite.addCacheConfiguration(). This will add a
>>> template to that list.
>>>
>>> Questions:
>>> 1)  what happens if there are entries with duplicate names on
>>> IgniteConfiguration.setCacheConfiguration()   when this is used to create a
>>> grid?
>>> 2) There was mention in one e-mail talking about a convention where
>>> templates have "*" in their name?
>>> 3) What happens if addCacheConfiguration() tries to add a duplicate name?
>>> 4) Is a template simply a cache that not fully instantiated?
>>> 5) What about template persistence?   Are they persisted if they specify
>>> a region that is persistent?
>>> 6) My use case is that I want to create caches based some default for
>>> the cluster, so in Java I would like to construct the new configuration
>>> from the a template of a known name.   So far, I can only see that I can
>>> call Ignite.configuration.getCacheConfiguration() and then search the array
>>> for a matching name.   Is there a better way?
>>>
>>>
>>> *Disclaimer*
>>>
>>> The information contained in this communication from the sender is
>>> confidential. It is intended solely for use by the recipient and others
>>> authorized to receive it. If you are not the recipient, you are hereby
>>> notified that any disclosure, copying, distribution or taking action in
>>> relation of the contents of this information is strictly prohibited and may
>>> be unlawful.
>>>
>>> This email has been scanned for viruses and malware, and may have been
>>> automatically archived by *Mimecast Ltd*, an innovator in Software as a
>>> Service (SaaS) for business. Providing a *safer* and *more useful*
>>> place for your human generated data. Specializing in; Security, archiving
>>> and compliance. To find out more Click Here
>>> .
>>>
>>
>
>
> *Disclaimer*
>
> The information contained in this communication from the sender is
> confidential. It is intended solely for use by the recipient and others
> authorized to receive it. If you are not the recipient, you are hereby
> notified that any disclosure, copying, distribution or taking 

Re: Cache Configuration Templates

2018-08-28 Thread Dave Harvey
I did a suggested edit adding the Spring configuration of templates.The
rest of the current semantics seem a bit odd, so I was somewhat at a loss
as to what to write.

The wildcard approach means that I have to know the structure of the cache
name a priori.   Seems like there should be a Java API that is equivalent
to CREATE TABLE with allows a cache to be created from an arbitrary
template name, as well as a way to retrieve a copy of the
CacheConfiguration from a template name, so that it can subsequently be
enhanced.  I would assume that Ignite.cache(templateName) would fail if
the template name has a "*" in it, and instantiate a cache otherwise.

On Mon, Aug 27, 2018 at 7:31 AM, Ilya Kasnacheev 
wrote:

> Hello!
>
> Unfortunately, cache templates are not documented that good. AFAIK they
> were mostly implemented to be able to reference to complex cache
> configurations with CREATE TABLE.
>
> As far as my understanding goes, caches from cacheConfigurations are
> actually started when grid starts.
>
> 1) I think that only the first one will be used to create a cache. Even if
> you join a node with distinct cacheConfigurations to the cluster, and it
> already has some caches started, those will just be re-used (by name).
> 2) Yes, you can have a cacheConfiguration with name "prefix*", which will
> lead to a) not starting this cache on grid start, and b) when you start a
> cache "prefix1" it will use configuration from template. There's a test for
> it named IgniteCacheConfigurationTemplateTest in code base.
> 3) Nothing will happen, it will return early if such cache already exists.
> 4) Yes.
> 5) Good question, I will have to check that. Still I won't rely on that
> and just always have this configuration around.
> 6) See above about the '*'.
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> сб, 25 авг. 2018 г. в 0:55, Dave Harvey :
>
>> I found what I've read in this area confusing, and here is my current
>> understanding.
>>
>> When creating an IgniteConfiguration in Java or XML, I can specify the
>> property cacheConfiguration, which is an array of CacheConfigurations.
>> This causes Ignite to preserve these configurations, but this will not
>> cause Ignite to create a cache. If I call Ignite.getOrCreateCache(string),
>> if there is an existing cache, I will get that, otherwise a new cache will
>> be created using that configuration.
>>
>> It seems like creating a cache with a configuration will add to this
>> list, because Ignite.configuration.getCacheConfiguration() returns all
>> caches.
>>
>> I can later call Ignite.addCacheConfiguration(). This will add a
>> template to that list.
>>
>> Questions:
>> 1)  what happens if there are entries with duplicate names on
>> IgniteConfiguration.setCacheConfiguration()   when this is used to
>> create a grid?
>> 2) There was mention in one e-mail talking about a convention where
>> templates have "*" in their name?
>> 3) What happens if addCacheConfiguration() tries to add a duplicate name?
>> 4) Is a template simply a cache that not fully instantiated?
>> 5) What about template persistence?   Are they persisted if they specify
>> a region that is persistent?
>> 6) My use case is that I want to create caches based some default for
>> the cluster, so in Java I would like to construct the new configuration
>> from the a template of a known name.   So far, I can only see that I can
>> call Ignite.configuration.getCacheConfiguration() and then search the
>> array for a matching name.   Is there a better way?
>>
>>
>> *Disclaimer*
>>
>> The information contained in this communication from the sender is
>> confidential. It is intended solely for use by the recipient and others
>> authorized to receive it. If you are not the recipient, you are hereby
>> notified that any disclosure, copying, distribution or taking action in
>> relation of the contents of this information is strictly prohibited and may
>> be unlawful.
>>
>> This email has been scanned for viruses and malware, and may have been
>> automatically archived by *Mimecast Ltd*, an innovator in Software as a
>> Service (SaaS) for business. Providing a *safer* and *more useful* place
>> for your human generated data. Specializing in; Security, archiving and
>> compliance. To find out more Click Here
>> .
>>
>

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast Ltd, an innovator in Software as a Service 
(SaaS) for business. Providing a safer and more useful place for your human 
generated data. Specializing in; Security, archiving and 

Re: Cache Configuration Templates

2018-08-27 Thread Ilya Kasnacheev
Hello!

Unfortunately, cache templates are not documented that good. AFAIK they
were mostly implemented to be able to reference to complex cache
configurations with CREATE TABLE.

As far as my understanding goes, caches from cacheConfigurations are
actually started when grid starts.

1) I think that only the first one will be used to create a cache. Even if
you join a node with distinct cacheConfigurations to the cluster, and it
already has some caches started, those will just be re-used (by name).
2) Yes, you can have a cacheConfiguration with name "prefix*", which will
lead to a) not starting this cache on grid start, and b) when you start a
cache "prefix1" it will use configuration from template. There's a test for
it named IgniteCacheConfigurationTemplateTest in code base.
3) Nothing will happen, it will return early if such cache already exists.
4) Yes.
5) Good question, I will have to check that. Still I won't rely on that and
just always have this configuration around.
6) See above about the '*'.

Regards,
-- 
Ilya Kasnacheev


сб, 25 авг. 2018 г. в 0:55, Dave Harvey :

> I found what I've read in this area confusing, and here is my current
> understanding.
>
> When creating an IgniteConfiguration in Java or XML, I can specify the
> property cacheConfiguration, which is an array of CacheConfigurations.
> This causes Ignite to preserve these configurations, but this will not
> cause Ignite to create a cache. If I call
> Ignite.getOrCreateCache(string), if there is an existing cache, I will get
> that, otherwise a new cache will be created using that configuration.
>
> It seems like creating a cache with a configuration will add to this list,
> because Ignite.configuration.getCacheConfiguration() returns all caches.
>
>
> I can later call Ignite.addCacheConfiguration(). This will add a template
> to that list.
>
> Questions:
> 1)  what happens if there are entries with duplicate names on
> IgniteConfiguration.setCacheConfiguration()   when this is used to create a
> grid?
> 2) There was mention in one e-mail talking about a convention where
> templates have "*" in their name?
> 3) What happens if addCacheConfiguration() tries to add a duplicate name?
> 4) Is a template simply a cache that not fully instantiated?
> 5) What about template persistence?   Are they persisted if they specify a
> region that is persistent?
> 6) My use case is that I want to create caches based some default for the
> cluster, so in Java I would like to construct the new configuration from
> the a template of a known name.   So far, I can only see that I can call
> Ignite.configuration.getCacheConfiguration() and then search the array for
> a matching name.   Is there a better way?
>
>
> *Disclaimer*
>
> The information contained in this communication from the sender is
> confidential. It is intended solely for use by the recipient and others
> authorized to receive it. If you are not the recipient, you are hereby
> notified that any disclosure, copying, distribution or taking action in
> relation of the contents of this information is strictly prohibited and may
> be unlawful.
>
> This email has been scanned for viruses and malware, and may have been
> automatically archived by *Mimecast Ltd*, an innovator in Software as a
> Service (SaaS) for business. Providing a *safer* and *more useful* place
> for your human generated data. Specializing in; Security, archiving and
> compliance. To find out more Click Here
> .
>


Cache Configuration Templates

2018-08-24 Thread Dave Harvey
I found what I've read in this area confusing, and here is my current
understanding.

When creating an IgniteConfiguration in Java or XML, I can specify the
property cacheConfiguration, which is an array of CacheConfigurations.
This causes Ignite to preserve these configurations, but this will not
cause Ignite to create a cache. If I call Ignite.getOrCreateCache(string),
if there is an existing cache, I will get that, otherwise a new cache will
be created using that configuration.

It seems like creating a cache with a configuration will add to this list,
because Ignite.configuration.getCacheConfiguration() returns all caches.

I can later call Ignite.addCacheConfiguration(). This will add a template
to that list.

Questions:
1)  what happens if there are entries with duplicate names on
IgniteConfiguration.setCacheConfiguration()   when this is used to create a
grid?
2) There was mention in one e-mail talking about a convention where
templates have "*" in their name?
3) What happens if addCacheConfiguration() tries to add a duplicate name?
4) Is a template simply a cache that not fully instantiated?
5) What about template persistence?   Are they persisted if they specify a
region that is persistent?
6) My use case is that I want to create caches based some default for the
cluster, so in Java I would like to construct the new configuration from
the a template of a known name.   So far, I can only see that I can call
Ignite.configuration.getCacheConfiguration() and then search the array for
a matching name.   Is there a better way?

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast Ltd, an innovator in Software as a Service 
(SaaS) for business. Providing a safer and more useful place for your human 
generated data. Specializing in; Security, archiving and compliance. To find 
out more visit the Mimecast website.


Re: cache configuration FULL_SYNC

2018-07-09 Thread Evgenii Zhuravlev
Ignite internally guarantees that write through to the 3rd party cache
store will be consistent with the update of the cache.

Evgenii

2018-07-09 17:50 GMT+03:00 Prasad Bhalerao :

> When you have multiple data sources (cache and oracle in this case) which
> should be updated in single transaction we use JTA. But with ignite
> transaction and ignite write through approach I don't have to use JTA.
> To keep the cache and oracle consistent one needs transaction.  In this
> case one update operation spans to multiple data sources.
>
> On Mon, Jul 9, 2018 at 8:05 PM Evgenii Zhuravlev 
> wrote:
>
>> No, you're not correct, each insert/update will be consistent between
>> cache and DB, transactions are not about consistency between cache and
>> oracle database here, it's about more than one operation, as in an
>> example I've shared in my previous message.
>>
>> Evgenii
>>
>> 2018-07-09 17:24 GMT+03:00 Prasad Bhalerao 
>> :
>>
>>> Thank you for the clarification.
>>>
>>> Ignite does not support transactions with jdbc updates. So if I use
>>> delete/update SQL to delete/update the multiple cache entries, ignite will
>>> not provide strong consistency between cache and oracle database.
>>> Am I correct?
>>>
>>> On Mon, Jul 9, 2018 at 7:43 PM Evgenii Zhuravlev <
>>> e.zhuravlev...@gmail.com> wrote:
>>>
 1. As this doc says: https://apacheignite.readme.
 io/docs/3rd-party-store: Ignite writes through results of its SQL
 INSERT, UPDATE and MERGE queries.
 2. Transaction in Ignite means absolutely the same as in another
 systems. If you want two or more changes to be in one transaction(i.e.,
 classic example with transfer between bank accounts), then, for sure, you
 need to use transactions.

 Evgenii

 2018-07-09 16:52 GMT+03:00 Prasad Bhalerao <
 prasadbhalerao1...@gmail.com>:

> Resending my last mail ...
>
> I understand that FULL_SYNC is required to keep the consistency
> between primary data node and backup data node and not between the cache
> and 3rd party data.
> Sorry for asking the incorrect question.
>
> 1) Does ignite supports write through updates to 3rd party store when
> using update or delete sql?
>
> 2) Is it mandatory to use ignite transaction to keep strong
> consistency between in memory cache and 3rd party data store?
> -Like you said, if I am updating more than one entry in cache then
> transaction is necessary to keep strong consistency between 3rd party db
> and ignite cache. Am I correct?
>
> Thanks,
> Prasad
>
> On Mon, Jul 9, 2018 at 6:38 PM Evgenii Zhuravlev <
> e.zhuravlev...@gmail.com> wrote:
>
>> Hi,
>>
>> 1. Cache write synchronization mode is not about 3rd party store,
>> it's about waiting for write replies from other nodes. But Ignite
>> with enabled 3rd party store guarantees consistency itself.
>>
>> 2. Ignite creates implicit transactions for atomic updates to
>> guarantee consistency between nodes. If you want to make more than one
>> update in transaction, then, of course, you should use explicit Ignite
>> transactions.
>>
>> Evgenii
>>
>> 2018-07-09 15:37 GMT+03:00 Prasad Bhalerao <
>> prasadbhalerao1...@gmail.com>:
>>
>>> Hi,
>>>
>>> I am using FULL_SYNC cache write synchronization mode.
>>> 1) Does FULL_SYNC mode guarantees 100% consistency between ignite in
>>> memory cache and 3rd party data store (oracle in my case)?
>>>
>>> 2) Does FULL_SYNC mode requires to do the cache updates in ignite
>>> transaction?( I am using write through approach.)
>>>
>>>
>>> Thanks,
>>> Prasad
>>>
>>
>>

>>


Re: cache configuration FULL_SYNC

2018-07-09 Thread Prasad Bhalerao
When you have multiple data sources (cache and oracle in this case) which
should be updated in single transaction we use JTA. But with ignite
transaction and ignite write through approach I don't have to use JTA.
To keep the cache and oracle consistent one needs transaction.  In this
case one update operation spans to multiple data sources.

On Mon, Jul 9, 2018 at 8:05 PM Evgenii Zhuravlev 
wrote:

> No, you're not correct, each insert/update will be consistent between
> cache and DB, transactions are not about consistency between cache and
> oracle database here, it's about more than one operation, as in an
> example I've shared in my previous message.
>
> Evgenii
>
> 2018-07-09 17:24 GMT+03:00 Prasad Bhalerao :
>
>> Thank you for the clarification.
>>
>> Ignite does not support transactions with jdbc updates. So if I use
>> delete/update SQL to delete/update the multiple cache entries, ignite will
>> not provide strong consistency between cache and oracle database.
>> Am I correct?
>>
>> On Mon, Jul 9, 2018 at 7:43 PM Evgenii Zhuravlev <
>> e.zhuravlev...@gmail.com> wrote:
>>
>>> 1. As this doc says: https://apacheignite.readme.io/docs/3rd-party-store:
>>> Ignite writes through results of its SQL INSERT, UPDATE and MERGE queries.
>>> 2. Transaction in Ignite means absolutely the same as in another
>>> systems. If you want two or more changes to be in one transaction(i.e.,
>>> classic example with transfer between bank accounts), then, for sure, you
>>> need to use transactions.
>>>
>>> Evgenii
>>>
>>> 2018-07-09 16:52 GMT+03:00 Prasad Bhalerao >> >:
>>>
 Resending my last mail ...

 I understand that FULL_SYNC is required to keep the consistency between
 primary data node and backup data node and not between the cache and 3rd
 party data.
 Sorry for asking the incorrect question.

 1) Does ignite supports write through updates to 3rd party store when
 using update or delete sql?

 2) Is it mandatory to use ignite transaction to keep strong consistency
 between in memory cache and 3rd party data store?
 -Like you said, if I am updating more than one entry in cache then
 transaction is necessary to keep strong consistency between 3rd party db
 and ignite cache. Am I correct?

 Thanks,
 Prasad

 On Mon, Jul 9, 2018 at 6:38 PM Evgenii Zhuravlev <
 e.zhuravlev...@gmail.com> wrote:

> Hi,
>
> 1. Cache write synchronization mode is not about 3rd party store, it's
> about waiting for write replies from other nodes. But Ignite with
> enabled 3rd party store guarantees consistency itself.
>
> 2. Ignite creates implicit transactions for atomic updates to
> guarantee consistency between nodes. If you want to make more than one
> update in transaction, then, of course, you should use explicit Ignite
> transactions.
>
> Evgenii
>
> 2018-07-09 15:37 GMT+03:00 Prasad Bhalerao <
> prasadbhalerao1...@gmail.com>:
>
>> Hi,
>>
>> I am using FULL_SYNC cache write synchronization mode.
>> 1) Does FULL_SYNC mode guarantees 100% consistency between ignite in
>> memory cache and 3rd party data store (oracle in my case)?
>>
>> 2) Does FULL_SYNC mode requires to do the cache updates in ignite
>> transaction?( I am using write through approach.)
>>
>>
>> Thanks,
>> Prasad
>>
>
>
>>>
>


Re: cache configuration FULL_SYNC

2018-07-09 Thread Evgenii Zhuravlev
No, you're not correct, each insert/update will be consistent between cache
and DB, transactions are not about consistency between cache and oracle
database here, it's about more than one operation, as in an example I've
shared in my previous message.

Evgenii

2018-07-09 17:24 GMT+03:00 Prasad Bhalerao :

> Thank you for the clarification.
>
> Ignite does not support transactions with jdbc updates. So if I use
> delete/update SQL to delete/update the multiple cache entries, ignite will
> not provide strong consistency between cache and oracle database.
> Am I correct?
>
> On Mon, Jul 9, 2018 at 7:43 PM Evgenii Zhuravlev 
> wrote:
>
>> 1. As this doc says: https://apacheignite.readme.io/docs/3rd-party-store:
>> Ignite writes through results of its SQL INSERT, UPDATE and MERGE queries.
>> 2. Transaction in Ignite means absolutely the same as in another systems.
>> If you want two or more changes to be in one transaction(i.e., classic
>> example with transfer between bank accounts), then, for sure, you need to
>> use transactions.
>>
>> Evgenii
>>
>> 2018-07-09 16:52 GMT+03:00 Prasad Bhalerao 
>> :
>>
>>> Resending my last mail ...
>>>
>>> I understand that FULL_SYNC is required to keep the consistency between
>>> primary data node and backup data node and not between the cache and 3rd
>>> party data.
>>> Sorry for asking the incorrect question.
>>>
>>> 1) Does ignite supports write through updates to 3rd party store when
>>> using update or delete sql?
>>>
>>> 2) Is it mandatory to use ignite transaction to keep strong consistency
>>> between in memory cache and 3rd party data store?
>>> -Like you said, if I am updating more than one entry in cache then
>>> transaction is necessary to keep strong consistency between 3rd party db
>>> and ignite cache. Am I correct?
>>>
>>> Thanks,
>>> Prasad
>>>
>>> On Mon, Jul 9, 2018 at 6:38 PM Evgenii Zhuravlev <
>>> e.zhuravlev...@gmail.com> wrote:
>>>
 Hi,

 1. Cache write synchronization mode is not about 3rd party store, it's
 about waiting for write replies from other nodes. But Ignite with
 enabled 3rd party store guarantees consistency itself.

 2. Ignite creates implicit transactions for atomic updates to guarantee
 consistency between nodes. If you want to make more than one update in
 transaction, then, of course, you should use explicit Ignite transactions.

 Evgenii

 2018-07-09 15:37 GMT+03:00 Prasad Bhalerao <
 prasadbhalerao1...@gmail.com>:

> Hi,
>
> I am using FULL_SYNC cache write synchronization mode.
> 1) Does FULL_SYNC mode guarantees 100% consistency between ignite in
> memory cache and 3rd party data store (oracle in my case)?
>
> 2) Does FULL_SYNC mode requires to do the cache updates in ignite
> transaction?( I am using write through approach.)
>
>
> Thanks,
> Prasad
>


>>


Re: cache configuration FULL_SYNC

2018-07-09 Thread Prasad Bhalerao
Thank you for the clarification.

Ignite does not support transactions with jdbc updates. So if I use
delete/update SQL to delete/update the multiple cache entries, ignite will
not provide strong consistency between cache and oracle database.
Am I correct?

On Mon, Jul 9, 2018 at 7:43 PM Evgenii Zhuravlev 
wrote:

> 1. As this doc says: https://apacheignite.readme.io/docs/3rd-party-store:
> Ignite writes through results of its SQL INSERT, UPDATE and MERGE queries.
> 2. Transaction in Ignite means absolutely the same as in another systems.
> If you want two or more changes to be in one transaction(i.e., classic
> example with transfer between bank accounts), then, for sure, you need to
> use transactions.
>
> Evgenii
>
> 2018-07-09 16:52 GMT+03:00 Prasad Bhalerao :
>
>> Resending my last mail ...
>>
>> I understand that FULL_SYNC is required to keep the consistency between
>> primary data node and backup data node and not between the cache and 3rd
>> party data.
>> Sorry for asking the incorrect question.
>>
>> 1) Does ignite supports write through updates to 3rd party store when
>> using update or delete sql?
>>
>> 2) Is it mandatory to use ignite transaction to keep strong consistency
>> between in memory cache and 3rd party data store?
>> -Like you said, if I am updating more than one entry in cache then
>> transaction is necessary to keep strong consistency between 3rd party db
>> and ignite cache. Am I correct?
>>
>> Thanks,
>> Prasad
>>
>> On Mon, Jul 9, 2018 at 6:38 PM Evgenii Zhuravlev <
>> e.zhuravlev...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> 1. Cache write synchronization mode is not about 3rd party store, it's
>>> about waiting for write replies from other nodes. But Ignite with
>>> enabled 3rd party store guarantees consistency itself.
>>>
>>> 2. Ignite creates implicit transactions for atomic updates to guarantee
>>> consistency between nodes. If you want to make more than one update in
>>> transaction, then, of course, you should use explicit Ignite transactions.
>>>
>>> Evgenii
>>>
>>> 2018-07-09 15:37 GMT+03:00 Prasad Bhalerao >> >:
>>>
 Hi,

 I am using FULL_SYNC cache write synchronization mode.
 1) Does FULL_SYNC mode guarantees 100% consistency between ignite in
 memory cache and 3rd party data store (oracle in my case)?

 2) Does FULL_SYNC mode requires to do the cache updates in ignite
 transaction?( I am using write through approach.)


 Thanks,
 Prasad

>>>
>>>
>


Re: cache configuration FULL_SYNC

2018-07-09 Thread Evgenii Zhuravlev
1. As this doc says: https://apacheignite.readme.io/docs/3rd-party-store:
Ignite writes through results of its SQL INSERT, UPDATE and MERGE queries.
2. Transaction in Ignite means absolutely the same as in another systems.
If you want two or more changes to be in one transaction(i.e., classic
example with transfer between bank accounts), then, for sure, you need to
use transactions.

Evgenii

2018-07-09 16:52 GMT+03:00 Prasad Bhalerao :

> Resending my last mail ...
>
> I understand that FULL_SYNC is required to keep the consistency between
> primary data node and backup data node and not between the cache and 3rd
> party data.
> Sorry for asking the incorrect question.
>
> 1) Does ignite supports write through updates to 3rd party store when
> using update or delete sql?
>
> 2) Is it mandatory to use ignite transaction to keep strong consistency
> between in memory cache and 3rd party data store?
> -Like you said, if I am updating more than one entry in cache then
> transaction is necessary to keep strong consistency between 3rd party db
> and ignite cache. Am I correct?
>
> Thanks,
> Prasad
>
> On Mon, Jul 9, 2018 at 6:38 PM Evgenii Zhuravlev 
> wrote:
>
>> Hi,
>>
>> 1. Cache write synchronization mode is not about 3rd party store, it's
>> about waiting for write replies from other nodes. But Ignite with
>> enabled 3rd party store guarantees consistency itself.
>>
>> 2. Ignite creates implicit transactions for atomic updates to guarantee
>> consistency between nodes. If you want to make more than one update in
>> transaction, then, of course, you should use explicit Ignite transactions.
>>
>> Evgenii
>>
>> 2018-07-09 15:37 GMT+03:00 Prasad Bhalerao 
>> :
>>
>>> Hi,
>>>
>>> I am using FULL_SYNC cache write synchronization mode.
>>> 1) Does FULL_SYNC mode guarantees 100% consistency between ignite in
>>> memory cache and 3rd party data store (oracle in my case)?
>>>
>>> 2) Does FULL_SYNC mode requires to do the cache updates in ignite
>>> transaction?( I am using write through approach.)
>>>
>>>
>>> Thanks,
>>> Prasad
>>>
>>
>>


Re: cache configuration FULL_SYNC

2018-07-09 Thread Prasad Bhalerao
Resending my last mail ...

I understand that FULL_SYNC is required to keep the consistency between
primary data node and backup data node and not between the cache and 3rd
party data.
Sorry for asking the incorrect question.

1) Does ignite supports write through updates to 3rd party store when using
update or delete sql?

2) Is it mandatory to use ignite transaction to keep strong consistency
between in memory cache and 3rd party data store?
-Like you said, if I am updating more than one entry in cache then
transaction is necessary to keep strong consistency between 3rd party db
and ignite cache. Am I correct?

Thanks,
Prasad

On Mon, Jul 9, 2018 at 6:38 PM Evgenii Zhuravlev 
wrote:

> Hi,
>
> 1. Cache write synchronization mode is not about 3rd party store, it's
> about waiting for write replies from other nodes. But Ignite with enabled 3rd
> party store guarantees consistency itself.
>
> 2. Ignite creates implicit transactions for atomic updates to guarantee
> consistency between nodes. If you want to make more than one update in
> transaction, then, of course, you should use explicit Ignite transactions.
>
> Evgenii
>
> 2018-07-09 15:37 GMT+03:00 Prasad Bhalerao :
>
>> Hi,
>>
>> I am using FULL_SYNC cache write synchronization mode.
>> 1) Does FULL_SYNC mode guarantees 100% consistency between ignite in
>> memory cache and 3rd party data store (oracle in my case)?
>>
>> 2) Does FULL_SYNC mode requires to do the cache updates in ignite
>> transaction?( I am using write through approach.)
>>
>>
>> Thanks,
>> Prasad
>>
>
>


Re: cache configuration FULL_SYNC

2018-07-09 Thread Evgenii Zhuravlev
Hi,

1. Cache write synchronization mode is not about 3rd party store, it's
about waiting for write replies from other nodes. But Ignite with enabled 3rd
party store guarantees consistency itself.

2. Ignite creates implicit transactions for atomic updates to guarantee
consistency between nodes. If you want to make more than one update in
transaction, then, of course, you should use explicit Ignite transactions.

Evgenii

2018-07-09 15:37 GMT+03:00 Prasad Bhalerao :

> Hi,
>
> I am using FULL_SYNC cache write synchronization mode.
> 1) Does FULL_SYNC mode guarantees 100% consistency between ignite in
> memory cache and 3rd party data store (oracle in my case)?
>
> 2) Does FULL_SYNC mode requires to do the cache updates in ignite
> transaction?( I am using write through approach.)
>
>
> Thanks,
> Prasad
>


Re: cache configuration FULL_SYNC

2018-07-09 Thread Prasad Bhalerao
I understand that FULL_SYNC is required to keep the consistency between
primary data node and backup data node and not between the cache and 3rd
party data.
Sorry for asking the incorrect question.

1) Does ignite supports write through updates to 3rd party store when using
update or delete sql?

2) Is it mandatory to use ignite transaction to keep strong consistency
between in memory cache and 3rd party data store?

Thanks,
Prasad


On Mon, Jul 9, 2018 at 6:07 PM Prasad Bhalerao 
wrote:

> Hi,
>
> I am using FULL_SYNC cache write synchronization mode.
> 1) Does FULL_SYNC mode guarantees 100% consistency between ignite in
> memory cache and 3rd party data store (oracle in my case)?
>
> 2) Does FULL_SYNC mode requires to do the cache updates in ignite
> transaction?( I am using write through approach.)
>
>
> Thanks,
> Prasad
>


cache configuration FULL_SYNC

2018-07-09 Thread Prasad Bhalerao
Hi,

I am using FULL_SYNC cache write synchronization mode.
1) Does FULL_SYNC mode guarantees 100% consistency between ignite in memory
cache and 3rd party data store (oracle in my case)?

2) Does FULL_SYNC mode requires to do the cache updates in ignite
transaction?( I am using write through approach.)


Thanks,
Prasad


Re: Cache configuration in case of Client mode

2018-07-05 Thread Вячеслав Коптилин
Oh, I see now that we are talking about Factory
:)
Yes, it looks like a usability issue or even a bug. The implementation
should inject dependencies into that factory in the same way it does for
CacheStoreFactory.
As a workaround, you can try the following:

private CacheConfiguration ipContainerIPV4CacheCfg() {
CacheConfiguration ipContainerIpV4CacheCfg = new
CacheConfiguration<>(CacheName.IP_CONTAINER_IPV4_CACHE.name());
Factory storeFactory =
FactoryBuilder.factoryOf(IpContainerIpV4CacheLoader.class);
ipContainerIpV4CacheCfg.setCacheStoreFactory(storeFactory);
ipContainerIpV4CacheCfg.setCacheStoreSessionListenerFactories(new
Factory() {
@Override public CacheStoreSessionListener create() {
return new TestCacheStoreSessionListener();
}
});

...
}

public class TestCacheStoreSessionListener extends
CacheJdbcStoreSessionListener {
@SpringApplicationContextResource
public void setupDataSourceFromSpringContext(Object appCtx) {
ApplicationContext appContext = (ApplicationContext) appCtx;
setDataSource((DataSource) appContext.getBean("dataSource"));
}
}

Best regards,
Slava.

чт, 5 июл. 2018 г. в 18:44, Prasad Bhalerao :

>
> I tried to debug the ignite code, GridResourceProcessor.inject is not
>> being executed for injecting resources into CacheStoreSessionListener. It
>> is being called for Cachestores.
>>
>> Can you please advise?
>>
>> Thanks,
>> Prasad
>>
>> On Thu, Jul 5, 2018 at 8:14 PM Prasad Bhalerao <
>> prasadbhalerao1...@gmail.com> wrote:
>>
>>> I had used SpringApplicationContextResource  annotation. But it did not
>>> inject the application context in it. So I decided to use spring managed
>>> bean and it worked but now it is creating the problem which is described in
>>> this mail chain.
>>>
>>> On Thu, Jul 5, 2018 at 8:11 PM Prasad Bhalerao <
>>> prasadbhalerao1...@gmail.com> wrote:
>>>
 I had used SpringApplicationContextResource  annotation. But it did not
 inject the application context in it. So I decided to use spring managed
 bean and it worked.

 Thanks,
 Prasad

 On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин <
 slava.kopti...@gmail.com> wrote:

> It seems that you need to use @
>
> SpringApplicationContextResource
>
> instead of @Autowired.
> Could you please check that?
>
> Thanks.
>
> чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao <
> prasadbhalerao1...@gmail.com>:
>
>>
>>
>> import java.io.Serializable;
>> import javax.cache.configuration.Factory;
>> import javax.sql.DataSource;
>> import org.apache.ignite.IgniteException;
>> import org.apache.ignite.cache.store.CacheStoreSessionListener;
>> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
>> import org.springframework.beans.factory.annotation.Autowired;
>> import org.springframework.context.ApplicationContext;
>>
>> public class CacheStoreSessionListenerFactory implements 
>> Factory, Serializable {
>>
>>   private static final long serialVersionUID = 6142932447545510244L;
>>
>>   private String className;
>>
>>   @Autowired
>>   private transient ApplicationContext appCtx;
>>
>>
>>   public 
>> CacheStoreSessionListenerFactory(Class clazz) 
>> {
>> this.className = clazz.getName();
>>   }
>>
>>   @Override
>>   public CacheStoreSessionListener create() {
>>
>> if (appCtx == null) {
>>   throw new IgniteException("Spring application context resource is 
>> not injected.");
>> }
>> CacheJdbcStoreSessionListener lsnr = new 
>> CacheJdbcStoreSessionListener();
>> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
>> return lsnr;
>>
>>   }
>>
>> }
>>
>>
>>
>> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin <
>> slava.kopti...@gmail.com> wrote:
>>
>>> Well, the exception is thrown by your class:
>>> org.apache.ignite.IgniteException: Spring application context
>>> resource is
>>> not injected.
>>>  at
>>>
>>> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>>>  at
>>>
>>> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>>>
>>> Is it possible to share this class as well?
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
> I tried to debug the ignite code, GridResourceProcessor.inject is not
> being executed for injecting resources into CacheStoreSessionListener. It
> is being called for Cachestores.
>
> Can you please advise?
>
> Thanks,
> Prasad
>
> On Thu, Jul 5, 2018 at 8:14 PM Prasad Bhalerao <
> prasadbhalerao1...@gmail.com> wrote:
>
>> I had used SpringApplicationContextResource  annotation. But it did not
>> inject the application context in it. So I decided to use spring managed
>> bean and it worked but now it is creating the problem which is described in
>> this mail chain.
>>
>> On Thu, Jul 5, 2018 at 8:11 PM Prasad Bhalerao <
>> prasadbhalerao1...@gmail.com> wrote:
>>
>>> I had used SpringApplicationContextResource  annotation. But it did not
>>> inject the application context in it. So I decided to use spring managed
>>> bean and it worked.
>>>
>>> Thanks,
>>> Prasad
>>>
>>> On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин <
>>> slava.kopti...@gmail.com> wrote:
>>>
 It seems that you need to use @

 SpringApplicationContextResource

 instead of @Autowired.
 Could you please check that?

 Thanks.

 чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao <
 prasadbhalerao1...@gmail.com>:

>
>
> import java.io.Serializable;
> import javax.cache.configuration.Factory;
> import javax.sql.DataSource;
> import org.apache.ignite.IgniteException;
> import org.apache.ignite.cache.store.CacheStoreSessionListener;
> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
> import org.springframework.beans.factory.annotation.Autowired;
> import org.springframework.context.ApplicationContext;
>
> public class CacheStoreSessionListenerFactory implements 
> Factory, Serializable {
>
>   private static final long serialVersionUID = 6142932447545510244L;
>
>   private String className;
>
>   @Autowired
>   private transient ApplicationContext appCtx;
>
>
>   public 
> CacheStoreSessionListenerFactory(Class clazz) {
> this.className = clazz.getName();
>   }
>
>   @Override
>   public CacheStoreSessionListener create() {
>
> if (appCtx == null) {
>   throw new IgniteException("Spring application context resource is 
> not injected.");
> }
> CacheJdbcStoreSessionListener lsnr = new 
> CacheJdbcStoreSessionListener();
> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
> return lsnr;
>
>   }
>
> }
>
>
>
> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin <
> slava.kopti...@gmail.com> wrote:
>
>> Well, the exception is thrown by your class:
>> org.apache.ignite.IgniteException: Spring application context
>> resource is
>> not injected.
>>  at
>>
>> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>>  at
>>
>> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>>
>> Is it possible to share this class as well?
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
I tried to debug the ignite code, GridResourceProcessor.inject is not being
executed for injecting resources into CacheStoreSessionListenerFactories.
It is being called for CachestoreFactories.

Can you please advise?

Thanks,
Prasad

On Thu, Jul 5, 2018 at 8:14 PM Prasad Bhalerao 
wrote:

> I had used SpringApplicationContextResource  annotation. But it did not
> inject the application context in it. So I decided to use spring managed
> bean and it worked but now it is creating the problem which is described in
> this mail chain.
>
> On Thu, Jul 5, 2018 at 8:11 PM Prasad Bhalerao <
> prasadbhalerao1...@gmail.com> wrote:
>
>> I had used SpringApplicationContextResource  annotation. But it did not
>> inject the application context in it. So I decided to use spring managed
>> bean and it worked.
>>
>> Thanks,
>> Prasad
>>
>> On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин <
>> slava.kopti...@gmail.com> wrote:
>>
>>> It seems that you need to use @
>>>
>>> SpringApplicationContextResource
>>>
>>> instead of @Autowired.
>>> Could you please check that?
>>>
>>> Thanks.
>>>
>>> чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao <
>>> prasadbhalerao1...@gmail.com>:
>>>


 import java.io.Serializable;
 import javax.cache.configuration.Factory;
 import javax.sql.DataSource;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.cache.store.CacheStoreSessionListener;
 import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;

 public class CacheStoreSessionListenerFactory implements 
 Factory, Serializable {

   private static final long serialVersionUID = 6142932447545510244L;

   private String className;

   @Autowired
   private transient ApplicationContext appCtx;


   public CacheStoreSessionListenerFactory(Class 
 clazz) {
 this.className = clazz.getName();
   }

   @Override
   public CacheStoreSessionListener create() {

 if (appCtx == null) {
   throw new IgniteException("Spring application context resource is 
 not injected.");
 }
 CacheJdbcStoreSessionListener lsnr = new 
 CacheJdbcStoreSessionListener();
 lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
 return lsnr;

   }

 }



 On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
 wrote:

> Well, the exception is thrown by your class:
> org.apache.ignite.IgniteException: Spring application context resource
> is
> not injected.
>  at
>
> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>  at
>
> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>
> Is it possible to share this class as well?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>



Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
I had used SpringApplicationContextResource  annotation. But it did not
inject the application context in it. So I decided to use spring managed
bean and it worked but now it is creating the problem which is described in
this mail chain.

On Thu, Jul 5, 2018 at 8:11 PM Prasad Bhalerao 
wrote:

> I had used SpringApplicationContextResource  annotation. But it did not
> inject the application context in it. So I decided to use spring managed
> bean and it worked.
>
> Thanks,
> Prasad
>
> On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин 
> wrote:
>
>> It seems that you need to use @
>>
>> SpringApplicationContextResource
>>
>> instead of @Autowired.
>> Could you please check that?
>>
>> Thanks.
>>
>> чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao > >:
>>
>>>
>>>
>>> import java.io.Serializable;
>>> import javax.cache.configuration.Factory;
>>> import javax.sql.DataSource;
>>> import org.apache.ignite.IgniteException;
>>> import org.apache.ignite.cache.store.CacheStoreSessionListener;
>>> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
>>> import org.springframework.beans.factory.annotation.Autowired;
>>> import org.springframework.context.ApplicationContext;
>>>
>>> public class CacheStoreSessionListenerFactory implements 
>>> Factory, Serializable {
>>>
>>>   private static final long serialVersionUID = 6142932447545510244L;
>>>
>>>   private String className;
>>>
>>>   @Autowired
>>>   private transient ApplicationContext appCtx;
>>>
>>>
>>>   public CacheStoreSessionListenerFactory(Class 
>>> clazz) {
>>> this.className = clazz.getName();
>>>   }
>>>
>>>   @Override
>>>   public CacheStoreSessionListener create() {
>>>
>>> if (appCtx == null) {
>>>   throw new IgniteException("Spring application context resource is not 
>>> injected.");
>>> }
>>> CacheJdbcStoreSessionListener lsnr = new 
>>> CacheJdbcStoreSessionListener();
>>> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
>>> return lsnr;
>>>
>>>   }
>>>
>>> }
>>>
>>>
>>>
>>> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
>>> wrote:
>>>
 Well, the exception is thrown by your class:
 org.apache.ignite.IgniteException: Spring application context resource
 is
 not injected.
  at

 *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
  at

 com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)

 Is it possible to share this class as well?



 --
 Sent from: http://apache-ignite-users.70518.x6.nabble.com/

>>>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
I had used SpringApplicationContextResource  annotation. But it did not
inject the application context in it. So I decided to use spring managed
bean and it worked.

Thanks,
Prasad

On Thu, Jul 5, 2018 at 7:49 PM Вячеслав Коптилин 
wrote:

> It seems that you need to use @
>
> SpringApplicationContextResource
>
> instead of @Autowired.
> Could you please check that?
>
> Thanks.
>
> чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao  >:
>
>>
>>
>> import java.io.Serializable;
>> import javax.cache.configuration.Factory;
>> import javax.sql.DataSource;
>> import org.apache.ignite.IgniteException;
>> import org.apache.ignite.cache.store.CacheStoreSessionListener;
>> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
>> import org.springframework.beans.factory.annotation.Autowired;
>> import org.springframework.context.ApplicationContext;
>>
>> public class CacheStoreSessionListenerFactory implements 
>> Factory, Serializable {
>>
>>   private static final long serialVersionUID = 6142932447545510244L;
>>
>>   private String className;
>>
>>   @Autowired
>>   private transient ApplicationContext appCtx;
>>
>>
>>   public CacheStoreSessionListenerFactory(Class 
>> clazz) {
>> this.className = clazz.getName();
>>   }
>>
>>   @Override
>>   public CacheStoreSessionListener create() {
>>
>> if (appCtx == null) {
>>   throw new IgniteException("Spring application context resource is not 
>> injected.");
>> }
>> CacheJdbcStoreSessionListener lsnr = new CacheJdbcStoreSessionListener();
>> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
>> return lsnr;
>>
>>   }
>>
>> }
>>
>>
>>
>> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
>> wrote:
>>
>>> Well, the exception is thrown by your class:
>>> org.apache.ignite.IgniteException: Spring application context resource is
>>> not injected.
>>>  at
>>>
>>> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>>>  at
>>>
>>> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>>>
>>> Is it possible to share this class as well?
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>
>>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Вячеслав Коптилин
It seems that you need to use @

SpringApplicationContextResource

instead of @Autowired.
Could you please check that?

Thanks.

чт, 5 июл. 2018 г. в 17:01, Prasad Bhalerao :

>
>
> import java.io.Serializable;
> import javax.cache.configuration.Factory;
> import javax.sql.DataSource;
> import org.apache.ignite.IgniteException;
> import org.apache.ignite.cache.store.CacheStoreSessionListener;
> import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
> import org.springframework.beans.factory.annotation.Autowired;
> import org.springframework.context.ApplicationContext;
>
> public class CacheStoreSessionListenerFactory implements 
> Factory, Serializable {
>
>   private static final long serialVersionUID = 6142932447545510244L;
>
>   private String className;
>
>   @Autowired
>   private transient ApplicationContext appCtx;
>
>
>   public CacheStoreSessionListenerFactory(Class 
> clazz) {
> this.className = clazz.getName();
>   }
>
>   @Override
>   public CacheStoreSessionListener create() {
>
> if (appCtx == null) {
>   throw new IgniteException("Spring application context resource is not 
> injected.");
> }
> CacheJdbcStoreSessionListener lsnr = new CacheJdbcStoreSessionListener();
> lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
> return lsnr;
>
>   }
>
> }
>
>
>
> On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
> wrote:
>
>> Well, the exception is thrown by your class:
>> org.apache.ignite.IgniteException: Spring application context resource is
>> not injected.
>>  at
>>
>> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>>  at
>>
>> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>>
>> Is it possible to share this class as well?
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
import java.io.Serializable;
import javax.cache.configuration.Factory;
import javax.sql.DataSource;
import org.apache.ignite.IgniteException;
import org.apache.ignite.cache.store.CacheStoreSessionListener;
import org.apache.ignite.cache.store.jdbc.CacheJdbcStoreSessionListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

public class CacheStoreSessionListenerFactory implements
Factory, Serializable {

  private static final long serialVersionUID = 6142932447545510244L;

  private String className;

  @Autowired
  private transient ApplicationContext appCtx;


  public CacheStoreSessionListenerFactory(Class
clazz) {
this.className = clazz.getName();
  }

  @Override
  public CacheStoreSessionListener create() {

if (appCtx == null) {
  throw new IgniteException("Spring application context resource
is not injected.");
}
CacheJdbcStoreSessionListener lsnr = new CacheJdbcStoreSessionListener();
lsnr.setDataSource((DataSource) appCtx.getBean("dataSource"));
return lsnr;

  }

}



On Thu, Jul 5, 2018 at 7:24 PM slava.koptilin 
wrote:

> Well, the exception is thrown by your class:
> org.apache.ignite.IgniteException: Spring application context resource is
> not injected.
>  at
>
> *com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
>  at
>
> com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
>
> Is it possible to share this class as well?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Cache configuration in case of Client mode

2018-07-05 Thread slava.koptilin
Well, the exception is thrown by your class:
org.apache.ignite.IgniteException: Spring application context resource is
not injected.
 at
*com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory*.create(CacheStoreSessionListenerFactory.java:30)
 at
com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)

Is it possible to share this class as well?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
Hi,

I am using Ignite 2.4 version. Please find attached the log files. Log file
agms-web is a client node log and agms-core is server node log.

Ignite configuration on client node is as follows. When I try to get the
cache contents on client node after data push operation, my request hangs
on ignite.cache(getCacheName()) code and throws following exception. But if
I fire the same request again, code  ignite.cache(getCacheName())  for
cache "IP_CONTAINER_IPV4_CACHE" returns null.  When I debugged on server
node, this cache is present and data is being pushed to this cache by
ignite runnable task.


Exception on first request :

2018-07-05 18:18:34,127 108076 [exchange-worker-#37%springDataNode%] ERROR
o.a.i.i.p.c.GridCachePartitionExchangeManager - Failed to process custom
exchange task: ClientCacheChangeDummyDiscoveryMessage
[reqId=23767a7f-3437-4d20-9993-36d5d88a8860, cachesToClose=null,
startCaches=[IP_CONTAINER_IPV4_CACHE]]
org.apache.ignite.IgniteException: Spring application context resource is
not injected.
 at
com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:30)
 at
com.qualys.agms.grid.cache.loader.factory.CacheStoreSessionListenerFactory.create(CacheStoreSessionListenerFactory.java:12)
 at
org.apache.ignite.internal.processors.cache.GridCacheUtils.startStoreSessionListeners(GridCacheUtils.java:1403)
 at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.start0(GridCacheStoreManagerAdapter.java:241)
 at
org.apache.ignite.internal.processors.cache.store.CacheOsStoreManager.start0(CacheOsStoreManager.java:64)


@Configuration
@Profile({"prod", "default"})
public class IgniteAppConfig {

  @Value("${ignite.data_storage_path}")
  private String dataStoragePath;

  @Bean
  public IgniteSpringBean igniteInstance() {
IgniteSpringBean ignite = new IgniteSpringBean();

ignite.setConfiguration(getIgniteConfiguration(ignite));

return ignite;
  }

  private IgniteConfiguration getIgniteConfiguration(IgniteSpringBean ignite) {

String HOST = "127.0.0.1:47500..47509";
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
ipFinder.setAddresses(Collections.singletonList(HOST));

TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
discoSpi.setIpFinder(ipFinder);

IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setDiscoverySpi(discoSpi);
cfg.setIgniteInstanceName("springDataNode");
cfg.setPeerClassLoadingEnabled(false);
cfg.setRebalanceThreadPoolSize(4);
//cfg.setLifecycleBeans(new IgniteLifeCycleBean());
cfg.setClientMode(true);

return cfg;
  }

}



@Override
public FieldsQueryCursor>
getFieldResultsByCriteria(Serializable customCriteria) {
  QueryCriteria criteria = (QueryCriteria) customCriteria;
  SqlFieldsQuery sqlFieldsQuery = new
SqlFieldsQuery(criteria.getStatement()).setArgs(criteria.getArgs());
  sqlFieldsQuery.setDistributedJoins(criteria.isDistributeJoins());
  return cache().query(sqlFieldsQuery);
}

protected abstract String getCacheName();

protected IgniteCache cache() {
  return ignite.cache(getCacheName());
}


IP_CONTAINER_IPV4_CACHE

private CacheConfiguration ipContainerIPV4CacheCfg() {

  CacheConfiguration ipContainerIpV4CacheCfg = new
CacheConfiguration<>(CacheName.IP_CONTAINER_IPV4_CACHE.name());
  ipContainerIpV4CacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
  ipContainerIpV4CacheCfg.setWriteThrough(true);
  ipContainerIpV4CacheCfg.setReadThrough(false);
  ipContainerIpV4CacheCfg.setRebalanceMode(CacheRebalanceMode.ASYNC);
  
ipContainerIpV4CacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
  ipContainerIpV4CacheCfg.setBackups(1);
  //SpringCacheStoreFactory springCacheStoreFactory = new
SpringCacheStoreFactory(DefaultCacheLoader.class);
  Factory storeFactory =
FactoryBuilder.factoryOf(IpContainerIpV4CacheLoader.class);
  ipContainerIpV4CacheCfg.setCacheStoreFactory(storeFactory);
  ipContainerIpV4CacheCfg.setIndexedTypes(DefaultDataAffinityKey.class,
IpContainerIpV4Data.class);
  
ipContainerIpV4CacheCfg.setCacheStoreSessionListenerFactories(cacheStoreSessionListenerFactory());

  RendezvousAffinityFunction affinityFunction = new
RendezvousAffinityFunction();
  affinityFunction.setExcludeNeighbors(true);
  ipContainerIpV4CacheCfg.setAffiy(affinityFunction);

  return ipContainerIpV4CacheCfg;
}

@Bean
public CacheStoreSessionListenerFactory cacheStoreSessionListenerFactory() {
  return new CacheStoreSessionListenerFactory(CacheStoreSessionListener.class);
}




Thanks
Prasad

On Thu, Jul 5, 2018 at 5:57 PM slava.koptilin 
wrote:

> Hello Prasad,
>
> I cannot reproduce the behavior that you described.
> Please share the code that the community can use in order to reproduce the
> issue.
> It would be nice to have log files from both nodes (client and server).
>
> One more thing. Could you please share the version of Apache Ignite that
> you
> are using?
>
> Thanks!
>

Re: Cache configuration in case of Client mode

2018-07-05 Thread slava.koptilin
Hello Prasad,

I cannot reproduce the behavior that you described.
Please share the code that the community can use in order to reproduce the
issue.
It would be nice to have log files from both nodes (client and server).

One more thing. Could you please share the version of Apache Ignite that you
are using?

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache configuration in case of Client mode

2018-07-05 Thread akurbanov
Hi, 

Try advice to call ignite.getOrCreateCache("cacheName");, got a feeling that
you will get an empty cache there which would mean that this cache is not
created yet or is failing to start. In this case please attach startup logs
for server/client nodes setup.

Regards.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
Hi Maxim,

My mistake, I did not phrase the problem correctly.

I am getting NullPointerException in my code because
ignite.cache(getCacheName())
is returning null on client node.

As I said I have not provided any cache configurations on client node
because I thought it is unnecessary.

So the question is.

Is it necessary to provide all cache configuration on client node as well?
If yes why?


Thanks,
Prasad

On Thu, Jul 5, 2018 at 5:23 PM Maxim Malygin 
wrote:

> Please show stack trace of your NPE.
>
> Regards,
> Maxim
>
> чт, 5 июл. 2018 г. в 14:48, Prasad Bhalerao  >:
>
>> Don't want to use that method.  I know that cache is already present on
>> server node as it is loaded by loaders and this ignite.cache method is
>> present in my common framework.
>>
>> Thanks,
>> Prasad
>>
>> On Thu, Jul 5, 2018, 5:14 PM Sambhaji Sawant 
>> wrote:
>>
>>> try using
>>> ignite.getOrCreateCache("cacheName");
>>>
>>> On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
>>> prasadbhalerao1...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have provided the cache configurations on ignite node which is
>>>> started in server mode,but other ignite node which started in client mode
>>>> does not have any cache configurations.
>>>>
>>>> Now case is cache is present on ignite server node. But when I access
>>>> the same cache from client node I get NullPointerException when I execute
>>>> following code on client node.
>>>>
>>>> ignite.cache(getCacheName())
>>>>
>>>> Is it necessary to provide all cache configuration on client node as
>>>> well?
>>>> If yes why?
>>>>
>>>> Thanks,
>>>> Prasad
>>>>
>>>
>>>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Maxim Malygin
Please show stack trace of your NPE.

Regards,
Maxim

чт, 5 июл. 2018 г. в 14:48, Prasad Bhalerao :

> Don't want to use that method.  I know that cache is already present on
> server node as it is loaded by loaders and this ignite.cache method is
> present in my common framework.
>
> Thanks,
> Prasad
>
> On Thu, Jul 5, 2018, 5:14 PM Sambhaji Sawant 
> wrote:
>
>> try using
>> ignite.getOrCreateCache("cacheName");
>>
>> On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
>> prasadbhalerao1...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I have provided the cache configurations on ignite node which is started
>>> in server mode,but other ignite node which started in client mode does not
>>> have any cache configurations.
>>>
>>> Now case is cache is present on ignite server node. But when I access
>>> the same cache from client node I get NullPointerException when I execute
>>> following code on client node.
>>>
>>> ignite.cache(getCacheName())
>>>
>>> Is it necessary to provide all cache configuration on client node as
>>> well?
>>> If yes why?
>>>
>>> Thanks,
>>> Prasad
>>>
>>
>>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
Don't want to use that method.  I know that cache is already present on
server node as it is loaded by loaders and this ignite.cache method is
present in my common framework.

Thanks,
Prasad

On Thu, Jul 5, 2018, 5:14 PM Sambhaji Sawant 
wrote:

> try using
> ignite.getOrCreateCache("cacheName");
>
> On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
> prasadbhalerao1...@gmail.com> wrote:
>
>> Hi,
>>
>> I have provided the cache configurations on ignite node which is started
>> in server mode,but other ignite node which started in client mode does not
>> have any cache configurations.
>>
>> Now case is cache is present on ignite server node. But when I access the
>> same cache from client node I get NullPointerException when I execute
>> following code on client node.
>>
>> ignite.cache(getCacheName())
>>
>> Is it necessary to provide all cache configuration on client node as well?
>> If yes why?
>>
>> Thanks,
>> Prasad
>>
>
>


Re: Cache configuration in case of Client mode

2018-07-05 Thread Sambhaji Sawant
try using
ignite.getOrCreateCache("cacheName");

On Thu, Jul 5, 2018 at 3:49 PM, Prasad Bhalerao <
prasadbhalerao1...@gmail.com> wrote:

> Hi,
>
> I have provided the cache configurations on ignite node which is started
> in server mode,but other ignite node which started in client mode does not
> have any cache configurations.
>
> Now case is cache is present on ignite server node. But when I access the
> same cache from client node I get NullPointerException when I execute
> following code on client node.
>
> ignite.cache(getCacheName())
>
> Is it necessary to provide all cache configuration on client node as well?
> If yes why?
>
> Thanks,
> Prasad
>


Cache configuration in case of Client mode

2018-07-05 Thread Prasad Bhalerao
Hi,

I have provided the cache configurations on ignite node which is started in
server mode,but other ignite node which started in client mode does not
have any cache configurations.

Now case is cache is present on ignite server node. But when I access the
same cache from client node I get NullPointerException when I execute
following code on client node.

ignite.cache(getCacheName())

Is it necessary to provide all cache configuration on client node as well?
If yes why?

Thanks,
Prasad


Re: Cache Configuration for a data region

2018-06-19 Thread slava.koptilin
Hello,

> Do I need to configure something else for off heap eviction? 
If you are using Ignite Native Persistence, you don't need to configure
page-based eviction.
In that case, it will be automatically enabled. Please take a look at this
page for the details:
https://apacheignite.readme.io/docs/evictions#section-off-heap-memory

> As per the thread below, I need to set some data page eviction too, but 
> official documentation says it is deprecated
If I am not mistaken, it is not deprecated. At least I did not find any
mention of it.

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache Configuration for a data region

2018-06-18 Thread the_palakkaran
Do I need to configure something else for off heap eviction?

I have on heap enabled and set eviction policy(LRU). Max size of 1MB also
provided. I have 1.5million data, so obviously it some entries loaded in the
start should be evicted. Still when I try to get those entries, I get
performance equivalent to the cache on heap reads. Is this normal or am I
missing something?

As per the thread below, I need to set some data page eviction too, but
official documentation says it is deprecated,

http://apache-ignite-users.70518.x6.nabble.com/Quick-questions-on-Evictions-td16632.html



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache Configuration for a data region

2018-06-18 Thread slava.koptilin
> I guess durable memory is pure RAM based and native persistence is
combination of both RAM and disk.
Durable memory is a memory architecture that allows processing and storing
data both in memory and on disk. In other words, Ignite native persistence
is a feature(add-on) provided by Durable memory architecture.

> How to manipulate durable memory? Can I configure it?
Please take a look on this page:
https://apacheignite.readme.io/docs/memory-configuration

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache Configuration for a data region

2018-06-18 Thread the_palakkaran
Thanks, every thing other than native vs durable is now clear for me.

I guess durable memory is pure RAM based and native persistence is
combination of both RAM and disk.

How to manipulate durable memory? Can I configure it?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache Configuration for a data region

2018-06-18 Thread slava.koptilin
Hi,

> 1. I have set setOnheapCacheEnabled(true) for every cache.
> This means they will go into java heap right? 
As of AI 2.x Java heap is no longer treated as a data storage
and might be used as an extra caching layer for entries you have in the
off-heap.

> 2. I don't clearly understand the difference between durable memory and
> persistence.
Long story short, the 'Durable' memory is a page based memory architecture
that is split into pages of fixed size. Ignite 'Native persistence' is a
feature provided by Ignite and which allows storing your data on disk.
Please take a look at the following pages [1] & [2]

> 3. If I have enabled persistence and also set LRU eviction policy
> correctly,
> does this mean during loading also this eviction policy will work
> and I would never get an out of memory error? 
Yes, that is correct as long as you have free space on disk, of course.

> 4 How to check if the read happened from ignite persistence(disk) or
> memory?
There is no such capability if I am not mistaken. 

[1] https://apacheignite.readme.io/docs/durable-memory
[2] https://apacheignite.readme.io/docs/distributed-persistent-store

Thanks,
S.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache Configuration for a data region

2018-06-18 Thread the_palakkaran
Hi,

1. I have set setOnheapCacheEnabled(true) for every cache. This means they
will go into java heap right?

2. Is it possible for me to take control of this durable memory? What should
essentially be kept there? How to do that? I don't clearly understand the
difference between durable memory and persistence.

3. If I have enabled persistence and also set LRU eviction policy correctly,
does this mean during loading also this eviction policy will work and I
would never get an out of memory error?

4. How to check if the read happened from ignite persistence(disk) or
memory?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Cache Configuration for a data region

2018-06-18 Thread slava.koptilin
Hello,

As of Apache Ignite 2.x, all data are stored into off-heap memory [1].
On-heap memory is used only for temporary operations, buffers etc.

> Also, I have my own cache store implementations. I hope this is only used
> for read through and
> write through from and to database and not for loading or writing to
> ignite durable memory.
> Can someone confirm this too?
Yes, that is correct.

> Again is it possible to restrict the number of entries kept in the memory
> while loading data into cache ?
> The rest can be kept in the durable (disk) memory.
I think that you need to configure eviction policy [2] and use Ignite Native
Persistence [3].
Please take into account that 'Durable' [4] memory is not the synonym of
'Native Persistence'.

[1]
https://apacheignite.readme.io/v2.5/docs/durable-memory#section-in-memory-features
[2] https://apacheignite.readme.io/docs/evictions
[3] https://apacheignite.readme.io/v2.5/docs/distributed-persistent-store
[4] https://apacheignite.readme.io/v2.5/docs/durable-memory

Thanks!




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Cache Configuration for a data region

2018-06-18 Thread the_palakkaran
Hi,

I have multiple on heap caches attached to a data region of maximum 1GB size
durable memory. I have 512MB heap memory specified also.

Is it possible for me to set the size of this cache to take maximum of 100MB
and store the remaining in durable memory? Otherwise, won't it be using the
entire 2GB if new entries are put into it?

Or can this only be done using eviction policies?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


RE: IgniteCheckedException: Failed to validate cache configuration. Cachestore factory is not s erializable.

2018-05-23 Thread Stanislav Lukyanov
Look at the bottom exceptions in the chain:
=
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to find
class with given class loader for unmarshalling (make
 sure same versions of all classes are available on all nodes or enable
peer-class-loading) [clsLdr=org.apache.felix.framework.
BundleWiringImpl@4b6f59f5,
cls=com.sybase365.mobiliser.custom.btpn.brand.ignite.custom.config.ClientConfigurationFactory$1
not
found by org.apache.ignite.ignite-core [122]] 
…
Caused by: java.lang.ClassNotFoundException:
com.sybase365.mobiliser.custom.btpn.brand.ignite.custom.config.ClientConfiguration
Factory$1 not found by org.apache.ignite.ignite-core [122]
=

These exceptions suggest that you should check that the class 
com.sybase365.mobiliser.custom.btpn.brand.ignite.custom.config.ClientConfigurationFactory$1
is available on all nodes.
One way to achieve that is to put a .jar with your code to every node’s 
$IGNITE_HOME/libs directory.
Alternatively, as also suggested by the exception message, you can turn on peer 
class loading.
See https://apacheignite.readme.io/docs/zero-deployment for defails.

Thanks,
Stan

From: rizal123
Sent: 23 мая 2018 г. 5:57
To: user@ignite.apache.org
Subject: IgniteCheckedException: Failed to validate cache configuration. 
Cachestore factory is not s erializable.

Dear Master Ignite,

i have exception "IgniteCheckedException: Failed to validate cache
configuration. Cache store factory is not s
erializable.".

*Here is my code:*

/**
 * 
 */
package com.sybase365.mobiliser.custom.btpn.brand.ignite.custom.config;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Properties;

import javax.cache.configuration.Factory;
import javax.sql.DataSource;

import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
import org.apache.ignite.cache.store.jdbc.JdbcType;
import org.apache.ignite.cache.store.jdbc.JdbcTypeField;
import org.apache.ignite.cache.store.jdbc.dialect.OracleDialect;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import
org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;

import oracle.jdbc.pool.OracleDataSource;

/**
 * @author 17054072
 *
 */
public class ClientConfigurationFactory implements Serializable{

/**
 * 
 */
private static final long serialVersionUID = 4067320674189197181L;

private static final Properties props = new Properties();
/*static {

try {
InputStream in =
IgniteConfiguration.class.getClassLoader().getResourceAsStream("META-INF/spring/secret.properties");
props.load(in);
}
catch (Exception ignored) {
// No-op.
}
}*/

public static class DataSources {
  public static final OracleDataSource INSTANCE_dsOracle_Btpndev =
createdsOracle_Btpndev();

private static OracleDataSource createdsOracle_Btpndev() {
try {
OracleDataSource dsOracle_Btpndev = new OracleDataSource();

   
dsOracle_Btpndev.setURL("jdbc:oracle:thin:@10.1.92.63:1521:WOWDEV");
dsOracle_Btpndev.setUser("BTPN_BM_02");
dsOracle_Btpndev.setPassword("password");

   
/*dsOracle_Btpndev.setURL(props.getProperty("dsOracle_Btpndev.jdbc.url"));
   
dsOracle_Btpndev.setUser(props.getProperty("dsOracle_Btpndev.jdbc.username"));
   
dsOracle_Btpndev.setPassword(props.getProperty("dsOracle_Btpndev.jdbc.password"));*/

return dsOracle_Btpndev;
}
catch (SQLException ex) {
throw new Error(ex);
}
}
}

public static IgniteConfiguration createConfiguration() throws Exception
{
IgniteConfiguration cfg = new IgniteConfiguration();

cfg.setClientMode(true);
cfg.setIgniteInstanceName("BrandCluster");

TcpDiscoverySpi discovery = new TcpDiscoverySpi();

TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();

ipFinder.setAddresses(Arrays.asList("10.1.92.137:47500")); 

discovery.setIpFinder(ipFinder);

cfg.setDiscoverySpi(discovery);

cfg.setCacheConfiguration(cacheSequenceCache());

return cfg;
}

public static CacheConfiguration cacheSequenceCache() throws Exception {
CacheConfiguration ccfg = new CacheConf

Re: IgniteCheckedException: Failed to validate cache configuration. Cache store factory is not s erializable.

2018-05-22 Thread rizal123
Is there any solutions?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


IgniteCheckedException: Failed to validate cache configuration. Cache store factory is not s erializable.

2018-05-22 Thread rizal123
Dear Master Ignite,

i have exception "IgniteCheckedException: Failed to validate cache
configuration. Cache store factory is not s
erializable.".

*Here is my code:*

/**
 * 
 */
package com.sybase365.mobiliser.custom.btpn.brand.ignite.custom.config;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Properties;

import javax.cache.configuration.Factory;
import javax.sql.DataSource;

import org.apache.ignite.cache.CacheAtomicityMode;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.cache.QueryEntity;
import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreFactory;
import org.apache.ignite.cache.store.jdbc.JdbcType;
import org.apache.ignite.cache.store.jdbc.JdbcTypeField;
import org.apache.ignite.cache.store.jdbc.dialect.OracleDialect;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
import
org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;

import oracle.jdbc.pool.OracleDataSource;

/**
 * @author 17054072
 *
 */
public class ClientConfigurationFactory implements Serializable{

/**
 * 
 */
private static final long serialVersionUID = 4067320674189197181L;

private static final Properties props = new Properties();
/*static {

try {
InputStream in =
IgniteConfiguration.class.getClassLoader().getResourceAsStream("META-INF/spring/secret.properties");
props.load(in);
}
catch (Exception ignored) {
// No-op.
}
}*/

public static class DataSources {
  public static final OracleDataSource INSTANCE_dsOracle_Btpndev =
createdsOracle_Btpndev();

private static OracleDataSource createdsOracle_Btpndev() {
try {
OracleDataSource dsOracle_Btpndev = new OracleDataSource();

   
dsOracle_Btpndev.setURL("jdbc:oracle:thin:@10.1.92.63:1521:WOWDEV");
dsOracle_Btpndev.setUser("BTPN_BM_02");
dsOracle_Btpndev.setPassword("password");

   
/*dsOracle_Btpndev.setURL(props.getProperty("dsOracle_Btpndev.jdbc.url"));
   
dsOracle_Btpndev.setUser(props.getProperty("dsOracle_Btpndev.jdbc.username"));
   
dsOracle_Btpndev.setPassword(props.getProperty("dsOracle_Btpndev.jdbc.password"));*/

return dsOracle_Btpndev;
}
catch (SQLException ex) {
throw new Error(ex);
}
}
}

public static IgniteConfiguration createConfiguration() throws Exception
{
IgniteConfiguration cfg = new IgniteConfiguration();

cfg.setClientMode(true);
cfg.setIgniteInstanceName("BrandCluster");

TcpDiscoverySpi discovery = new TcpDiscoverySpi();

TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();

ipFinder.setAddresses(Arrays.asList("10.1.92.137:47500")); 

discovery.setIpFinder(ipFinder);

cfg.setDiscoverySpi(discovery);

cfg.setCacheConfiguration(cacheSequenceCache());

return cfg;
}

public static CacheConfiguration cacheSequenceCache() throws Exception {
CacheConfiguration ccfg = new CacheConfiguration();

ccfg.setName("SequenceCache");
ccfg.setCacheMode(CacheMode.PARTITIONED);
ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);

CacheJdbcPojoStoreFactory cacheStoreFactory = new
CacheJdbcPojoStoreFactory();

cacheStoreFactory.setDataSourceFactory(new Factory() {
/**
 * 
 */
private static final long serialVersionUID = 
-8028910004810254541L;

/** {@inheritDoc} **/
public DataSource create() {
return DataSources.INSTANCE_dsOracle_Btpndev;
};
});

cacheStoreFactory.setDialect(new OracleDialect());

cacheStoreFactory.setTypes(jdbcTypeSequence(ccfg.getName()));

ccfg.setCacheStoreFactory(cacheStoreFactory);

ccfg.setReadThrough(true);
ccfg.setWriteThrough(true);
ccfg.setSqlSchema("PUBLIC");

ArrayList qryEntities = new ArrayList();

QueryEntity qryEntity = new QueryEntity();

qryEntity.setKeyType("java.lang.String");
qryEntity.setValueType("com.btpn.rizal.khaerul.model.Sequence");
qryEntity.setTableName("SEQUENCE");
qryEntit

Re: cache configuration without Key

2018-01-29 Thread Rajesh Kishore
Thanks Ilya it answers my question

On 29 Jan 2018 3:34 p.m., "ilya.kasnacheev" 
wrote:

> Hello Rajesh!
>
> In Ignite, cache (and SQL table) maps not to one object but to two - key
> and
> value.
>
> Keys are unique per cache per cluster. They act as primary key in SQL and
> as, well, keys in cache API.
>
> So yes, you need to specify key type (or compound object) too.
>
> Regards,
> Ilya.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: cache configuration without Key

2018-01-29 Thread ilya.kasnacheev
Hello Rajesh!

In Ignite, cache (and SQL table) maps not to one object but to two - key and
value.

Keys are unique per cache per cluster. They act as primary key in SQL and
as, well, keys in cache API.

So yes, you need to specify key type (or compound object) too.

Regards,
Ilya.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


cache configuration without Key

2018-01-28 Thread Rajesh Kishore
Hi All,

I have a requirement to define a cache class, for which its instance
qualifies only for value.

public class EntryIndexedAttributes
{

  @QuerySqlField( orderedGroups = { @QuerySqlField.Group(
  name = "generic_attr_idx", order = 0) ,
  @QuerySqlField.Group(
  name = "generic_attrVal_idx", order = 0)} )
  private Long entryID;

  @QuerySqlField( orderedGroups = { @QuerySqlField.Group(
  name = "generic_attr_idx", order = 1) } )
  private String attrType;

  @QuerySqlField( orderedGroups = { @QuerySqlField.Group(
  name = "generic_attr_idx", order = 2),
  @QuerySqlField.Group(
  name = "generic_attrVal_idx", order = 1)} )
  private String attrValue;

}

While defining the cache , it looks like I need to aways specify the key
type ?

CacheConfiguration cacheCfg =
new CacheConfiguration<>("EntryIndexedAttributes");


Thanks,
-Rajesh


Re: Client Near Cache Configuration Lost after Cluster Node Removed

2017-10-24 Thread Timay
I believe i had the same issue, i have posted a test and my finding to the
user group. Which can be found here. 

http://apache-ignite-users.70518.x6.nabble.com/Near-Cache-Topoolgy-change-causes-NearCache-to-always-miss-td17539.html



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Client Near Cache Configuration Lost after Cluster Node Removed

2017-10-24 Thread torjt
To answer your question, using Visor, one can see cache misses increase upon
the scenario described.  Furthermore, measure cache.get() calls increase
from sub millisecond to 20 to 30 miillis.




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: How do you fix affinity key backups in cache configuration?

2017-10-23 Thread slava.koptilin
Hello,

It looks like you trying to start node which has an inconsistent
configuration for atomic types.
Please check that all nodes in the cluster (clients and servers) have the
identical configuration [1].

something like the following:






[1] https://apacheignite.readme.io/docs/atomic-types#atomic-configuration

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


How do you fix affinity key backups in cache configuration?

2017-10-23 Thread ndipiazza3565
Was just hit with this error causing my whole ignite cluster to fail to
start:

org.apache.ignite.IgniteCheckedException: Affinity key backups mismatch (fix
affinity key backups in cache configuration or set
-DIGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK=true system property)
[cacheName=ignite-atomics-sys-cache, localAffinityKeyBackups=1,
remoteAffinityKeyBackups=0, rmtNodeId=d663345e-x7ba-5c85-6144-1234a7d3f721]
at
org.apache.ignite.internal.processors.cache.GridCacheUtils.checkAttributeMismatch(GridCacheUtils.java:1144)
~[ignite-core-1.7.0.jar:1.7.0]
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.checkCache(GridCacheProcessor.java:2915)
~[ignite-core-1.7.0.jar:1.7.0]
at
org.apache.ignite.internal.processors.cache.GridCacheProcessor.onKernalStart(GridCacheProcessor.java:756)
~[ignite-core-1.7.0.jar:1.7.0]
at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:930)
[ignite-core-1.7.0.jar:1.7.0]
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1739)
[ignite-core-1.7.0.jar:1.7.0]
at
org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1589)
[ignite-core-1.7.0.jar:1.7.0]
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1042)
[ignite-core-1.7.0.jar:1.7.0]
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:569)
[ignite-core-1.7.0.jar:1.7.0]
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:516)
[ignite-core-1.7.0.jar:1.7.0]
at org.apache.ignite.Ignition.start(Ignition.java:322)
[ignite-core-1.7.0.jar:1.7.0]

What does it mean by "fix affinity key backups in cache configuration" ? 



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Client Near Cache Configuration Lost after Cluster Node Removed

2017-10-23 Thread Nikolai Tikhonov
Hello,

Could you say how you determine that client node loads data from remote
node bypasses near cache?
I'm not able reproduce this behaviour locally, could you share a simple
maven project that reproduces this behaviour?

On Tue, Oct 17, 2017 at 12:54 AM, torjt  wrote:

> Hello All,
>
> We are having an issue with Ignite client near caches being "lost" upon a
> cluster node being removed from the Ignite cluster.  Furthermore, using
> version 2.1.0, we are seeing this issue when another client joins the
> topology.  I built Ignite from GIT today, 10/16/17, with the latest
> changes,
> ver. 2.3.0-SNAPSHOT.  As of version 2.3.0-SNAPSHOT, bringing clients
> up/down
> does not cause an active client to lose its near cache and performance is
> good.  However, when we remove a node from the cluster, the client
> immediately communicates with the cluster and disregards its near cache.
> Restarting the client remedies the issue.
>
> The following is the steps to reproduce the issue:
> Apache Ignite Version:
> *SNAPSHOT#20171016-sha1:ca6662bcb4eecc62493e2e25a572ed0b982c046c*
> 1.  Start 2 Ignite servers
> 2.  Start client with caches configured as near-cache
> 3.  Access caches
> 4.  Stop node client is connected to
> 4a.  Client immediately bypasses near cache and access "cluster" for cache
> miss
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: Client Near Cache Configuration Lost after Cluster Node Removed

2017-10-21 Thread Denis Magda
+ user list

> On Oct 20, 2017, at 11:00 PM, Denis Magda <dma...@apache.org> wrote:
> 
> Ignite caching experts please chime in.
> 
>> Begin forwarded message:
>> 
>> From: torjt <jeremy.tor...@gmail.com>
>> Subject: Client Near Cache Configuration Lost after Cluster Node Removed
>> Date: October 16, 2017 at 2:54:08 PM PDT
>> To: user@ignite.apache.org
>> Reply-To: user@ignite.apache.org
>> 
>> Hello All,
>> 
>> We are having an issue with Ignite client near caches being "lost" upon a
>> cluster node being removed from the Ignite cluster.  Furthermore, using
>> version 2.1.0, we are seeing this issue when another client joins the
>> topology.  I built Ignite from GIT today, 10/16/17, with the latest changes,
>> ver. 2.3.0-SNAPSHOT.  As of version 2.3.0-SNAPSHOT, bringing clients up/down
>> does not cause an active client to lose its near cache and performance is
>> good.  However, when we remove a node from the cluster, the client
>> immediately communicates with the cluster and disregards its near cache. 
>> Restarting the client remedies the issue.
>> 
>> The following is the steps to reproduce the issue:
>> Apache Ignite Version:
>> *SNAPSHOT#20171016-sha1:ca6662bcb4eecc62493e2e25a572ed0b982c046c*
>> 1.  Start 2 Ignite servers
>> 2.  Start client with caches configured as near-cache
>> 3.  Access caches
>> 4.  Stop node client is connected to
>> 4a.  Client immediately bypasses near cache and access "cluster" for cache
>> miss
>> 
>> 
>> 
>> 
>> 
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
> 



Client Near Cache Configuration Lost after Cluster Node Removed

2017-10-16 Thread torjt
Hello All,

We are having an issue with Ignite client near caches being "lost" upon a
cluster node being removed from the Ignite cluster.  Furthermore, using
version 2.1.0, we are seeing this issue when another client joins the
topology.  I built Ignite from GIT today, 10/16/17, with the latest changes,
ver. 2.3.0-SNAPSHOT.  As of version 2.3.0-SNAPSHOT, bringing clients up/down
does not cause an active client to lose its near cache and performance is
good.  However, when we remove a node from the cluster, the client
immediately communicates with the cluster and disregards its near cache. 
Restarting the client remedies the issue.

The following is the steps to reproduce the issue:
Apache Ignite Version:
*SNAPSHOT#20171016-sha1:ca6662bcb4eecc62493e2e25a572ed0b982c046c*
1.  Start 2 Ignite servers
2.  Start client with caches configured as near-cache
3.  Access caches
4.  Stop node client is connected to
4a.  Client immediately bypasses near cache and access "cluster" for cache
miss





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Write-Behind Cache configuration and custom cache store

2017-09-06 Thread vkulichenko
Rick,

writeThrough property enables cache store integration overall, while
writeBehindEnabled property controls whether store updates are async or not.
So this is correct behavior.

As for transactions, write-behind store updates are always non
transactional. I.e. you will have a transaction in cache, but updates in
this transaction will be written into store independently. Therefore you
don't observe database transaction commit in this scenario. If you need
strong consistency between cache and DB, use sync write-through.

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Write-Behind Cache configuration and custom cache store

2017-09-06 Thread rick_tem
Hi,

I am using Ignite 2.0.0 with a cache configurations shown below.  First, I
noticed that writeAll() or any write() was not called on my cache store when
writeBehindEnabled=true but writeThrough=false.  Seems like if
writeBehindEnabled set to true, it should override writeThrough, but anyway,
I got around that.  With my writeBehind cache now calling writeAll() in my
cache store I noticed sessionEnd() is not called even when my cache is
TRANSACTIONAL.  Does this mean I have to call commit() on the connection at
the end of writeAll()?  How would I then differentiate a call to writeAll()
from putAll()?  It seems like sessionEnd() should be called when a flush
occurs if I am specifying a TRANSACTIONAL cache.  Is this a bug?  I am not
explicitly using transactions (i.e. try (Transaction tx =
transactions.txStart()) )...When I just use write through caching,
sessionEnd() is called without an explicit transaction and as well behaves
in a JTA environment.

Thanks for any clarification.

Best,
Rick













 



















--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


RE: Dynamically update the Cache Configuration without restsrting client and serve

2017-07-06 Thread vkulichenko
Priya,

There are no configuration properties that can be changed in runtime.
However, most of your requirements seem to be related to dynamic schema
change. This already happens transparently on object level thanks to binary
format [1] used as a default data storage format. On SQL level this will be
possible when we have full DDL support.

[1] https://apacheignite.readme.io/docs/binary-marshaller

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Dynamically-update-the-Cache-Configuration-without-restsrting-client-and-serve-tp14303p14427.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Affinity key backups mismatch (fix affinity key backups in cache configuration or set -DIGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK=true system property

2017-01-29 Thread zshamrock
Or maybe then even more general question: which configuration should
be/enough configured where? Is it enough just to configure Ignite client
with AtomicConfiguration? What settings are enough to configure just on the
client side, which one on the server, and which one on both? I am little bit
lost. Is there a rule of thumb to follow?



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Affinity-key-backups-mismatch-fix-affinity-key-backups-in-cache-configuration-or-set-DIGNITE-SKIP-COy-tp10305p10307.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Affinity key backups mismatch (fix affinity key backups in cache configuration or set -DIGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK=true system property

2017-01-29 Thread zshamrock
Ok, I found the cause of the issue. It was the mismatch between the Ignite
client:

Ignition.setClientMode(true);
return Ignition.start(igniteConfiguration());

and ignite server running with XML configuration.

Which raises another question - how much in common in the configuration
Ignite client and Ignite server should have? And what would be the
consequences of not keeping them in sync?

As my Ignite server has extensive configuration for each of the cache used
with cachestore, eviction/expiry policies, etc. While my Ignite client
doesn't have anything related to the cache configuration at all, i.e. it is
simple like this:

@Bean
public IgniteConfiguration igniteConfiguration() {
final IgniteConfiguration igniteConfiguration = new
IgniteConfiguration();
final AtomicConfiguration atomicConfiguration = new
AtomicConfiguration(); // 1
   
atomicConfiguration.setBackups(cacheEnvironment.atomicConfigurationBackups()); 
// 2
igniteConfiguration.setAtomicConfiguration(atomicConfiguration); //
3
igniteConfiguration.setGridName(cacheEnvironment.gridName());
igniteConfiguration.setMetricsLogFrequency(0); // 0 - to disable
setupTcpDiscoverySpi(igniteConfiguration);
return igniteConfiguration;
}

(by adding lines 1-3 has helped to solve the issue describe in the topic of
this thread)



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Affinity-key-backups-mismatch-fix-affinity-key-backups-in-cache-configuration-or-set-DIGNITE-SKIP-COy-tp10305p10306.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Affinity key backups mismatch (fix affinity key backups in cache configuration or set -DIGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK=true system property

2017-01-29 Thread zshamrock
I am trying to use Ignite AtomicLong, I've configured the XML according to
the official documentation:







Although when I run the application, I get the following exception, and
Ignite is failing to start:

org.apache.ignite.IgniteException: Affinity key backups mismatch (fix
affinity key backups in 
cache configuration or set
-DIGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK=true system property)
[cacheName=ignite-atomics-sys-cache, localAffinityKeyBackups=0,
remoteAffinityKeyBacku
ps=1, rmtNodeId=ffaee6a8-19b2-4168-8d9d-dafd4f9a1316]

I suppose Ignite atomics are implemented using the normal Ignite cache
underneath, although as we (as consumers) don't have access to this internal
cache, so I would expect Ignite will take care of the proper cache setup.
But instead I see the exception above.

Is it a bug in Ignite? And what does it mean and how it can be fixed? (yes,
setting  -DIGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK=true makes it work,
but also makes me feel uncomfortable about the approach).

Any ideas on this?

Using Ignite 1.7.0.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Affinity-key-backups-mismatch-fix-affinity-key-backups-in-cache-configuration-or-set-DIGNITE-SKIP-COy-tp10305.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: alter cache configuration after cache created.

2016-12-18 Thread Alexey Kuznetsov
Hi, Shawn Du!

No, it is not possible.

You need to destroy cache a re-create with new configuration.

On Mon, Dec 19, 2016 at 9:33 AM, Shawn Du <shawn...@neulion.com.cn> wrote:

> Hi,
>
>
>
> It is possible to alter cache configuration after cache created and
> running?
>
>
>
> Thanks
>
> Shawn
>



-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com


alter cache configuration after cache created.

2016-12-18 Thread Shawn Du
Hi,

 

It is possible to alter cache configuration after cache created and running?

 

Thanks

Shawn



Re: Create cache configuration error

2016-07-12 Thread Denis Magda
Hi,

Index field name must be unique across both a key and a value. Check the 
implementation of your key and value and make sure that there is no duplicates.

—
Denis

> On Jul 12, 2016, at 5:01 AM, deleerhai <185961...@qq.com> wrote:
> 
> Hi,
> Create cache configuration error.
> 
> <http://apache-ignite-users.70518.x6.nabble.com/file/n6218/1.png> 
> <http://apache-ignite-users.70518.x6.nabble.com/file/n6218/2.png> 
> 
> 七月 12, 2016 10:13:19 上午 org.apache.catalina.core.ApplicationContext log
> 严重: StandardWrapper.Throwable
> javax.cache.CacheException: Index with name 'code_idx' already exists.
>   at
> org.apache.ignite.configuration.CacheConfiguration$TypeDescriptor.addIndex(CacheConfiguration.java:2429)
>   at
> org.apache.ignite.configuration.CacheConfiguration.processAnnotation(CacheConfiguration.java:2340)
>   at
> org.apache.ignite.configuration.CacheConfiguration.processAnnotationsInClass(CacheConfiguration.java:2292)
>   at
> org.apache.ignite.configuration.CacheConfiguration.processKeyAndValueClasses(CacheConfiguration.java:2233)
>   at
> org.apache.ignite.configuration.CacheConfiguration.setIndexedTypes(CacheConfiguration.java:1913)
>   at
> com.czt.kbp.coupon.repository.cachestore.CouponCacheConfig.config(CouponCacheConfig.java:14)
>   at
> com.czt.kbp.coupon.repository.cachestore.CouponCacheIniter.init(CouponCacheIniter.java:58)
>   at
> com.czt.kbp.coupon.repository.cachestore.CouponCacheIniter.initCache(CouponCacheIniter.java:41)
>   at
> com.czt.kbp.coupon.server.servlet.CouponInitServlet.init(CouponInitServlet.java:19)
>   at
> org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
>   at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
>   at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
>   at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4996)
>   at
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
>   at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
>   at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
>   at
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
>   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>   at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> 
> 
> 
> 
> --
> View this message in context: 
> http://apache-ignite-users.70518.x6.nabble.com/Create-cache-configuration-error-tp6218.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.



Re: Create cache configuration error

2016-07-12 Thread AndreyVel
Hi deleerhai

Could you show source and class hierarchy for ContractInfo.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Create-cache-configuration-error-tp6218p6226.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Create cache configuration error

2016-07-11 Thread deleerhai
Hi,
Create cache configuration error.

<http://apache-ignite-users.70518.x6.nabble.com/file/n6218/1.png> 
<http://apache-ignite-users.70518.x6.nabble.com/file/n6218/2.png> 

七月 12, 2016 10:13:19 上午 org.apache.catalina.core.ApplicationContext log
严重: StandardWrapper.Throwable
javax.cache.CacheException: Index with name 'code_idx' already exists.
at
org.apache.ignite.configuration.CacheConfiguration$TypeDescriptor.addIndex(CacheConfiguration.java:2429)
at
org.apache.ignite.configuration.CacheConfiguration.processAnnotation(CacheConfiguration.java:2340)
at
org.apache.ignite.configuration.CacheConfiguration.processAnnotationsInClass(CacheConfiguration.java:2292)
at
org.apache.ignite.configuration.CacheConfiguration.processKeyAndValueClasses(CacheConfiguration.java:2233)
at
org.apache.ignite.configuration.CacheConfiguration.setIndexedTypes(CacheConfiguration.java:1913)
at
com.czt.kbp.coupon.repository.cachestore.CouponCacheConfig.config(CouponCacheConfig.java:14)
at
com.czt.kbp.coupon.repository.cachestore.CouponCacheIniter.init(CouponCacheIniter.java:58)
at
com.czt.kbp.coupon.repository.cachestore.CouponCacheIniter.initCache(CouponCacheIniter.java:41)
at
com.czt.kbp.coupon.server.servlet.CouponInitServlet.init(CouponInitServlet.java:19)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4996)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Create-cache-configuration-error-tp6218.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-03-01 Thread vinshar
One observation. Everything works fine if i do not add any QueryIndex to
QueryEntity. Seems like problem is due to old QueryIndex metadata instance
being somehow used by client nodes even though all caches on all nodes were
destroyed and all server nodes restarted.


vinshar wrote
> Hi Vladimir,
> 
> I am able to reproduce problem and it's not intermittent. Exception occurs
> everytime. 
> I am attaching class with main method which replicates the issue ans also
> attaching logs.
> IgniteProblemTest.java
> <http://apache-ignite-users.70518.x6.nabble.com/file/n3307/IgniteProblemTest.java>
>   
> 
> log.txt
> <http://apache-ignite-users.70518.x6.nabble.com/file/n3307/log.txt>  
> 
> Below is summary of what i am doing in main method
> 1) create a server node 1 with a replicated cache EMPLOYEE. Wait 10
> seconds.
> 2) create a server node 2 with a replicated cache EMPLOYEE. Wait 10
> seconds.
> 3) create a client node 1 with a near cache cache EMPLOYEE. Wait 10
> seconds.
> 4) create a client node 2 with a near cache cache EMPLOYEE. Wait 10
> seconds.
> 5) put 100 entries to both client caches. Only 10 entries remain. Others
> get evicted.
> 6) Close both servers and wait for 5 seconds.
> 7) start servers again with same configs. Wait 10 seconds after start of
> each server. Some exceptions seen during server close.
> 8) getOrCreate near caches again on client nodes.
> 9) Try putting objects again. Exception occurred.
> 
> Regards,
> Vinay





--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3310.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-03-01 Thread vinshar
Hi Vladimir,

I am able to reproduce problem and it's not intermittent. Exception occurs
everytime. 
I am attaching class with main method which replicates the issue ans also
attaching logs.

IgniteProblemTest.java
<http://apache-ignite-users.70518.x6.nabble.com/file/n3307/IgniteProblemTest.java>
  
log.txt <http://apache-ignite-users.70518.x6.nabble.com/file/n3307/log.txt>  

Below is summary of what i am doing in main method
1) create a server node 1 with a replicated cache EMPLOYEE. Wait 10 seconds.
2) create a server node 2 with a replicated cache EMPLOYEE. Wait 10 seconds.
3) create a client node 1 with a near cache cache EMPLOYEE. Wait 10 seconds.
4) create a client node 2 with a near cache cache EMPLOYEE. Wait 10 seconds.
5) put 100 entries to both client caches. Only 10 entries remain. Others get
evicted.
6) Close both servers and wait for 5 seconds.
7) start servers again with same configs. Wait 10 seconds after start of
each server. Some exceptions seen during server close.
8) getOrCreate near caches again on client nodes.
9) Try putting objects again. Exception occurred.

Regards,
Vinay



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3307.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-21 Thread vinay sharma
Hi Vladimir,

Sure. I am up for any assistance to make Ignite better.

I shared server configs and stacktraces in previous communications. I will
try my best to replicate this issue again.  If i could find exact steps
then i will try to write a test case for simplification.

It may take some time for me to replicate this issue as this issue is
intermittent and we faced it on only one of our 3 environments. I will keep
group updated on the same.

Regards,
Vinay Sharma


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-19 Thread Vladimir Ozerov
Hi Vinay,

Thanks for provided description. But I am afraid it is too broad for us to
start investigation, because there are lots similar cases when all works
fine. Though, the problem you faced seems pretty serious to me and we
definitely need to find the root cause.

Can we expect more assistance from your side with it? Any more hints - XML
configuration, simplified code sample to reproduce the issue, etc. are
appreciated.

Vladimir.

On Fri, Feb 19, 2016 at 6:32 PM, vinshar <vinsharma.t...@gmail.com> wrote:

> Thanks for workaround Vladimir. I am using multiple caches. Each cache has
> key as long and value are POJOs. One is Program Cache of type <Long,
> ProgramDto> and similar other caches exists. All had this problem. All
> these
> value classes are simple POJOs which implement serializable, does not
> override any of Object classes methods (equals, hashcode, toString etc) and
> have class attributes of type - long, String, Boolean, java.sql.Timestamp
> with getter setter methods. All classes do have auto generated "private
> static final long serialVersionUID "
>
> I also thought of a workaround of having a MBean which ,out of many other
> tasks, can also restart encapsulated Ignite instance in my custom cache
> manager. I landed in a  issue there which i will share in a separate
> thread.
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3100.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-19 Thread vinshar
Thanks for workaround Vladimir. I am using multiple caches. Each cache has
key as long and value are POJOs. One is Program Cache of type <Long,
ProgramDto> and similar other caches exists. All had this problem. All these
value classes are simple POJOs which implement serializable, does not
override any of Object classes methods (equals, hashcode, toString etc) and
have class attributes of type - long, String, Boolean, java.sql.Timestamp
with getter setter methods. All classes do have auto generated "private
static final long serialVersionUID "

I also thought of a workaround of having a MBean which ,out of many other
tasks, can also restart encapsulated Ignite instance in my custom cache
manager. I landed in a  issue there which i will share in a separate thread.



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3100.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-18 Thread vinshar
Hi Vladimir,

Please find attached stack traces and visor output for my multiple tries to
identify and resolve issue. Also find attached my server side
configurations. We start all caches from client in local mode and all
distributed caches have to be defined in server configs. Cache in attached
file with entries (name ends with _ALL) is local cache. Other caches are
replicated and defined in server configs. 

Attached stack trace file contains topology and cache statistics during
these multiple tries. I tried cleaning caches on a node by its ID and also
clearing a cache by its name but both failed. attached file has stack traces
for all.
I have masked some information like IPs etc. let me know in case if you need
any more information.

default-config.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/n3085/default-config.xml>  

visor_ignite_stack_trace_masked.txt
<http://apache-ignite-users.70518.x6.nabble.com/file/n3085/visor_ignite_stack_trace_masked.txt>
  

Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3085.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-18 Thread Vladimir Ozerov
Hi Vinay,

It looks like there was a problem with serialization of one of Ignite
internal components. Could you please provide the full stack trace of this
exception?
Any additional information like your source code or Ignite XML
configuration could also help.

Vladimir.

On Thu, Feb 18, 2016 at 4:32 AM, vinshar <vinsharma.t...@gmail.com> wrote:

> Hi Val
>
> At the time of this issue i checked topology through visor and all 3
> client and 2 server nodes were there. There were no items in any cache. I
> could see caches created on all 5 nodes (near cache on 3 clients and
> replicated cache on 2 servers). I also tried cleaning a cache through visor
> through command "cache -clear -c=PROGRAMS" which caused exception trace as
> i mentioned previously. I tried multiple times and got same error. I was
> running visor on one on the hosts of server nodes.
>
> Shouldn't a node be dropped from topology if its not accessible due to any
> issue? Exception trace with class loader related exceptions, error in
> uodate when cache is empty on all nodes, all nodes visible in visor
> topology and getting same exception on repeated tries to clean a cache
> seems like pointing to problem other than network or node accessibility
> issue.
>
> I restarted ignite server nodes but problem was still there. I had to stop
> all ignite nodes including clients to resolve problem.
>
> Even more interesting thing is that i did not faced any issue on my DEV
> and QA environment when i did cache changes and restarted just server
> nodes. I faced this problem on pre-prod where i had to restart all nodes.
>
> Regards,
> Vinay Sharma
> On Feb 17, 2016 7:05 PM, "vkulichenko [via Apache Ignite Users]" <[hidden
> email] <http:///user/SendEmail.jtp?type=node=3070=0>> wrote:
>
>> Hi Vinay,
>>
>> CachePartialUpdateException is thrown by an update operation (put,
>> putAll, remove, removeAll, ...) if updates for one or more keys involved in
>> this operation failed. This exception has failedKeys() method that tells
>> you which keys failed so that you can retry only them, no need to retry
>> successful ones.
>>
>> Most likely you were getting these exceptions when there were no server
>> nodes in the topology. Is this the case?
>>
>> -Val
>>
>> --
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3066.html
>> To unsubscribe from changed cache configuration and restarted server
>> nodes. Getting exception., click here.
>> NAML
>> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
> --
> View this message in context: Re: changed cache configuration and
> restarted server nodes. Getting exception.
> <http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3070.html>
>
> Sent from the Apache Ignite Users mailing list archive
> <http://apache-ignite-users.70518.x6.nabble.com/> at Nabble.com.
>


Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-17 Thread vinshar
Hi Val

At the time of this issue i checked topology through visor and all 3 client
and 2 server nodes were there. There were no items in any cache. I could
see caches created on all 5 nodes (near cache on 3 clients and replicated
cache on 2 servers). I also tried cleaning a cache through visor through
command "cache -clear -c=PROGRAMS" which caused exception trace as i
mentioned previously. I tried multiple times and got same error. I was
running visor on one on the hosts of server nodes.

Shouldn't a node be dropped from topology if its not accessible due to any
issue? Exception trace with class loader related exceptions, error in
uodate when cache is empty on all nodes, all nodes visible in visor
topology and getting same exception on repeated tries to clean a cache
seems like pointing to problem other than network or node accessibility
issue.

I restarted ignite server nodes but problem was still there. I had to stop
all ignite nodes including clients to resolve problem.

Even more interesting thing is that i did not faced any issue on my DEV and
QA environment when i did cache changes and restarted just server nodes. I
faced this problem on pre-prod where i had to restart all nodes.

Regards,
Vinay Sharma
On Feb 17, 2016 7:05 PM, "vkulichenko [via Apache Ignite Users]" <
ml-node+s70518n306...@n6.nabble.com> wrote:

> Hi Vinay,
>
> CachePartialUpdateException is thrown by an update operation (put, putAll,
> remove, removeAll, ...) if updates for one or more keys involved in this
> operation failed. This exception has failedKeys() method that tells you
> which keys failed so that you can retry only them, no need to retry
> successful ones.
>
> Most likely you were getting these exceptions when there were no server
> nodes in the topology. Is this the case?
>
> -Val
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3066.html
> To unsubscribe from changed cache configuration and restarted server
> nodes. Getting exception., click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=3064=dmluc2hhcm1hLnRlY2hAZ21haWwuY29tfDMwNjR8ODIyNDgwNzMy>
> .
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3070.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: changed cache configuration and restarted server nodes. Getting exception.

2016-02-17 Thread vkulichenko
Hi Vinay,

CachePartialUpdateException is thrown by an update operation (put, putAll,
remove, removeAll, ...) if updates for one or more keys involved in this
operation failed. This exception has failedKeys() method that tells you
which keys failed so that you can retry only them, no need to retry
successful ones.

Most likely you were getting these exceptions when there were no server
nodes in the topology. Is this the case?

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064p3066.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


changed cache configuration and restarted server nodes. Getting exception.

2016-02-17 Thread vinshar
Hi,

I faced an issue today and couldn't figure out whats wrong hence though of
asking on this forum.
I added expiration policy to 2 cacheConfigurations, stopped all cache server
nodes and then started one by one. My client nodes had near caches for the
these caches and i am not sure if this caused the issue. Issue was that i
started getting "org.apache.ignite.cache.CachePartialUpdateException: Failed
to update keys (retry update if possible)." exception in my apps that were
using these caches. 
I thought that may be there are some old entries in near caches where as
server caches are empty and this is causing issue somehow. I checked cache
statistics and all caches were empty. 
Still i tried to clear caches using visor and faced following exception.

visor> cache -clear -c=PROGRAMS
[16:43:42,883][SEVERE][mgmt-#22%null%][GridTaskWorker] Failed to reduce job
results due to undeclared user exception
[task=o.a.i.i.v.cache.VisorCacheClearTask@54656dd, err=class
o.a.i.IgniteException: Failed to deserialize object with given class loader:
WebappClassLoader
  context: /myWebService
  delegate: false
  repositories:
/WEB-INF/classes/
--> Parent Classloader:
java.net.URLClassLoader@2b71fc7e
]
class org.apache.ignite.IgniteException: Failed to deserialize object with
given class loader: WebappClassLoader
  context: /myWebService
  delegate: false
  repositories:
/WEB-INF/classes/
--> Parent Classloader:
java.net.URLClassLoader@2b71fc7e

at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:882)

..
..
..
..
..
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to
deserialize object with given class loader: WebappClassLoader
..
..
..
Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
at
org.apache.ignite.marshaller.optimized.OptimizedObjectInputStream.readExternalizable(OptimizedObjectInputStream.java:523
..
..
..
Caused by: java.io.InvalidObjectException: Ignite instance with provided
name doesn't exist. Did you call Ignition.start(..) to start an Ignite
instance? [name=null]
at
org.apache.ignite.internal.processors.cache.GridCacheContext.readResolve(GridCacheContext.java:1999)
... 37 more
Caused by: class org.apache.ignite.IgniteIllegalStateException: Ignite
instance with provided name doesn't exist. Did you call Ignition.start(..)
to start an Ignite instance? [name=null]
at org.apache.ignite.internal.IgnitionEx.gridx(IgnitionEx.java:1267)
at
org.apache.ignite.internal.processors.cache.GridCacheContext.readResolve(GridCacheContext.java:1989)
... 37 more
(wrn) : class org.apache.ignite.IgniteException: Failed to
deserialize object with given class loader: WebappClassLoader


Regards,
Vinay Sharma



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/changed-cache-configuration-and-restarted-server-nodes-Getting-exception-tp3064.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Clarification on binary object cache configuration

2016-01-26 Thread Romain Gilles
Ok,
Thank you!

Romain

Le mar. 26 janv. 2016 à 11:28, Alexey Goncharuk 
a écrit :

> Hi Romain,
>
> No, if you set storeKeepBinary(true), then values will be passed to a
> store in binary format regardless of the withKeepBinary() flag on cache API.
> ​
>


Clarification on binary object cache configuration

2016-01-26 Thread Romain Gilles
Hi Igniters,
I would like a clarification. If I create my cache with the following
option:
config.setStoreKeepBinary(true);
Do I have to use the following call in order to work with BinaryObject?
ignite.cache(cacheName).withKeepBinary()...

Thanks in advance,

Romain