How to update Ignite config in Production Environment

classic Classic list List threaded Threaded
5 messages Options
zpp zpp
Reply | Threaded
Open this post in threaded view
|

How to update Ignite config in Production Environment

 Hi,I have some questions about using Ignite in the  production environment.

1、I have 3 Ignite nodes as Server,My Java application uses Ignite as client.
     Now,I just use Ignite as JCache implements.

     When I want to update the Cache config,like adding indexs,What's the best way to do it?

     I don't want to lost data in the server,So,I replace server@1's config,then restart it.I must wait data rebalancing finish.Then I do the same to the server@2 and so on!

     I want to do it automatic.But How can I get the rebalancing finishing event in Linux console?
And Is it the only way to update the config If I don't want to lose the cache data?



2、If the server config is different,which one is valid?Is it the last started one?

     Today,I restarted Ignite server by mistake.I used old config to restart one node in the Clusters.
    The scenes is:
    server@1  -- old config  --restart
    server@2  -- old config
    server@3  -- new config

    server@1 and server@2 are using old config,server@3 is using new config.
  I restart server@1 by mistake.


 Then My application appeard 
"Cannot find metadata for object with compact footer: 1236746791"  exception.

 The server occured exceptions too,and the cache couldn't use anymore.

 Finally,I killed all the application used Ignite client,then update all the Ignite config  and restart all the Ignite Server.


I don't know why I must kill all the Ignite client so I can restart the Ignite server  correctly.








Alexei Scherbakov Alexei Scherbakov
Reply | Threaded
Open this post in threaded view
|

Re: How to update Ignite config in Production Environment

Hi,

1. You can destroy cache (IgniteCache.destroy) and recreate it dynamically with new configuration.
Data must be backed up somethere(on example in the other cache) until the process is finished.
Don't forget to update Ignite's startup configurations on all server nodes or you will lose changes on restart.

2. Ignite validates cluster configuration on the node join. If configuration of the node is not compatible with the current
it not will not be allowed to join topology.

2016-05-30 15:45 GMT+03:00 张鹏鹏 <[hidden email]>:
 Hi,I have some questions about using Ignite in the  production environment.

1、I have 3 Ignite nodes as Server,My Java application uses Ignite as client.
     Now,I just use Ignite as JCache implements.

     When I want to update the Cache config,like adding indexs,What's the best way to do it?

     I don't want to lost data in the server,So,I replace server@1's config,then restart it.I must wait data rebalancing finish.Then I do the same to the server@2 and so on!

     I want to do it automatic.But How can I get the rebalancing finishing event in Linux console?
And Is it the only way to update the config If I don't want to lose the cache data?



2、If the server config is different,which one is valid?Is it the last started one?

     Today,I restarted Ignite server by mistake.I used old config to restart one node in the Clusters.
    The scenes is:
    server@1  -- old config  --restart
    server@2  -- old config
    server@3  -- new config

    server@1 and server@2 are using old config,server@3 is using new config.
  I restart server@1 by mistake.


 Then My application appeard 
"Cannot find metadata for object with compact footer: 1236746791"  exception.

 The server occured exceptions too,and the cache couldn't use anymore.

 Finally,I killed all the application used Ignite client,then update all the Ignite config  and restart all the Ignite Server.


I don't know why I must kill all the Ignite client so I can restart the Ignite server  correctly.











--

Best regards,
Alexei Scherbakov
zpp zpp
Reply | Threaded
Open this post in threaded view
|

Re: How to update Ignite config in Production Environment

Do you mean I need a separate program to manage the cache?How can I backed up data to other topology node?Where can I find an example?


Thanks 

2016-05-30 22:28 GMT+08:00 Alexei Scherbakov <[hidden email]>:
Hi,

1. You can destroy cache (IgniteCache.destroy) and recreate it dynamically with new configuration.
Data must be backed up somethere(on example in the other cache) until the process is finished.
Don't forget to update Ignite's startup configurations on all server nodes or you will lose changes on restart.

2. Ignite validates cluster configuration on the node join. If configuration of the node is not compatible with the current
it not will not be allowed to join topology.

2016-05-30 15:45 GMT+03:00 张鹏鹏 <[hidden email]>:
 Hi,I have some questions about using Ignite in the  production environment.

1、I have 3 Ignite nodes as Server,My Java application uses Ignite as client.
     Now,I just use Ignite as JCache implements.

     When I want to update the Cache config,like adding indexs,What's the best way to do it?

     I don't want to lost data in the server,So,I replace server@1's config,then restart it.I must wait data rebalancing finish.Then I do the same to the server@2 and so on!

     I want to do it automatic.But How can I get the rebalancing finishing event in Linux console?
And Is it the only way to update the config If I don't want to lose the cache data?



2、If the server config is different,which one is valid?Is it the last started one?

     Today,I restarted Ignite server by mistake.I used old config to restart one node in the Clusters.
    The scenes is:
    server@1  -- old config  --restart
    server@2  -- old config
    server@3  -- new config

    server@1 and server@2 are using old config,server@3 is using new config.
  I restart server@1 by mistake.


 Then My application appeard 
"Cannot find metadata for object with compact footer: 1236746791"  exception.

 The server occured exceptions too,and the cache couldn't use anymore.

 Finally,I killed all the application used Ignite client,then update all the Ignite config  and restart all the Ignite Server.


I don't know why I must kill all the Ignite client so I can restart the Ignite server  correctly.











--

Best regards,
Alexei Scherbakov

