14장. Cruise Control을 사용하여 주제 복제 요소 수정


복제 요소를 포함하여 주제 구성을 수정하기 위해 Cruise Control REST API의 /topic_configuration 엔드포인트에 요청합니다.

사전 요구 사항

프로세스

  1. Cruise Control Server를 시작합니다. 서버는 기본적으로 포트 9092에서 시작합니다. 선택적으로 다른 포트를 지정합니다.

    cd /opt/cruise-control/
    ./kafka-cruise-control-start.sh config/cruisecontrol.properties <port_number>
  2. Cruise Control이 실행 중인지 확인하려면 Cruise Control 서버의 /state 엔드포인트에 GET 요청을 보냅니다.

    curl -X GET 'http://<cc_host>:<cc_port>/kafkacruisecontrol/state'
  3. bin/kafka-topics.sh 명령을 --describe 옵션으로 실행하고 대상 항목의 현재 복제 요소를 확인합니다.

    /opt/kafka/bin/kafka-topics.sh \
      --bootstrap-server localhost:9092 \
      --topic <topic_name> \
      --describe
  4. 항목의 복제 요소를 업데이트합니다.

    curl -X POST 'http://<cc_host>:<cc_port>/kafkacruisecontrol/topic_configuration?topic=<topic_name>&replication_factor=<new_replication_factor>&dryrun=false'

    예를 들어 curl -X POST 'localhost:90/kafkacruisecontrol/topic_configuration?topic=topic1&replication_factor=3&dryrun=false'.

  5. 이전과 같이 --describe 옵션을 사용하여 bin/kafka-topics.sh 명령을 실행하여 주제 변경 결과를 확인합니다.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동