nodetool scrub — 테이블 스크럽
nodetool scrub — 테이블 스크럽
scrub 명령은 하나 이상의 테이블에 대해 스크럽(scrub, SSTable 재구축)을 수행하는 nodetool 명령이에요. 손상된 SSTable을 복구할 때 씁니다.
출처: nodetool scrub
본문
이 명령은 지정한 테이블의 SSTable을 스크럽해요. 손상된 SSTable을 다시 빌드해 복구합니다. 기본값으로 스크럽 전에 스냅샷을 먼저 만들며, -ns 옵션으로 건너뛸 수 있어요.
원문의 사용법은 다음과 같습니다.
NAME
nodetool scrub - Scrub (rebuild sstables for) one or more tables
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>)] scrub
[(-j <jobs> | --jobs <jobs>)] [(-n | --no-validate)]
[(-ns | --no-snapshot)] [(-r | --reinsert-overflowed-ttl)]
[(-s | --skip-corrupted)] [--] [<keyspace> <tables>...]
OPTIONS
-h <host>, --host <host>
Node hostname or ip address
-j <jobs>, --jobs <jobs>
Number of sstables to scrub simultanously, set to 0 to use all
available compaction threads
-n, --no-validate
Do not validate columns using column validator
-ns, --no-snapshot
Scrubbed CFs will be snapshotted first, if disableSnapshot is false.
(default false)
-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
-r, --reinsert-overflowed-ttl
Rewrites rows with overflowed expiration date affected by
CASSANDRA-14092 with the maximum supported expiration date of
2038-01-19T03:14:06+00:00. The rows are rewritten with the original
timestamp incremented by one millisecond to override/supersede any
potential tombstone that may have been generated during compaction
of the affected rows.
-s, --skip-corrupted
Skip corrupted partitions even when scrubbing counter tables.
(default false)
-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
[<keyspace> <tables>...]
The keyspace followed by one or many tables
옵션과 인자를 하나씩 살펴볼게요.
-j <jobs>, --jobs <jobs>— 동시에 스크럽할 SSTable 수예요.0으로 설정하면 사용 가능한 모든 컴팩션 스레드를 사용해요.-n, --no-validate— 컬럼 검증기로 컬럼을 검증하지 않아요.-ns, --no-snapshot—disableSnapshot이 false일 때 스크럽되는 CF가 먼저 스냅샷되는데, 이 옵션으로 건너뛰어요 (기본 false).-r, --reinsert-overflowed-ttl— CASSANDRA-14092의 영향을 받아 만료일이 넘친 행을 최대 지원 만료일인2038-01-19T03:14:06+00:00으로 다시 써요. 원래 타임스탬프에 1ms를 더해 재작성하며, 이는 해당 행의 컴팩션 중 생성될 수 있는 툼스톤을 덮어쓰기/대체하기 위함이에요.-s, --skip-corrupted— 카운터 테이블을 스크럽할 때도 손상된 파티션을 건너뛰어요 (기본 false).-h <host>, --host <host>— 대상 노드의 호스트명 또는 IP 주소를 지정해요.-p <port>, --port <port>— 원격 JMX 에이전트 포트 번호를 지정해요.-pp, --print-port— 호스트를 포트 번호로 구분하는 4.0 모드로 동작해요.-pw <password>, --password <password>— 원격 JMX 에이전트 비밀번호를 지정해요.-pwf <passwordFilePath>, --password-file <passwordFilePath>— JMX 비밀번호 파일의 경로를 지정해요.-u <username>, --username <username>— 원격 JMX 에이전트 사용자 이름을 지정해요.--— 명령줄 옵션과 인자 목록을 구분할 때 써요.[<keyspace> <tables>...]— 스크럽할 키스페이스와 하나 이상의 테이블을 지정해요. 생략하면 전체를 대상으로 해요.
더 알아보기
- nodetool verify — SSTable 검증
- nodetool garbagecollect — 삭제된 데이터 제거