[
https://issues.apache.org/jira/browse/IGNITE-18140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yury Gerzhedovich updated IGNITE-18140:
---------------------------------------
Description:
h3. Motivation
[IEP-97|https://cwiki.apache.org/confluence/display/IGNITE/IEP-97%3A+Distribution+Zones]
introduces new concept of distribution zone along with some assumptions of a
corresponding manager that will provide an API to create, alter, and drop
zones. It's however an internal API and thus it's required to provide a public
one:
{code:java}
CREATE ZONE
{ database_name.schema_name.distribution_zone_name |
schema_name.distribution_zone_name | distribution_zone_name }
[WITH
[
<data_nodes_auto_adjust> |
DATA_NODES_FILTER = filter |
(<data_nodes_auto_adjust>, DATA_NODES_FILTER = filter)
],
[PARTITIONS = partitions],
[REPLICAS = replicas],
[AFFINITY_FUNCTION = function]
]
[;]
<data_nodes_auto_adjust> ::= [
DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value |
DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value |
(DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value &
DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value) | DATA_NODES_AUTO_ADJUST
= auto_adjust_value
]{code}
Few examples
{code:java}
Ex 1.1: CREATE ZONE zone1 WITH DATA_NODES_AUTO_ADJUST_SCALE_UP = 300,
PARTITIONS = 1024, REPLICAS = 3, AFFINITY_FUNCTION = rendezvous; // Scale up
only.
Ex 1.2: CREATE ZONE zone2 WITH DATA_NODES_AUTO_ADJUST_SCALE_UP = 300,
DATA_NODES_AUTO_ADJUST_SCALE_DOWN = 300; // Both scale up and scale down.
Default partitions count, replicas count and affinity function will be used.
Ex 1.3: CREATE ZONE zone2 WITH DATA_NODES_AUTO_ADJUST = 100; // Same value for
both scale up and scale down. Default partitions count, replicas count and
affinity function will be used.
Ex 1.4: CREATE ZONES zone 4 WITH DATA_NODES_FILTER= ‘(“US” || “EU”) && “SSD”’;
// Defail just node filters
{code}
And yes, similar syntax is expected for altering and dropping distribution
zones.
h3. Definition of Done
* It's possible to create/alter/drop distribution zones, meaning that
corresponding methods of distribution zone manager are called.
* Exceptions if any, e.g. validation ones are properly wrapped and returned
back to the user.
was:
h3. Motivation
[IEP-97|https://cwiki.apache.org/confluence/display/IGNITE/IEP-97%3A+Distribution+Zones]
introduces new concept of distribution zone along with some assumptions of a
corresponding [manager|https://issues.apache.org/jira/browse/IGNITE-18093] that
will provide an API to create, alter, and drop zones. It's however an internal
API and thus it's required to provide a public one:
{code:java}
CREATE ZONE
{ database_name.schema_name.distribution_zone_name |
schema_name.distribution_zone_name | distribution_zone_name }
[WITH
[
<data_nodes_auto_adjust> |
DATA_NODES_FILTER filter |
(<data_nodes_auto_adjust>, DATA_NODES_FILTER filter)
],
[PARTITIONS = partitions],
[REPLICAS = replicas],
[AFFINITY_FUNCTION = function]
]
[;]
<data_nodes_auto_adjust> ::= [
DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value |
DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value |
(DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value &
DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value) | DATA_NODES_AUTO_ADJUST
= auto_adjust_value
]{code}
Few examples
{code:java}
Ex 1.1: CREATE ZONE zone1 WITH DATA_NODES_AUTO_ADJUST_SCALE_UP = 300,
PARTITIONS = 1024, REPLICAS = 3, AFFINITY_FUNCTION = rendezvous; // Scale up
only.
Ex 1.2: CREATE ZONE zone2 WITH DATA_NODES_AUTO_ADJUST_SCALE_UP = 300,
DATA_NODES_AUTO_ADJUST_SCALE_DOWN = 300; // Both scale up and scale down.
Default partitions count, replicas count and affinity function will be used.
Ex 1.3: CREATE ZONE zone2 WITH DATA_NODES_AUTO_ADJUST = 100; // Same value for
both scale up and scale down. Default partitions count, replicas count and
affinity function will be used. {code}
And yes, similar syntax is expected for altering and dropping distribution
zones.
h3. Definition of Done
* It's possible to create/alter/drop distribution zones, meaning that
corresponding methods of distribution zone manager are called.
* Exceptions if any, e.g. validation ones are properly wrapped and returned
back to the user.
> Add ability to create, alter and drop distribution zones from within sql-like
> public API
> ----------------------------------------------------------------------------------------
>
> Key: IGNITE-18140
> URL: https://issues.apache.org/jira/browse/IGNITE-18140
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexander Lapin
> Priority: Major
> Labels: ignite-3
>
> h3. Motivation
> [IEP-97|https://cwiki.apache.org/confluence/display/IGNITE/IEP-97%3A+Distribution+Zones]
> introduces new concept of distribution zone along with some assumptions of a
> corresponding manager that will provide an API to create, alter, and drop
> zones. It's however an internal API and thus it's required to provide a
> public one:
> {code:java}
> CREATE ZONE
> { database_name.schema_name.distribution_zone_name |
> schema_name.distribution_zone_name | distribution_zone_name }
> [WITH
> [
> <data_nodes_auto_adjust> |
> DATA_NODES_FILTER = filter |
> (<data_nodes_auto_adjust>, DATA_NODES_FILTER = filter)
> ],
> [PARTITIONS = partitions],
> [REPLICAS = replicas],
> [AFFINITY_FUNCTION = function]
> ]
> [;]
>
> <data_nodes_auto_adjust> ::= [
> DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value |
> DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value |
> (DATA_NODES_AUTO_ADJUST_SCALE_UP = scale_up_value &
> DATA_NODES_AUTO_ADJUST_SCALE_DOWN = scale_down_value) |
> DATA_NODES_AUTO_ADJUST = auto_adjust_value
> ]{code}
> Few examples
> {code:java}
> Ex 1.1: CREATE ZONE zone1 WITH DATA_NODES_AUTO_ADJUST_SCALE_UP = 300,
> PARTITIONS = 1024, REPLICAS = 3, AFFINITY_FUNCTION = rendezvous; // Scale up
> only.
>
> Ex 1.2: CREATE ZONE zone2 WITH DATA_NODES_AUTO_ADJUST_SCALE_UP = 300,
> DATA_NODES_AUTO_ADJUST_SCALE_DOWN = 300; // Both scale up and scale down.
> Default partitions count, replicas count and affinity function will be used.
>
> Ex 1.3: CREATE ZONE zone2 WITH DATA_NODES_AUTO_ADJUST = 100; // Same value
> for both scale up and scale down. Default partitions count, replicas count
> and affinity function will be used.
> Ex 1.4: CREATE ZONES zone 4 WITH DATA_NODES_FILTER= ‘(“US” || “EU”) &&
> “SSD”’; // Defail just node filters
> {code}
> And yes, similar syntax is expected for altering and dropping distribution
> zones.
> h3. Definition of Done
> * It's possible to create/alter/drop distribution zones, meaning that
> corresponding methods of distribution zone manager are called.
> * Exceptions if any, e.g. validation ones are properly wrapped and returned
> back to the user.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)