You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maxim Muzafarov (Jira)" <ji...@apache.org> on 2020/11/10 12:50:00 UTC

[jira] [Updated] (IGNITE-13345) Warming up strategy

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

Maxim Muzafarov updated IGNITE-13345:
-------------------------------------
    Labels: IEP-40 important  (was: IEP-40)

> Warming up strategy
> -------------------
>
>                 Key: IGNITE-13345
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13345
>             Project: Ignite
>          Issue Type: New Feature
>            Reporter: Kirill Tkalenko
>            Assignee: Kirill Tkalenko
>            Priority: Major
>              Labels: IEP-40, important
>             Fix For: 2.10
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Summary of [Dev-list|http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSSION-Cache-warmup-td48582.html]
> # Adding a marker interface *org.apache.ignite.configuration.WarmUpConfiguration*;
> # Adding a configuration to
> ## *org.apache.ignite.configuration.DataRegionConfiguration#setWarmUpConfiguration*
> ## *org.apache.ignite.configuration.DataStorageConfiguration#setDefaultWarmUpConfiguration*
> # Add an internal warm-up interface that will start in [1] after [2] (after recovery);
> {code:java}
> package org.apache.ignite.internal.processors.cache.warmup;
> import org.apache.ignite.IgniteCheckedException;
> import org.apache.ignite.configuration.WarmUpConfiguration;
> import org.apache.ignite.internal.GridKernalContext;
> import org.apache.ignite.internal.processors.cache.persistence.DataRegion;
> /**
>  * Interface for warming up.
>  */
> public interface WarmUpStrategy<T extends WarmUpConfiguration> {
>     /**
>      * Returns configuration class for mapping to strategy.
>      *
>      * @return Configuration class.
>      */
>     Class<T> configClass();
>     /**
>      * Warm up.
>      *
>      * @param kernalCtx Kernal context.
>      * @param cfg       Warm-up configuration.
>      * @param region    Data region.
>      * @throws IgniteCheckedException if faild.
>      */
>     void warmUp(GridKernalContext kernalCtx, T cfg, DataRegion region) throws IgniteCheckedException;
>     /**
>      * Closing warm up.
>      *
>      * @throws IgniteCheckedException if faild.
>      */
>     void close() throws IgniteCheckedException;
> }
> {code}
> # Adding an internal plugin extension for add own strategies;
> {code:java}
> package org.apache.ignite.internal.processors.cache.warmup;
>  
> import java.util.Collection;
> import org.apache.ignite.plugin.Extension;
>  
> /**
>  * Interface for getting warm-up strategies from plugins.
>  */
> public interface WarmUpStrategySupplier extends Extension {
>     /**
>      * Getting warm-up strategies.
>      *
>      * @return Warm-up strategies.
>      */
>     Collection<WarmUpStrategy> strategies();
> }
> {code}
> # Adding strategies:
> ## Without implementation, for the possibility of disabling the warm-up: NoOP
> ## Loading everything while there is RAM with priority to indexes: LoadAll
> # Add a command to "control.sh", to stop current warm-up and cancel all others: --warm-up stop in IGNITE-13362
> [1] - org.apache.ignite.internal.processors.cache.GridCacheProcessor.CacheRecoveryLifecycle#afterLogicalUpdatesApplied
> [2] - org.apache.ignite.internal.processors.cache.GridCacheProcessor.CacheRecoveryLifecycle#restorePartitionStates



--
This message was sent by Atlassian Jira
(v8.3.4#803005)