Database Reference
In-Depth Information
The gossiper tells 1.5 that it's in a leaving state. In this particular case, it didn't need to stream
data from 1.7 because it was already balanced, and then 1.5 is given the news: 1.7 is dead. If we
run nodetool -h <ip> ring at this point, our 1.7 node has indeed fallen off the list.
Meanwhile, in the server logs for the node we decommissioned, we see the following output:
INFO 13:37:36,299 InetAddress /192.168.1.5 is now UP
INFO 13:59:40,929 Leaving: sleeping 30000 for pending range setup
INFO 14:00:11,286 Leaving: streaming data to other nodes
INFO 14:00:11,318 Flushing memtables for Keyspace1...
INFO 14:00:11,318 Performing anticompaction ...
INFO 14:00:11,333 AntiCompacting [org.apache.cassandra.io.SSTableReader(path='c
:\var\lib\cassandra\data\Keyspace1\Standard2-2-Data.db'),org.apache.cassandra.io
.SSTableReader(path='c:\var\lib\cassandra\data\Keyspace1\Standard2-1-Data.db')]
INFO 14:00:11,349 AntiCompacting []
INFO 14:00:11,364 AntiCompacting []
INFO 14:00:11,411 Stream context metadata
INFO 14:00:11,427 Sending a stream initiate message to /192.168.1.5 ...
INFO 14:00:13,455 Shutting down MessageService...
INFO 14:00:13,455 Shutdown complete (no further commands will be processed)
INFO 14:00:13,470 Decommissioned
INFO 14:00:13,470 MessagingService shutting down server thread.
The node starts out aware of 1.5, then receives the decommission command. It enters the leav-
ing state and sleeps for 30 seconds to make sure it has enough time to gather all the necessary
range information. The memtables are flushed from memory to disk in the SSTables, and an anti-
compaction is performed on the data. It then initiates a stream to transfer its data to the 1.5 node
as necessary. Finally, it shuts down.
If you call decommission on a node that can't be decommissioned (i.e., one that isn't part of the
ring yet, or on the only node available), you'll see an error message to that effect. The basic steps
that are executed during a decommission are:
1. The gossiper is shut down so it doesn't receive more data.
2. The messaging service is shut down for this node.
3. The SEDA stage manager is shut down, because it won't accept more work to move
through a stage.
4. The mode is set to “decommissioned”.
5. The storage service determines what available nodes can receive data appropriate for the
ranges that need transferring. The data is streamed to other nodes.
6. Once the receiving node acknowledges successful transfer of the data and has no more to
transfer, the server can leave the ring.
Search WWH ::




Custom Search