You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Welly Tambunan <if...@gmail.com> on 2015/12/23 08:22:14 UTC

Behaviour on Partition when Node is down

Hi All,

I'm just trying a scenario in my local machine using IDE on put get the
value from cache.

First i run a single node for writing the value into cache. With this
configuration.

val cacheConfig = new CacheConfiguration[SeriesKey, TimeSeries]("time-series")
cacheConfig.setCacheMode(CacheMode.PARTITIONED)
cacheConfig.setIndexedTypes(classOf[SeriesKey], classOf[TimeSeries])

val cfg = new IgniteConfiguration()
cfg.setCacheConfiguration(cacheConfig)


I insert 10 values into the cache. After that i run the second node
that read the data from cache. It's run fine for the first time. It
return ALL the values.

But after i stop the second node and try to get all values, some value
is missing.

My guess that when the second node starting at the first time, it
rebalance the data. Then second node offline and destroy some of the
data.


However how can this happen as i have already set my CacheMode as
PARTITIONED. I suppose that it will stay on first node ?


Any explanation will be really appreciated.

Cheers
-- 
Welly Tambunan
Triplelands

http://weltam.wordpress.com
http://www.triplelands.com <http://www.triplelands.com/blog/>

Re: Behaviour on Partition when Node is down

Posted by Welly Tambunan <if...@gmail.com>.
Hi Denis,

Thanks a lot. This works great !

Cheers

On Wed, Dec 23, 2015 at 2:32 PM, Denis Magda <dm...@gridgain.com> wrote:

> He Welly,
>
> By default number of backups is equal to 0.
> Change this default value using CacheConfiguration.setBackups(...) methods.
>
> After that everything should work fine in your scenario.
>
> Regards,
> Denis
>
>
> On 12/23/2015 10:22 AM, Welly Tambunan wrote:
>
> Hi All,
>
> I'm just trying a scenario in my local machine using IDE on put get the
> value from cache.
>
> First i run a single node for writing the value into cache. With this
> configuration.
>
> val cacheConfig = new CacheConfiguration[SeriesKey, TimeSeries]("time-series")
> cacheConfig.setCacheMode(CacheMode.PARTITIONED)
> cacheConfig.setIndexedTypes(classOf[SeriesKey], classOf[TimeSeries])
> val cfg = new IgniteConfiguration()
> cfg.setCacheConfiguration(cacheConfig)
>
> I insert 10 values into the cache. After that i run the second node that read the data from cache. It's run fine for the first time. It return ALL the values.
>
> But after i stop the second node and try to get all values, some value is missing.
>
> My guess that when the second node starting at the first time, it rebalance the data. Then second node offline and destroy some of the data.
>
>  However how can this happen as i have already set my CacheMode as PARTITIONED. I suppose that it will stay on first node ?
>
>  Any explanation will be really appreciated.
>
> Cheers
> --
> Welly Tambunan
> Triplelands
>
> http://weltam.wordpress.com
> http://www.triplelands.com <http://www.triplelands.com/blog/>
>
>
>


-- 
Welly Tambunan
Triplelands

http://weltam.wordpress.com
http://www.triplelands.com <http://www.triplelands.com/blog/>

Re: Behaviour on Partition when Node is down

Posted by Denis Magda <dm...@gridgain.com>.
He Welly,

By default number of backups is equal to 0.
Change this default value using CacheConfiguration.setBackups(...) methods.

After that everything should work fine in your scenario.

Regards,
Denis

On 12/23/2015 10:22 AM, Welly Tambunan wrote:
> Hi All,
>
> I'm just trying a scenario in my local machine using IDE on put get 
> the value from cache.
>
> First i run a single node for writing the value into cache. With this 
> configuration.
>
> val cacheConfig =new CacheConfiguration[SeriesKey, TimeSeries]("time-series")
> cacheConfig.setCacheMode(CacheMode.PARTITIONED)
> cacheConfig.setIndexedTypes(classOf[SeriesKey],classOf[TimeSeries])
>
> val cfg =new IgniteConfiguration()
> cfg.setCacheConfiguration(cacheConfig)
> I insert 10 values into the cache. After that i run the second node 
> that read the data from cache. It's run fine for the first time. It 
> return ALL the values.
> But after i stop the second node and try to get all values, some value 
> is missing.
> My guess that when the second node starting at the first time, it 
> rebalance the data. Then second node offline and destroy some of the 
> data.
> However how can this happen as i have already set my CacheMode as 
> PARTITIONED. I suppose that it will stay on first node ?
> Any explanation will be really appreciated.
> Cheers
> -- 
> Welly Tambunan
> Triplelands
>
> http://weltam.wordpress.com
> http://www.triplelands.com <http://www.triplelands.com/blog/>