nodetool getendpoints — 키를 소유한 엔드포인트 조회

nodetool getendpoints — 키를 소유한 엔드포인트 조회

getendpoints 명령은 특정 파티션 키를 소유한 엔드포인트(노드)들을 조회하는 nodetool 명령이에요. 어떤 노드가 특정 키의 데이터를 보관하는지 확인할 때 씁니다.

출처: nodetool getendpoints

본문

이 명령은 키스페이스, 테이블, 파티션 키를 입력받아 해당 키를 소유하는 엔드포인트 목록을 출력해요. 복제로 인해 여러 노드가 같은 키를 가질 수 있으므로 결과가 여러 개일 수 있어요.

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

NAME
        nodetool getendpoints - Print the end points that owns the key
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>)] getendpoints [--] <keyspace>
                <table> <key>
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
        <keyspace> <table> <key>
            The keyspace, the table, and the partition key for which we need to
            find the endpoint

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

  • -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> <key> — 엔드포인트를 찾으려는 키스페이스, 테이블, 파티션 키를 지정해요.

더 알아보기