nodetool import — SSTable 가져오기

nodetool import — SSTable 가져오기

import 명령은 새 SSTable을 시스템으로 가져오는 nodetool 명령이에요. 외부에서 준비한 SSTable 파일을 노드에 로드할 때 씁니다.

출처: nodetool import

본문

이 명령은 지정한 디렉터리의 SSTable을 키스페이스/테이블로 가져와요. 기본적으로 소스에서 파일을 옮기며, -cd 옵션을 쓰면 복사합니다. 검증 관련 옵션도 지원해요.

원문의 사용법은 다음과 같습니다.

NAME
        nodetool import - Import new SSTables to the system
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>)] import
                [(-c | --no-invalidate-caches)] [(-cd | --copy-data)]
                [(-e | --extended-verify)] [(-l | --keep-level)] [(-q | --quick)]
                [(-r | --keep-repaired)] [(-t | --no-tokens)] [(-v | --no-verify)] [--]
                <keyspace> <table> <directory> ...
OPTIONS
        -c, --no-invalidate-caches
            Don't invalidate the row cache when importing
        -cd, --copy-data
            Copy data from source directories instead of moving them
        -e, --extended-verify
            Run an extended verify, verifying all values in the new sstables
        -h <host>, --host <host>
            Node hostname or ip address
        -l, --keep-level
            Keep the level on the new sstables
        -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
        -q, --quick
            Do a quick import without verifying sstables, clearing row cache or
            checking in which data directory to put the file
        -r, --keep-repaired
            Keep any repaired information from the sstables
        -t, --no-tokens
            Don't verify that all tokens in the new sstable are owned by the
            current node
        -u <username>, --username <username>
            Remote jmx agent username
        -v, --no-verify
            Don't verify new sstables
        --
            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> <table> <directory> ...
            The keyspace, table name and directories to import sstables from

옵션과 인자를 하나씩 살펴볼게요.

  • -c, --no-invalidate-caches — 가져올 때 행 캐시를 무효화하지 않아요.
  • -cd, --copy-data — 소스 디렉터리에서 이동하는 대신 데이터를 복사해요.
  • -e, --extended-verify — 새 SSTable의 모든 값을 검증하는 확장 검증을 실행해요.
  • -l, --keep-level — 새 SSTable의 레벨 정보를 유지해요.
  • -q, --quick — SSTable 검증, 행 캐시 정리, 데이터 디렉터리 확인을 하지 않는 빠른 가져오기를 수행해요.
  • -r, --keep-repaired — SSTable의 복구(repaired) 정보를 유지해요.
  • -t, --no-tokens — 새 SSTable의 모든 토큰이 현재 노드가 소유하는지 검증하지 않아요.
  • -v, --no-verify — 새 SSTable을 검증하지 않아요.
  • -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> <table> <directory> ... — SSTable을 가져올 키스페이스, 테이블 이름과 소스 디렉터리를 지정해요.

더 알아보기