You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Lapin (Jira)" <ji...@apache.org> on 2022/11/14 07:41:00 UTC

[jira] [Updated] (IGNITE-18140) Add ability to create alter and drop distribution zones from within sql-like public API.

     [ https://issues.apache.org/jira/browse/IGNITE-18140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Lapin 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|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
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)