assassinate — 죽은 노드 강제 제거
assassinate — 죽은 노드 강제 제거
nodetool assassinate 명령은 클러스터에서 죽은 노드를 데이터 재복제 없이 강제로 제거할 때 쓰는 명령이에요. 이 명령은 일반적인 제거 절차와 달리 위험한 마지막 수단이니, removenode 같은 정상 수단을 쓸 수 없을 때만 사용하세요.
본문
assassinate는 죽은 노드의 남은 데이터를 재복제(re-replicate)하지 않고 즉시 클러스터에서 내보내는 명령이에요. 이름 그대로 "제거"가 아니라 강제 퇴출이라, 토큰 이동이 일어나지 않고 해당 노드가 소유하던 데이터 범위는 그대로 남아 다른 노드에 복제본이 존재해야 안전해요. 아래는 완전한 사용법이에요.
NAME
nodetool assassinate - Forcefully remove a dead node without
re-replicating any data. Use as a last resort if you cannot removenode
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>)] assassinate [--] <ip_address>
OPTIONS
-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
--
This option can be used to separate command-line options from the
list of argument, (useful when arguments might be mistaken for
command-line options
<ip_address>
IP address of the endpoint to assassinate
여기서 주목할 점은 <ip_address>가 필수라는 거예요. 살해(assassinate)할 대상 노드의 IP 주소를 인자로 넘기고, 다양한 JMX 연결 옵션(-h, -p, -u, -pw, -pwf)으로 대상 노드의 JMX 에이전트에 접속해요. 재복제가 없으므로 이 명령을 실행한 뒤에는 반드시 해당 노드의 데이터가 다른 복제본에 안전하게 존재하는지 확인하세요.
더 알아보기 (Learn more)
- nodetool decommission — 노드 축출(복제 완료 후 안전 제거)
- nodetool removenode — 노드 정상 제거