How to add a new cache type to a existing cache?

classic Classic list List threaded Threaded
4 messages Options
kcheng.mvp kcheng.mvp
Reply | Threaded
Open this post in threaded view
|

How to add a new cache type to a existing cache?


my cache is created via (cache name is 'abc')
==============================
igniteSpringBean.getOrCreateCache(cfg)
==============================

and the indexedType is [Long.class, Person.class, Long.class, Student.class]


keep the server node running, and issue command  from `sqlline.sh`

============================================
CREATE TABLE IF NOT EXISTS Person (
  id int,
  city_id int,
  name varchar,
  age int,
  company varchar,
  PRIMARY KEY (id, city_id)
) WITH "template=partitioned,backups=1,cache_name=abc, key_type=PersonKey,
value_type=MyPerson";
============================================

after the command executed, I can not see  the new table 'PERSON' in schema
'abc',

if I remove `cache_name=abc ` then I can see a new table `PERSON` is created
in `PUBLIC` schema.


is there any way to add new new key/value cache to a existing cache?




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
kcheng.mvp kcheng.mvp
Reply | Threaded
Open this post in threaded view
|

Re: How to add a new cache type to a existing cache?

from the command line there is a error messasge


Error: CREATE TABLE can only be executed on PUBLIC schema.
(state=50000,code=0)


just want to know is there anyway to add the new type/table to my existing
schema?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
kcheng.mvp kcheng.mvp
Reply | Threaded
Open this post in threaded view
|

Re: How to add a new cache type to a existing cache?

In reply to this post by kcheng.mvp
from the command line there is a error messasge


Error: CREATE TABLE can only be executed on PUBLIC schema.
(state=50000,code=0)


just want to know is there anyway to add the new type/table to my existing
schema?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
ilya.kasnacheev ilya.kasnacheev
Reply | Threaded
Open this post in threaded view
|

Re: How to add a new cache type to a existing cache?

In reply to this post by kcheng.mvp
Hello!

In Apache Ignite, once cache is created most of its configuration settings cannot be changed.

There is slight deviation from this rule when we consider ALTER TABLE or CREATE INDEX command, but I don't think you can add new indexed types.

Regards,
--
Ilya Kasnacheev


пт, 9 нояб. 2018 г. в 13:00, kcheng.mvp <[hidden email]>:

my cache is created via (cache name is 'abc')
==============================
igniteSpringBean.getOrCreateCache(cfg)
==============================

and the indexedType is [Long.class, Person.class, Long.class, Student.class]


keep the server node running, and issue command  from `sqlline.sh`

============================================
CREATE TABLE IF NOT EXISTS Person (
  id int,
  city_id int,
  name varchar,
  age int,
  company varchar,
  PRIMARY KEY (id, city_id)
) WITH "template=partitioned,backups=1,cache_name=abc, key_type=PersonKey,
value_type=MyPerson";
============================================

after the command executed, I can not see  the new table 'PERSON' in schema
'abc',

if I remove `cache_name=abc ` then I can see a new table `PERSON` is created
in `PUBLIC` schema.


is there any way to add new new key/value cache to a existing cache?




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