ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Jiao <jeffjiaoyim...@gmail.com>
Subject Re: when client node connect to server node, server node throws NotSerializableException
Date Wed, 01 Nov 2017 01:52:17 GMT
Hi Andrew,

Thanks a lot for all the replies.

yes BoConverter implements Serializable, or Ignite will throw
The "Class" here is actually for hibernate to get data from DB:
org.hibernate.Session.get(Class clazz, Serializable id).
After getting the data, BoConverter converts the data to a BinaryObject and
then put into Ignite.

What do you mean by "is the class present on all nodes"?
if I have a server node which has config like below, then I want to have a
client node to connect to it, do i need to add cacheStore config to client
node config too? can you show me what a suggested client node config should
look like under this situation? Thanks~

<bean id="igniteConfig"
	<property name="peerClassLoadingEnabled" value="false" />
	<property name="clientMode" value="false" />
	<property name="gridLogger">
		<bean class="org.apache.ignite.logger.slf4j.Slf4jLogger" />
	<property name="cacheConfiguration">
			<ref bean="cache1" />

<bean id="cache1"
	<property name="name" value="igniteTestCache" />
	<property name="cacheMode" value="PARTITIONED" />
	<property name="backups" value="0" />
	<property name="atomicityMode" value="ATOMIC" />
	<property name="statisticsEnabled" value="true" />
	<property name="managementEnabled" value="true" />
	<property name="readThrough" value="true" />
	<property name="writeThrough" value="true" />
	<property name="storeKeepBinary" value="true" />
	<property name="cacheStoreFactory">
		<bean class="com.pingan.pilot.cache.impl.ignite.PIgniteCacheStoreFactory">
			<property name="converter" ref="boConverter" />
			<property name="valueClass">
				<bean class="java.lang.Class" factory-method="forName">
						value="com.pingan.pilot.ignite.test.bo.otw.IgniteTestBO_OTW" />
	<property name="queryEntities">
			<bean class="org.apache.ignite.cache.QueryEntity">
				<property name="keyType" value="java.lang.String" />
				<property name="valueType" value="IPIgniteTestBOImmutable" />
				<property name="fields">
						<entry key="intf" value="java.lang.Integer" />
						<entry key="longf" value="java.lang.Long" />
						<entry key="doublef" value="java.lang.Double" />
						<entry key="stringf" value="java.lang.String" />
						<entry key="floatf" value="java.lang.Float" />
						<entry key="bo" value="java.util.Array" />
				<property name="indexes">
						<bean class="org.apache.ignite.cache.QueryIndex">
							<constructor-arg value="intf" />
						<bean class="org.apache.ignite.cache.QueryIndex">
							<constructor-arg value="longf" />
						<bean class="org.apache.ignite.cache.QueryIndex">
							<constructor-arg value="doublef" />
						<bean class="org.apache.ignite.cache.QueryIndex">
							<constructor-arg value="stringf" />
						<bean class="org.apache.ignite.cache.QueryIndex">
							<constructor-arg value="floatf" />

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

View raw message