ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rick_tem <rvinc...@temenos.com>
Subject Why is custom cacheStore.write() being called in clientMode?
Date Thu, 01 Jun 2017 11:40:30 GMT
Hello,

I have a written a cache store and started it up on one node and call
loadCache() and the output is shown below.

public class IgniteXMLClobCacheStoreimplements CacheStore<String, String> { 

}

IgniteXMLClobCacheStore::loadCache Loading: LAYOUT
IgniteXMLClobCacheStore::loadCache Loading: RISK
IgniteXMLClobCacheStore::loadCache Loading: TOP_ACCOUNT
IgniteXMLClobCacheStore::loadCache finished loading. Now listening...
[11:27:14] Topology snapshot [ver=2, servers=1, clients=1, CPUs=4,
heap=1.3GB]

I start another in client mode (see above topology snapshot), in this case
loadCache() is not called (as expected), however write() is called.  I
eventually get a null pointer as something isn't initialized when I call
loadCache.  In the stack trace below it looks like it is treating it as a
nearCache.  Shouldn't write() be called on my server node and not my client? 
If I am doing something wrong, how then would I then initialize something as
this object is created by Ignite and I can't pass it via loadCache() since
it isn't called in client mode.  ie,

				<bean class="org.apache.ignite.configuration.CacheConfiguration">
					<property name="name" value="TablesXMLClobWriteThrough" />
					<property name="cacheStoreFactory">
						<bean class="javax.cache.configuration.FactoryBuilder"
							factory-method="factoryOf">
							<constructor-arg
							
value="com.temenos.tafj.cache.impl.IgniteXMLClobCacheStore"></constructor-arg>
						</bean>
					</property>
 

[ERROR] 2017-06-01 11:27:42,652 [sys-stripe-3-#4%TemenosGrid%] CACHE -
IgniteXMLClobCacheStore::Error in write with Key: BLA*RANK
java.lang.NullPointerException: null
	at
com.temenos.tafj.cache.impl.IgniteXMLClobCacheStore.write(IgniteXMLClobCacheStore.java:451)
[TAFJCache.jar:18.1.0-SNAPSHOT]
	at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.put(GridCacheStoreManagerAdapter.java:568)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.store.GridCacheStoreManagerAdapter.putAll(GridCacheStoreManagerAdapter.java:609)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxAdapter.batchStoreCommit(IgniteTxAdapter.java:1326)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxLocalAdapter.userCommit(IgniteTxLocalAdapter.java:500)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal.localFinish(GridNearTxLocal.java:3021)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxFinishFuture.finish(GridNearTxFinishFuture.java:405)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$16.apply(GridNearTxLocal.java:3171)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal$16.apply(GridNearTxLocal.java:3163)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:382)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.unblock(GridFutureAdapter.java:346)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.unblockAll(GridFutureAdapter.java:334)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:494)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.GridCacheCompoundFuture.onDone(GridCacheCompoundFuture.java:56)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:473)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.onComplete(GridNearOptimisticTxPrepareFuture.java:295)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.onDone(GridNearOptimisticTxPrepareFuture.java:273)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.onDone(GridNearOptimisticTxPrepareFuture.java:72)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:450)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridCompoundFuture.checkComplete(GridCompoundFuture.java:278)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridCompoundFuture.apply(GridCompoundFuture.java:148)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridCompoundFuture.apply(GridCompoundFuture.java:45)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.notifyListener(GridFutureAdapter.java:382)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.unblock(GridFutureAdapter.java:346)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.unblockAll(GridFutureAdapter.java:334)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:494)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:473)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.future.GridFutureAdapter.onDone(GridFutureAdapter.java:450)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture$MiniFuture.onResult(GridNearOptimisticTxPrepareFuture.java:935)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.distributed.near.GridNearOptimisticTxPrepareFuture.onResult(GridNearOptimisticTxPrepareFuture.java:183)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.processNearTxPrepareResponse(IgniteTxHandler.java:555)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler.access$100(IgniteTxHandler.java:95)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler$2.apply(IgniteTxHandler.java:147)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.transactions.IgniteTxHandler$2.apply(IgniteTxHandler.java:145)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:863)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:386)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:308)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:100)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:253)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1257)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:885)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.managers.communication.GridIoManager.access$2100(GridIoManager.java:114)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.managers.communication.GridIoManager$7.run(GridIoManager.java:802)
[ignite-core-2.0.0.jar:2.0.0]
	at
org.apache.ignite.internal.util.StripedExecutor$Stripe.run(StripedExecutor.java:483)
[ignite-core-2.0.0.jar:2.0.0]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]





--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Why-is-custom-cacheStore-write-being-called-in-clientMode-tp13309.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message