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

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

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

Kirill Tkalenko updated IGNITE-13345:
-------------------------------------
    Description: 
Summary of [http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSSION-Cache-warmup-td48582.html|Dev-list]:

# Adding a marker interface *org.apache.ignite.configuration.WarmUpConfiguratio*n;
# 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: *org.apache.ignite.internal.processors.cache.warmup.NoOpWarmUp*, *org.apache.ignite.internal.processors.cache.warmup.NoOpWarmUpConfiguration*
* Loading everything while there is RAM with priority to indexes: *org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUp*, *org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUpConfiguration*

# Add a command to "control.sh", to stop current warm-up and cancel all others: --warm-up stop

[1] - org.apache.ignite.internal.processors.cache.GridCacheProcessor.CacheRecoveryLifecycle#afterLogicalUpdatesApplied
[2] - org.apache.ignite.internal.processors.cache.GridCacheProcessor.CacheRecoveryLifecycle#restorePartitionStates

  was:
Summary of [http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSSION-Cache-warmup-td48582.html|Dev-list]:

# Adding a marker interface *org.apache.ignite.configuration.WarmUpConfiguratio*n;

# 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: *org.apache.ignite.internal.processors.cache.warmup.NoOpWarmUp*, *org.apache.ignite.internal.processors.cache.warmup.NoOpWarmUpConfiguration*
* Loading everything while there is RAM with priority to indexes: *org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUp*, *org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUpConfiguration*

# Add a command to "control.sh", to stop current warm-up and cancel all others: --warm-up stop

[1] - org.apache.ignite.internal.processors.cache.GridCacheProcessor.CacheRecoveryLifecycle#afterLogicalUpdatesApplied
[2] - org.apache.ignite.internal.processors.cache.GridCacheProcessor.CacheRecoveryLifecycle#restorePartitionStates


> Warming up node
> ---------------
>
>                 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
>             Fix For: 2.10
>
>
> Summary of [http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSSION-Cache-warmup-td48582.html|Dev-list]:
> # Adding a marker interface *org.apache.ignite.configuration.WarmUpConfiguratio*n;
> # 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: *org.apache.ignite.internal.processors.cache.warmup.NoOpWarmUp*, *org.apache.ignite.internal.processors.cache.warmup.NoOpWarmUpConfiguration*
> * Loading everything while there is RAM with priority to indexes: *org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUp*, *org.apache.ignite.internal.processors.cache.warmup.LoadAllWarmUpConfiguration*
> # Add a command to "control.sh", to stop current warm-up and cancel all others: --warm-up stop
> [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)