Alexei Scherbakov Alexei Scherbakov
Reply | Threaded
Open this post in threaded view
|

Re: How to update Ignite config in Production Environment

1. Yes, for open source Ignite version I see no other way.
2. Use node predicate [1] [2] to create cache on desired node.
After that make the simple program reading from the first cache and writing to the second.
You can instead do backup on disk or into database first.

3. I don't know if such example exists. 

[1] CacheConfiguration<Object, Object> cfg = new CacheConfiguration<>();
     cfg.setNodeFilter(predicate);
     ....
    // start cache dynamically



2016-05-30 18:25 GMT+03:00 张鹏鹏 <[hidden email]>:
Do you mean I need a separate program to manage the cache?How can I backed up data to other topology node?Where can I find an example?


Thanks 

2016-05-30 22:28 GMT+08:00 Alexei Scherbakov <[hidden email]>:
Hi,

1. You can destroy cache (IgniteCache.destroy) and recreate it dynamically with new configuration.
Data must be backed up somethere(on example in the other cache) until the process is finished.
Don't forget to update Ignite's startup configurations on all server nodes or you will lose changes on restart.

2. Ignite validates cluster configuration on the node join. If configuration of the node is not compatible with the current
it not will not be allowed to join topology.

2016-05-30 15:45 GMT+03:00 张鹏鹏 <[hidden email]>:
 Hi,I have some questions about using Ignite in the  production environment.

1、I have 3 Ignite nodes as Server,My Java application uses Ignite as client.
     Now,I just use Ignite as JCache implements.

     When I want to update the Cache config,like adding indexs,What's the best way to do it?

     I don't want to lost data in the server,So,I replace server@1's config,then restart it.I must wait data rebalancing finish.Then I do the same to the server@2 and so on!

     I want to do it automatic.But How can I get the rebalancing finishing event in Linux console?
And Is it the only way to update the config If I don't want to lose the cache data?



2、If the server config is different,which one is valid?Is it the last started one?

     Today,I restarted Ignite server by mistake.I used old config to restart one node in the Clusters.
    The scenes is:
    server@1  -- old config  --restart
    server@2  -- old config
    server@3  -- new config

    server@1 and server@2 are using old config,server@3 is using new config.
  I restart server@1 by mistake.


 Then My application appeard 
"Cannot find metadata for object with compact footer: 1236746791"  exception.

 The server occured exceptions too,and the cache couldn't use anymore.

 Finally,I killed all the application used Ignite client,then update all the Ignite config  and restart all the Ignite Server.


I don't know why I must kill all the Ignite client so I can restart the Ignite server  correctly.











--

Best regards,
Alexei Scherbakov




--

Best regards,
Alexei Scherbakov
zpp zpp
Reply | Threaded
Open this post in threaded view
|

Re: How to update Ignite config in Production Environment

Thank you ! I will try this.

2016-05-31 0:34 GMT+08:00 Alexei Scherbakov <[hidden email]>:
1. Yes, for open source Ignite version I see no other way.
2. Use node predicate [1] [2] to create cache on desired node.
After that make the simple program reading from the first cache and writing to the second.
You can instead do backup on disk or into database first.

3. I don't know if such example exists. 

[1] CacheConfiguration<Object, Object> cfg = new CacheConfiguration<>();
     cfg.setNodeFilter(predicate);
     ....
    // start cache dynamically



2016-05-30 18:25 GMT+03:00 张鹏鹏 <[hidden email]>:
Do you mean I need a separate program to manage the cache?How can I backed up data to other topology node?Where can I find an example?


Thanks 

2016-05-30 22:28 GMT+08:00 Alexei Scherbakov <[hidden email]>:
Hi,

1. You can destroy cache (IgniteCache.destroy) and recreate it dynamically with new configuration.
Data must be backed up somethere(on example in the other cache) until the process is finished.
Don't forget to update Ignite's startup configurations on all server nodes or you will lose changes on restart.

2. Ignite validates cluster configuration on the node join. If configuration of the node is not compatible with the current
it not will not be allowed to join topology.

2016-05-30 15:45 GMT+03:00 张鹏鹏 <[hidden email]>:
 Hi,I have some questions about using Ignite in the  production environment.

1、I have 3 Ignite nodes as Server,My Java application uses Ignite as client.
     Now,I just use Ignite as JCache implements.

     When I want to update the Cache config,like adding indexs,What's the best way to do it?

     I don't want to lost data in the server,So,I replace server@1's config,then restart it.I must wait data rebalancing finish.Then I do the same to the server@2 and so on!

     I want to do it automatic.But How can I get the rebalancing finishing event in Linux console?
And Is it the only way to update the config If I don't want to lose the cache data?



2、If the server config is different,which one is valid?Is it the last started one?

     Today,I restarted Ignite server by mistake.I used old config to restart one node in the Clusters.
    The scenes is:
    server@1  -- old config  --restart
    server@2  -- old config
    server@3  -- new config

    server@1 and server@2 are using old config,server@3 is using new config.
  I restart server@1 by mistake.


 Then My application appeard 
"Cannot find metadata for object with compact footer: 1236746791"  exception.

 The server occured exceptions too,and the cache couldn't use anymore.

 Finally,I killed all the application used Ignite client,then update all the Ignite config  and restart all the Ignite Server.


I don't know why I must kill all the Ignite client so I can restart the Ignite server  correctly.











--

Best regards,
Alexei Scherbakov




--

Best regards,
Alexei Scherbakov