decommission — 노드 축출(안전 제거)
decommission — 노드 축출(안전 제거)
nodetool decommission 명령은 내가 연결하고 있는 노드를 클러스터에서 축출(decommission)하는 명령이에요. 데이터는 다른 노드로 먼저 복제된 뒤 안전하게 제거돼요.
본문
decommission은 노드가 더 이상 데이터를 갖지 않을 때까지 해당 노드의 데이터를 스트리밍으로 옮긴 뒤 클러스터에서 빼내는 명령이에요. assassinate와 달리 재복제가 일어나므로 안전한 제거 절차예요. 기본적으로 -f/--force 없이는 복제본 수가 설정된 RF(replication factor)보다 줄어들게 되는 상황을 막아요. 아래는 완전한 사용법이에요.
NAME
nodetool decommission - Decommission the *node I am connecting to*
SYNOPSIS
nodetool [(-h <host> | --host <host>)] [(-p <port> | --port <port>)]
[(-pp | --print-port)] [(-pw <password> | --password <password>)]
[(-pwf <passwordFilePath> | --password-file <passwordFilePath>)]
[(-u <username> | --username <username>)] decommission [(-f | --force)]
OPTIONS
-f, --force
Force decommission of this node even when it reduces the number of
replicas to below configured RF
-h <host>, --host <host>
Node hostname or ip address
-p <port>, --port <port>
Remote jmx agent port number
-pp, --print-port
Operate in 4.0 mode with hosts disambiguated by port number
-pw <password>, --password <password>
Remote jmx agent password
-pwf <passwordFilePath>, --password-file <passwordFilePath>
Path to the JMX password file
-u <username>, --username <username>
Remote jmx agent username
decommission은 연결하고 있는 노드를 대상으로 해요. -f/--force는 이 노드를 축출했을 때 복제본 수가 설정된 RF보다 줄어들더라도 강제로 진행하는 옵션이라, 데이터 가용성이 떨어질 수 있다는 점을 반드시 고려하고 사용하세요.
더 알아보기 (Learn more)
- nodetool assassinate — 죽은 노드 강제 제거
- 토폴로지 변경 — 노드 추가·제거 절차