Set the partitions when create table in the code

classic Classic list List threaded Threaded
3 messages Options
codeboyyong codeboyyong
Reply | Threaded
Open this post in threaded view
|

Set the partitions when create table in the code

Hi Dear ignite friends
I have a uniq use case here . I have to create a table in a big ignite
cluster and since the columns and table name are dynamically generated. I
can not config the cache config in the xml.
So I use the SQL to create the table .
The thing is , seems there is no way to config the partition numbers for the
table. The default value 1024 is quite small and not suit on our use case.

Can some one pls let me know if there is a solution for this ?
Please note that I can not configure the cache config in the xml, because
the table columns and names are generated on runtime.

Thank You



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

RE: Set the partitions when create table in the code

Have you tried a cache template [1]?

 

After you designed your custom affinity function, you can configure it for a new cache template.

You could use it with the CREATE TABLE statement [2].

Please, note, that a template should be registered in advance.

 

[1] - https://apacheignite.readme.io/docs/cache-template

[2] - https://apacheignite-sql.readme.io/docs/create-table#section-parameters

 

From: [hidden email]
Sent: Friday, November 15, 2019 1:29 AM
To: [hidden email]
Subject: Set the partitions when create table in the code

 

Hi Dear ignite friends

I have a uniq use case here . I have to create a table in a big ignite

cluster and since the columns and table name are dynamically generated. I

can not config the cache config in the xml.

So I use the SQL to create the table .

The thing is , seems there is no way to config the partition numbers for the

table. The default value 1024 is quite small and not suit on our use case.

 

Can some one pls let me know if there is a solution for this ?

Please note that I can not configure the cache config in the xml, because

the table columns and names are generated on runtime.

 

Thank You

 

 

 

--

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

 

Alex Shapkin
codeboyyong codeboyyong
Reply | Threaded
Open this post in threaded view
|

RE: Set the partitions when create table in the code

Hi Alexandr,
Thanks for the fast reply. After I use the template in the create table sql
statement, It works, I can set the partition numbers through affinity
property .
Thanks so much for you help. Really appreciate it .

Yong



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