0

In a baseline cluster of 8 nodes, we have data in the partitioned template without backup. Assume I have avg 28K entries in all 8 nodes in SampleTable(@Cache). Total data = 28K*8 = 224K entries.

CREATE TABLE SampleTable(....) WITH "template=partitioned"

Now I want to shut down one node and before shutting down I want to move data from 8th Node to other nodes so approx 32K (32K*7=224K) entries to 7 nodes. Can I move data from any node to other nodes?

How can I move all the data from one node to other nodes (cluster) before shutting down that node? Keeping the data balanced and distributed in rest 7 nodes.

I created the table (SampleTable) using create statement and inserted data using insert statement (using JDBC connection).

Persistence is enabled.

rai2048
  • 27
  • 1
  • 6

2 Answers2

1

I think that the most straightforward way is using backups. Anyway, if you need to avoid data loss, using backups (or/and persistence) is a must.

As a simple workaround you can try the following steps:

  1. You can scan local data on the node, which you want to shut down, using ScanQuery and store the data in a database.
  2. After that, shut down the node and exclude it from baseline.
  3. Upload data from a database.
sk0x50
  • 409
  • 2
  • 11
0

The approach described below will work only if there are backups configured in a cluster (> 0).

To remove a node from Baseline Topology and rebalance data between rest 7 nodes you are able to use Cluster Activation Tool:

  1. Stop the node you want to remove from topology.

  2. Wait until the node is stopped. Message Ignite node stopped OK should appear in logs.

  3. Check that node is offline:

$IGNITE_HOME/bin/control.sh --baseline

Cluster state: active
Current topology version: 8

Baseline nodes:
ConsistentID=<node1_id>, STATE=ONLINE
ConsistentID=<node2_id>, STATE=ONLINE
...
ConsistentID=<node8_id>, STATE=OFFLINE
--------------------------------------------------------------------------------
Number of baseline nodes: 8

Other nodes not found.
  1. Remove the node from baseline topology:

$IGNITE_HOME/bin/control.sh --baseline remove <node8_id>

  • If you don't have the backup enabled you will lose the data when you stop any node and remove from baseline. "Stop the node you want to remove from topology." is using ignitevisorcmd.sh utility. – rai2048 Apr 21 '18 at 21:04
  • @rai2048, you are right. Sorry, I missed information about the backups number. This will work only if there are backups configured in a cluster. – Roman Guseinov Apr 23 '18 at 01:21