Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 18563200D56 for ; Tue, 12 Dec 2017 15:49:26 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 166A5160BFC; Tue, 12 Dec 2017 14:49:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1EF58160BE7 for ; Tue, 12 Dec 2017 15:49:20 +0100 (CET) Received: (qmail 18003 invoked by uid 500); 12 Dec 2017 14:49:20 -0000 Mailing-List: contact user-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ignite.apache.org Delivered-To: mailing list user@ignite.apache.org Received: (qmail 17994 invoked by uid 99); 12 Dec 2017 14:49:20 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2017 14:49:20 +0000 Received: from mail-qt0-f181.google.com (mail-qt0-f181.google.com [209.85.216.181]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id B508D1A003E for ; Tue, 12 Dec 2017 14:49:18 +0000 (UTC) Received: by mail-qt0-f181.google.com with SMTP id r39so47736828qtr.13 for ; Tue, 12 Dec 2017 06:49:17 -0800 (PST) X-Gm-Message-State: AKGB3mJzzMiE3iVrQj2s09r+pk0YSbXiB4ePCBrXtzqEiRPh75tf//47 wRhAT2p2FJDHclV9Z49KLGtwwoiiPT91iTgJKmMPNw== X-Google-Smtp-Source: ACJfBotBpXoT/t5x3nBgvdOubE7bpsx3S+rTwokBfp5WQydTYs5LbR76S2DOdJFjp2YfPNlvjySXBwmntfCC8mLWD8c= X-Received: by 10.233.230.66 with SMTP id x2mr5414341qkl.330.1513090155382; Tue, 12 Dec 2017 06:49:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.59.184 with HTTP; Tue, 12 Dec 2017 06:49:14 -0800 (PST) In-Reply-To: References: From: Nikolai Tikhonov Date: Tue, 12 Dec 2017 17:49:14 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Ignite Cache Data Not Available in Other Server Nodes To: user@ignite.apache.org Content-Type: multipart/alternative; boundary="f403043b27b839a7c3056025c1d0" archived-at: Tue, 12 Dec 2017 14:49:26 -0000 --f403043b27b839a7c3056025c1d0 Content-Type: text/plain; charset="UTF-8" Can you share code snippet which shows how you put data to the cache? On Tue, Dec 12, 2017 at 12:26 PM, Harshil garg wrote: > Sorry , forgot to attach the xml used for configuring cache. > > > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:context="http://www.springframework.org/schema/context" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd > http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 127.0.0.1:47500..47509 > > > > > > > > > > > > > On Tue, Dec 12, 2017 at 2:55 PM, Harshil garg > wrote: > >> Hi Nikolai >> >> I haven't removed any data from other nodes. How data can be removed >> manually from cache manually ?? >> I have three cache deployed in Data Node which is configured using this >> below xml. >> >> I have data getting saved in workflowRunStateCache which I verified in >> web console. But when I am trying to access this cache from different >> server node , cache is coming completely empty . >> >> What could be the possible reasons ?? >> Need some solid inputs regarding the same. >> >> Any help will be highly appreciated. >> >> >> >> >> >> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:context="http://www.springframework.org/schema/context" >> xsi:schemaLocation=" >> http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd >> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> 127.0.0.1:47500..47509 >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> On Mon, Dec 11, 2017 at 8:29 PM, Nikolai Tikhonov >> wrote: >> >>> Hello! >>> >>> It looks weird for me. You should see the same data set from all nodes >>> of cluster. I think you or remove data from other nodes or performe an >>> operations under another cache. Can you share simple maven project which >>> reproduces the problem? >>> >>> On Mon, Dec 11, 2017 at 5:22 PM, Harshil garg >>> wrote: >>> >>>> I am trying to access ignite cache data from other nodes , I am able to >>>> access the ignite cache but cache is completely empty and hence throwing >>>> nullpointerException when I am trying to do cache.get(key). >>>> >>>> I have tried using both REPLICATED and PARTITONED MODE for >>>> workflowRunState Cache. >>>> >>>> Here is the xml configuration >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>> xmlns:context="http://www.springframework.org/schema/context" >>>> xsi:schemaLocation=" >>>> http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd >>>> http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> 127.0.0.1:47500..47509 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> All these caches are deployed in Data Node. >>>> >>>> Now after doing some operations I had populated data in >>>> workflowRunstateCache which I verified in web console as well. >>>> >>>> But when I try to access the same cache from different server node , no >>>> data is available in that. In the following code I am trying to access >>>> workflowrunStateCache from different server node , it shows me that >>>> containsKey as false and thows NullpointerException in debug mode when I do >>>> workflowRunStateCache.get(); >>>> >>>> while (true) { >>>> try (Transaction tx = ignite.transactions().txStart(TransactionConcurrency.OPTIMISTIC, TransactionIsolation.SERIALIZABLE)) { >>>> System.out.println("Conatins Key" + workflowRunStateIgniteCache.containsKey(updatedKeys.get(0))); >>>> System.out.println("Conatins Key" + workflowRunStateIgniteCache); >>>> Boolean flowProcessable = updatedKeys.stream() >>>> // check if there is at least one event in each cache entry to be processed >>>> .map(updatedKey -> workflowRunStateIgniteCache.get(updatedKey).getFlowRunEvents().size() > 0) >>>> .reduce(true, (a, b) -> a && b).booleanValue(); >>>> >>>> List inputEvents = null; >>>> >>>> if (flowProcessable) { >>>> inputEvents = updatedKeys >>>> .stream() >>>> .map(updatedKey -> { >>>> try { >>>> return workflowRunStateIgniteCache.get(updatedKey).getFlowRunEvents().take(); >>>> } catch (InterruptedException e) { >>>> e.printStackTrace(); >>>> } >>>> return null; >>>> }).collect(Collectors.toList()); >>>> } >>>> >>>> tx.commit(); >>>> >>>> break; >>>> } catch (TransactionOptimisticException e) { >>>> // todo: emit a monitoring metric TRANSACTIONS_FAILED here >>>> System.out.println("Transaction failed. Retrying..."); >>>> } >>>> } >>>> >>>> System.out logs: >>>> >>>> Conatins Keyfalse >>>> >>>> >>> >> > --f403043b27b839a7c3056025c1d0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Can you share code snippet which shows how you put data to= the cache?

= On Tue, Dec 12, 2017 at 12:26 PM, Harshil garg <harshilbits5@gmail.co= m> wrote:
= Sorry , forgot to attach the xml used for configuring cache.

<?xml version=3D"1.0" encoding=3D"=
;UTF-8"?>
<= span style=3D"color:rgb(232,191,106)">
<!--
Lic= ensed to the Apache Software Foundation (ASF) under one or more
<= span style=3D"color:rgb(128,128,128)"> contributor license agreements. Se= e the NOTICE file distributed with
this work for additional information regarding copyright ownersh= ip.
The ASF licenses thi= s file to You under the Apache License, Version 2.0
(the "License"); you may not use th= is file except in compliance with
the License. You may obtain a copy of the License at
<= span style=3D"color:rgb(128,128,128)"> http://www.apache.org/licenses/LICENSE-2.0
Unle= ss required by applicable law or agreed to in writing, software
<= span style=3D"color:rgb(128,128,128)"> distributed under the License is di= stributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre= ss or implied.
See the L= icense for the specific language governing permissions and
limitations under the License.
-->

<= !--
Ignite configurati= on with all defaults and enabled p2p deployment and enabled events.
-->
<beans xmlns=3D"http://www.sp= ringframework.org/schema/beans"
xml= ns:xsi=3D&quo= t;h= ttp://www.w3.org/2001/XMLSchema-instance"
xmlns:context=3D
"http://www.springframework.org/schema/context"
xsi
:schemaLocation=3D&quo= t;
http://www.spring= framework.org/schema/beans http://www.springfr= amework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.or= g/schema/context/spring-context-3.2.xsd">

<<= span style=3D"color:rgb(152,118,170)">context:property-placeholder location=3D"clas= spath:app.properties"/>
<bean abstract=3D"true" id=3D"ignite-da= ta.cfg" class=3D<= span style=3D"color:rgb(106,135,89)">"org.apache.ignite.configura= tion.IgniteConfiguration">
<!-- Set to true to enable distributed= class loading for examples, default is false. -->
<property name=3D"peerClassLoadingEnabled&qu= ot; value=3D"true"/>

<= /span> <!-- Ignite predicate filter to separate data no= des from service nodes -->
<property name=3D"userAttributes">
= <map key-type=3D"java.lang.String" value-type=3D"java.lang.Boolean">
<entry key=3D"data.node= " value=3D"true"/>
= </map>
= </property>
= <property name=3D"cacheConfiguration">
<list>
<bean class=3D"= org.apache.ignite.configuration.CacheConfiguration">
<!-- Set a cache name. -->
= <property name=3D"name"
value=3D"${cache.w= orkflow.name}"/= >

<!-- Set cache mode. -->
<property = name=3D"cacheMode" <= /span>value=3D"PARTITIONED"/>
<prop= erty name=3D"backups" value=3D&qu= ot;2"/>

<property name=3D"st= atisticsEnabled" value= =3D"true"/>

= <property name= =3D"nodeFilter">
<bean class=3D"com.mediaiq.caps.platform.choreography.commons.filter.Dat= aNodeFilter"/>
</propert= y>
<= /bean>
= <bean class=3D"org.apache.ignite.configuration= .CacheConfiguration"
>=
<!-- Set a cache name. --> = <property name=3D= "name" value=3D"${cache.workflow-run.name}"= />

<!-= - Set cache mode. -->
= <proper= ty name=3D"cacheMode" value=3D&q= uot;REPLICATED"/>
=

<!-- This is a transactional cache as many keys need to be u= pdated together -->
= <property= name=3D"atomicityMode" value=3D&= quot;TRANSACTIONAL"/>=

<property name=3D"backups" val= ue=3D"1"/>

= <property name=3D= "statisticsEnabled" = value=3D"true"/>

<property <= /span>name=3D"nodeFilter">
= <bean cl= ass=3D"com.mediaiq.caps.p= latform.choreography.commons.filter.DataNodeFilter"/>
</property>
</bean>
<bean class=3D"org.apache.ignite.configuration.CacheConfiguration"<= /span>>
<!-- Set a cache name. -->
<property nam= e=3D"name" value=3D
"${cache.workflow-pause.name}"/>

<= /span><!-- Set cache mode. -->=
<property name=3D"cacheMode" value= =3D"PARTITIONED"/>

= <property name=3D"backups" value=3D"1"/>

<property
name=3D"statisticsEnabled" value=3D&quo= t;true"/>
<= span style=3D"color:rgb(232,191,106)">
<property name=3D"= nodeFilter">
<bean <= /span>class=3D"com.mediaiq.caps.platform.choreography.co= mmons.filter.DataNodeFilter"/>
= </property>
</bean>
</list>
</property>
<!-- Explicit= ly configure TCP discovery SPI to provide list of initial nodes. -->
=
<property name=3D"discover= ySpi">
<bean
class=3D"org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"<= /span>>
<property name=3D"ipFinder">
=
<!--
Ignite provides several options = for automatic discovery that can be used
instead os static IP based discovery= . For information on all options refer
to our documentation: http://apac= heignite.readme.io/docs/cluster-config
-->
<!-- Uncomment static IP find= er to enable static-based discovery of initial nodes. -->
<!--<bean clas= s=3D"org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDisc= overyVmIpFinder">-->
<= ;bean class=3D"org.apache.ignite.spi.discovery.tc= p.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
<property name=3D"addresses"> = <list>
= <!-- In= distributed environment, replace with actual host IP address. -->
= <value>127.0.0.= 1:47500..47509</value> = </list>
= </property>
</bean>

= </property>
= </bean>
= </property>
&= lt;/bean>
<bean = parent=3D"ignite-data.cfg"/>
</beans>

On Tue, Dec 12, 2017 at 2:55 PM, Harshil garg <harshilbits5@gmail= .com> wrote:
Hi Nikolai

I haven't removed any data from other = nodes. How data can be removed manually from cache manually ??
I = have three cache deployed in Data Node which is configured using this below= xml.

I have data getting saved in workflowRunStat= eCache which I verified in web console. But when I am trying to access this= cache from different server node , cache is coming completely empty .

What could be the possible reasons ??
Need s= ome solid inputs regarding the same.

Any help will= be highly appreciated.
<= div>
<?xml version=3D"1.0" encoding=3D"UTF-8"=
;?>

<!--
Licensed to t= he Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTI= CE file distributed with
= this work for additional information regarding copyright ownership.
The ASF licenses this file to = You under the Apache License, Version 2.0
(the "License"); you may not use this file exce= pt in compliance with
th= e License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENS= E-2.0
Unless require= d by applicable law or agreed to in writing, software
distributed under the License is distributed = on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impl= ied.
See the License for= the specific language governing permissions and
limitations under the License.
-->

<!--
Ignite configuration with al= l defaults and enabled p2p deployment and enabled events.
-->
<beans xmlns= =3D"http://www.springframe= work.org/schema/beans"
xmlns:xsi=3D"http://www= .w3.org/2001/XMLSchema-instance"
xm= lns:context=3D"http://www.springframework.org/schema/context" xsi:= schemaLocation=3D"
http://www.springframework= .org/schema/beans http://www.springframework.o= rg/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema= /context http://www.springframework.org/sc= hema/context/spring-context-3.2.xsd">
=
<context:property-placeholder = location=3D"classpath:app= .properties"/> <bean abstract=3D"true" id=3D"ignite-data.cfg&qu= ot; class=3D"org.apache.ignite.configuration.Igni= teConfiguration">
=
<!-- Set to true to enable distributed class lo= ading for examples, default is false. -->
&l= t;property name=3D"peerClassLoadingEnabled" value=3D"true"/>

<!-- Ignite predicate filter to separate data nodes from = service nodes -->
= <property name=3D"userAttributes">
&l= t;map key-type=3D"java.lang.String"
value-type=3D"java.lang.Boolean">
= <entry key= =3D"data.node" value=3D"true"/>
&l= t;/map>
</pr= operty>
<pro= perty name=3D"cacheConfiguration">
<list>
<bean class=3D"org.apache.i= gnite.configuration.CacheConfiguration">
= <!-- Se= t a cache name. -->
= <property= name=3D"name" value=3D"${cache.workflow.name= }"/>

<!-- Set cache mode. -->
<property name=3D"cacheMode" value=3D"PARTITIONED"/>

<property
= name=3D"backups" value=3D"2"/>

= <property name=3D"statisticsEnab= led" value=3D"true"
/>

<= property name=3D"nodeFilter">
<bean class=3D"com.medi= aiq.caps.platform.choreography.commons.filter.DataNodeFilter"= ;/>
</property>
</bean>
<bean class=3D"org.apache.ignite.configuration.CacheConfigura= tion">
<!-- Set a cache name. -->
<property name=3D"name&= quot; value=3D"${cache.workflow-run.name}"/>

= <!-- Set cache m= ode. -->
= <property name=3D
"cacheMode" value=3D"REPLICATED= "/>

&l= t;!-- This is a transactional cache as many keys need to be updated togethe= r -->
= <property name=3D"atomicityMode" value=3D"TRANSACTI= ONAL"/>

<property name=3D"ba= ckups" value=3D"1"
/>
=
<p= roperty name=3D"statisticsEnabled" value=3D"true"/&g= t;

<property name=3D"nodeFilter">
= <bean class=3D= "com.mediaiq.caps.platform.= choreography.commons.filter.DataNodeFilter"/>
</property>
</bean>
<bean class=3D"= org.apache.ignite.configuration.CacheConfiguration">
<!-- Set a cache name. -->
= <property name=3D"name"
value=3D"${c= ache.workflow-pause.name}"/>

<!-- Set cache mode. -->
<property name=3D"cache= Mode" value=3D"PARTITIONED"/>

= <property name=3D"backups" value=3D"1"/>
<property name=3D"statisticsEnabled" value=3D"true"= />

<property name=3D"nodeFilter= ">
<bean class=3D
"com.mediaiq.caps.platform.choreography.commons.filt= er.DataNodeFilter"/= >
&= lt;/property>
= </bean>
= </list>
= </property>
= <!-- Explicitly configu= re TCP discovery SPI to provide list of initial nodes. -->
<property n= ame=3D"discoverySpi"= >
<bean class=3D"= ;org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
<property name=3D"ipFi= nder">
<!--
Ignite provides several options for autom= atic discovery that can be used
instead os static IP based discovery. For inf= ormation on all options refer
to our documentation: http://apacheignite.= readme.io/docs/cluster-config
-->
<!-- Uncomment static IP finder to ena= ble static-based discovery of initial nodes. -->
<!--<bean class=3D&qu= ot;org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVm= IpFinder">-->
= <bean <= /span>class=3D"org.apache.ignite.spi.discovery.tcp.ipfin= der.multicast.TcpDiscoveryMulticastIpFinder">
<property name=3D"= addresses">
<lis= t>
= <!-- In distri= buted environment, replace with actual host IP address. -->
<value>127.0.0.1:47500= ..47509</value>
</li= st>
= </property>
= </bean>

<= /property>
= </bean>
<= /property>
</bea= n>
<bean = parent=3D"ignite-data.cfg"/>
<= /beans>



On Mon= , Dec 11, 2017 at 8:29 PM, Nikolai Tikhonov <ntikhonov@apache.org= > wrote:
Hello= !

It looks weird for me. You should see the same data se= t from all nodes of cluster. I think you or remove data from other nodes or= performe an operations under another cache. Can you share simple maven pro= ject which reproduces the problem?

On Mon, Dec 11, 2017 at 5:22 PM, Harshil garg <harshilbits5@gmai= l.com> wrote:
I am trying to access ignite cache data from other nodes , I am able to= access the ignite cache but cache is completely empty and hence throwing n= ullpointerException when I am trying to do cache.get(key).

I have tried using both REPLICATED and PARTITONED MODE for workflowRunSt= ate Cache.

Here is the xml configuration

<?xml version=3D"1.=
0" encoding=3D"UTF-8"?>

<!--
Licensed to the Apache Software Founda= tion (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with<= br> this work for additional= information regarding copyright ownership.
The ASF licenses this file to You under the Apache Lice= nse, Version 2.0
(the &q= uot;License"); you may not use this file except in compliance with
=
the License. You may obtai= n a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre= ed to in writing, software
distributed under the License is distributed on an "AS IS" BAS= IS,
WITHOUT WARRANTIES O= R CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov= erning permissions and
l= imitations under the License.
-->

<!--
Ignite configuration with all defaults and enabled p2p= deployment and enabled events.
-->
<beans xmlns=3D"http://www.springframework.org/schema/beans<= /a>"
xmlns:
xsi=3D"http://www.w3.org/2001/XMLSchema= -instance"
= xmlns:context=3D"http://www.springframework.org/schema/context"
xs= i:schemaLocation=3D"
http://www.springframework.org/schema/beans = http://www.springframework.org/schema/beans/spring= -beans-3.2.xsd
= http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-conte= xt-3.2.xsd">=

<context:property-placehol= der location=3D"classpath:app.properties"/>
<bean abstract=3D"true&q= uot; id=3D"ignite-data.cfg" class=3D"org.apache.ignite.configuration.IgniteConfiguration"<= /span>>
<!-- Set to true to enable distributed class loading for examples, de= fault is false. -->
= <property name=3D
"peerClassLoadingEnabled" value=3D&qu= ot;true"/>
=
<!--= Ignite predicate filter to separate data nodes from service nodes --> <property name=3D"userA= ttributes">
<map key-type=3D"java.lang.String" value-type=3D"= ;java.lang.Boolean"= >
<e= ntry key=3D"data.node" value=3D&q= uot;true"/>
</map>
= </property>
= <property name=3D"cacheConfiguration">
= <list>
= <bean class=3D"org.apache.ignite.configurat= ion.CacheConfiguration"
&= gt;
<!-- Set a cache name. -->= ;
<property name=3D"name" value= =3D"${cache.workflow.name}"= />

= <!-- Se= t cache mode. -->
= <property <= /span>name=3D"cacheMode" value=3D"P= ARTITIONED"/>

<property name=3D&q= uot;backups" value=3D"2"/>

= <property name=3D"statisticsEnabled" value=3D"true"/>

<property
= name=3D"nodeFilter">
= <bean class=3D= "com.mediaiq.caps.platfo<= wbr>rm.choreography.commons.filter.DataNodeFilter"/>
</property>
</bean>
<bean class=3D"org.apache.ignite.configuration.CacheConfiguration">
<!-- Set a cache name. -->
<property name=3D<= /span>"name" value=3D"${cache.workflow-run.name}"/>

<!-- Set cache mode. -->
<property name=3D"ca= cheMode" value=3D= "REPLICATED"/>

= <!-- This is a trans= actional cache as many keys need to be updated together -->
<property name=3D"atomi= cityMode" value=3D"TRANSACTIONAL"/>

= <property name= =3D"backups" = value=3D"1"/>

<property name=3D
"statisticsEnabled" value=3D"tru= e"/>

<property name=3D"nodeF= ilter">
<bean class=3D"com.mediaiq.caps.platform.choreography.commons= .filter.DataNodeFilter"/>
= </property>
= </bean>
= <bean clas= s=3D"org.apache.ignite.co= nfiguration.CacheConfiguration">
= <!-- Set a cach= e name. -->
= <property = name=3D"name" value=3D"${cache.workflow-pause.<= wbr>name}"/>
<= /span>
<!-- Set cache mode. -->
<property name=3D"cacheMode" value=3D"PARTITIONED"/>

<= span style=3D"color:rgb(232,191,106)"> <property
name=3D"backups" value=3D"1"= ;/>

<property name=3D"statistics= Enabled" value=3D= "true"/>

= <property name=3D"nodeFilter"
>
<bean class=3D"com.= mediaiq.caps.platform.choreography.commons.filter.DataNodeFilter&= quot;/>
</property>
</bean> </list> </property> <!-- Explicitly configure TCP discovery SPI = to provide list of initial nodes. -->
<pr= operty name=3D"discoverySpi">
<bean clas= s=3D"org.apache.ignite.sp= i.discovery.tcp.TcpDiscoverySpi">
= <property name=3D<= /span>"ipFinder">
<!--
= Ignite provides several options for automatic discovery that can= be used
= instead os static IP based discovery. For information on all options= refer
= to our documentation: http://apacheignite.readme.io/docs/clu= ster-config
= -->
= <!-- Uncomment static IP finder to enable static-based discov= ery of initial nodes. -->
<!--<bean class=3D"org.apache.ignite.spi.= discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">--><= br> <bean class=3D&q= uot;org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDis= coveryMulticastIpFinder">
= <property name=3D<= /span>"addresses">
<list>
<!-- In distributed environment, replac= e with actual host IP address. -->
<value>127.0.0.1:47500..47509</value>
</list>
</property> </bea= n>

</property>
<= span style=3D"color:rgb(232,191,106)"> </bean>
<= span style=3D"color:rgb(232,191,106)"> </property>
<= span style=3D"color:rgb(232,191,106)"> </bean>
<bean parent=3D"i= gnite-data.cfg"/>
=
</beans>
All these caches are deployed in Data Node.

Now= after doing some operations I had populated data in workflowRunstateCache = which I verified in web console as well.

But when = I try to access the same cache from different server node , no data is avai= lable in that. In the following code I am trying to access workflowrunState= Cache from different server node , it shows me that containsKey as false an= d thows NullpointerException in debug mode when I do workflowRunStateCache.= get();
while (true) {
try (Transaction tx =3D ignite.transactions().txStart(TransactionConc= urrency.OPTIMISTIC, TransactionIsola= tion.SERIALIZABLE)) {
System.out.println(&q= uot;Conatins Key" + workflowRunStateIgniteCache.containsKe= y(updatedKeys.get(0)));
System.out.println(&qu= ot;Conatins Key" + workflowRunStateIgniteCache);
= Boolean flowProcessable =3D updatedKeys.stream()
= // check if there is at least o= ne event in each cache entry to be processed
.map(updatedKey -> workflowRunStateIgniteCache.get(upd= atedKey).getFlowRunEvents().size() > 0)
.reduce(true, (a, b) -= > a && b).booleanValue();<= br>
List<Event> inputEvents =3D null;

if (flowProcessable) {
inputEvents =3D updatedKeys
= .stream()
.map(updatedKey -> { try {=
retur= n workflowRunStateIgniteCache= .get(updatedKey).getFlowRunEvents().take();
= } catch <= /span>(InterruptedException e) {
e.printStac= kTrace();
}
= return null;
}).collect(Collect= ors.toList());
= }

tx.commit();

break;
} catch (TransactionOptimisticException e) {
// todo: emit a monitoring metric TRANSACTIONS_FAILED here
S= ystem.out.p= rintln("Transaction failed.= Retrying...");
}
}
System.out logs:
Conatins Keyfalse




--f403043b27b839a7c3056025c1d0--