[ 
https://issues.apache.org/jira/browse/IGNITE-13345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180994#comment-17180994
 ] 

Kirill Tkalenko commented on IGNITE-13345:
------------------------------------------

[~akalashnikov] I made edits by comments, waiting for a new visa.

> 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
>             Fix For: 2.10
>
>          Time Spent: 0.5h
>  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)

Reply via email to