From the course: Distributed Databases with Apache Ignite

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Creating partitioned tables with affinity keys

Creating partitioned tables with affinity keys - Ignite Tutorial

From the course: Distributed Databases with Apache Ignite

Creating partitioned tables with affinity keys

- [Instructor] Now that we have a multi-node cluster setup and we have GridGain monitoring, let's head back to our db UI and use this to run a SQL query to create a partitioned table. Now, this is the same employee's table that we've set up before, but I use a cache configuration template to create the table. The cache template is specified using the width keyword. That's the last line of the query. Notice I say template equal to partitioned. A template is just a cache configuration class that is used to configure the properties of the cache that will be used to store this data. When we use the partition template, this indicates that the data for this table will be partitioned across multiple nodes of this cluster. Notice I've specified an affinity key that I've set to the department ID. This affinity key will be used by the affinity function to distribute the data across the nodes in our cluster. Objects with the same…

Contents