You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "kcheng.mvp" <kc...@gmail.com> on 2018/11/09 10:00:07 UTC

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/

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

Posted by "kcheng.mvp" <kc...@gmail.com>.
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/

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

Posted by "kcheng.mvp" <kc...@gmail.com>.
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/

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

Posted by Ilya Kasnacheev <il...@gmail.com>.
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 <kc...@gmail.com>:

>
> 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/
>