ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Isaksen <thomas.isak...@sysco.no>
Subject Exception when connecting to cache / table.
Date Mon, 08 Jan 2018 13:32:15 GMT
I have created my first TABLE in Ignite and I am trying to connect to it but I am getting this
error message:

class org.apache.ignite.IgniteException: Cache configuration mismatch (local cache was created
via Ignite API, while remote cache was created via CREATE TABLE

I'm not exactly sure what this means.

My table def:

CREATE TABLE IF NOT EXISTS TestTable
(
       username VARCHAR,
       password VARCHAR,
       PRIMARY KEY (username, password)
)
WITH "template=partitioned,backups=1,cache_name=testCache";

My connect code:

Ignition.setClientMode(true);

CacheConfiguration myCacheConfiguration = new CacheConfiguration("testCache");
myCacheConfiguration.setCacheMode(CacheMode.PARTITIONED);
myCacheConfiguration.setBackups(1);
//
IgniteConfiguration igniteConfig = new IgniteConfiguration();
igniteConfig.setMetricsLogFrequency(0);
igniteConfig.setCacheConfiguration(myCacheConfiguration);
igniteConfig.setPeerClassLoadingEnabled(true);

Ignite ignite = Ignition.getOrStart(igniteConfig);
IgniteCache<String, String> cache = ignite.getOrCreateCache(myCacheConfiguration);
...


--
Thomas Isaksen

Mime
View raw message