ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joseheitor <j...@heitorprojects.com>
Subject Re: Cluster High-Availability
Date Sat, 22 Dec 2018 22:59:01 GMT
Denis,

This is exactly what I am looking for - Thanks.

I am getting an error though, when attempting to create a table with my
defined cache-template. Please check my config below and kindly let me know
what I am missing...?

NODE CONFIG:

...
        <property name="cacheConfiguration">
            <list>
                <bean id="cache-template-bean" abstract="true"
class="org.apache.ignite.configuration.CacheConfiguration">
                    <property name="name" value="MULTI-AZ-PARTITIONED"/>
                    <property name="cacheMode" value="PARTITIONED" />
                    <property name="backups" value="1" />
                    <property name="atomicityMode"
value="TRANSACTIONAL_SNAPSHOT"/>
                    <property name="affinity">
                        <bean
class="org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction">
                            <property name="affinityBackupFilter">
                                <bean
class="org.apache.ignite.cache.affinity.rendezvous.ClusterNodeAttributeAffinityBackupFilter">
                                    <constructor-arg>
                                        <array
value-type="java.lang.String">
                                            
                                            <value>AVAILABILITY_ZONE</value>
                                        </array>
                                    </constructor-arg>
                                </bean>
                            </property>
                        </bean>
                    </property>
                </bean>
            </list>
        </property>
...

CREATE TABLE statement:

CREATE TABLE transactions (pk INT, id INT, k VARCHAR, v VARCHAR, PRIMARY KEY
(pk, id))
                    WITH "TEMPLATE=MULTI-AZ-PARTITIONED, AFFINITY_KEY=id"

Exception:

java.sql.SQLException: Cache doesn't exist: MULTI-AZ-PARTITIONED
	at
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
	at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
	at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475)
	at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)
	at
com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
	at
com.example.ignite.IgniteApplication.initSQLDatabase(IgniteApplication.java:75)
	at com.example.ignite.IgniteApplication.main(IgniteApplication.java:41)



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

Mime
View raw message