Moving nodes
nodetool move: move the target node to a given Token. Moving is both a convenience over and more efficient than decommission + bootstrap. After moving a node, nodetool cleanup should be run to remove any unnecessary data.
As with bootstrap, see Streaming for how to monitor progress.
Streaming :
Transfer
The following steps occur for Stream Transfers.
- Source has a list of ranges it must transfer to another node.
- Source copies the data in those ranges to sstable files in preparation for streaming. This is called anti-compaction (because compaction merges multiple sstable files into one, and this does the opposite).
- Source builds a list of PendingFile's which contains information on each sstable to be transfered.
- Source starts streaming the first file from the list, followed by the log "Waiting for transfer to $some_node to complete". The header for the stream contains information on the streamed file for the Destination to interpret what to do with the incoming stream.
- Destination receives the file writes it to disk and sends a FileStatus.
- On successful transfer the Source streams the next file until its done, on error it re-streams the same file.
Request
- Destination compiles a list of ranges it needs from another node.
- Destination sends a StreamRequestMessage to the Source node with the list of ranges.
- Source prepares the SSTables for those ranges and creates the PendingFile's.
- Source starts streaming the first file in the list. The header for the first stream contains info of the current stream and a list of the remaining PendingFile's that fall in the requested ranges.
- Destination receives the stream and writes it to disk, followed by the log message "Streaming added org.apache.cassandra.io.sstable.SSTableReader(path='/var/lib/cassandra/data/Keyspace1/Standard1-e-1-Data.db')".
- Destination then takes the lead and requests the remaining files one at a time. If an error occurs it re-requests the same file, if not continues with the next file until done.
- Source streams each of the requested files. The files are already anti-compacted, so it just streams them to the Destination.
This comment has been removed by a blog administrator.
ReplyDelete