Storm 탄성 계산: 실시 간 으로 토폴로지 병발 수 조정
Storm 계산 은 topology 단위 로 topology 를 Storm 클 러 스 터 에 제출 하여 실행 한 후 storm rebalance 명령 을 통 해 topology 를 동적 으로 조정 할 수 있 습 니 다.예 를 들 어 Topology 의 worker 수 를 늘 리 고 Bolt, Spout 의 병행 집행 수량 parallelism 등 을 수정 하여 토폴로지 의 동적 조정 을 실현 하고 탄력 적 인 계산 목적 을 달성 하 는 것 이다.(물론 조정 시 모니터링 모듈 에 맞 춰 야 한다)
storm help rebalance 를 통 해 rebalance 의 도움말 정 보 를 얻 을 수 있 습 니 다:
ligh@ubuntu:~/workspace/storm_drpc_test/bin$ storm help rebalance
Syntax: [storm rebalance topology-name [-w wait-time-secs] [-n new-num-workers] [-e component=parallelism]*]
Sometimes you may wish to spread out where the workers for a topology
are running. For example, let's say you have a 10 node cluster running
4 workers per node, and then let's say you add another 10 nodes to
the cluster. You may wish to have Storm spread out the workers for the
running topology so that each node runs 2 workers. One way to do this
is to kill the topology and resubmit it, but Storm provides a "rebalance"
command that provides an easier way to do this.
Rebalance will first deactivate the topology for the duration of the
message timeout (overridable with the -w flag) and then redistribute
the workers evenly around the cluster. The topology will then return to
its previous state of activation (so a deactivated topology will still
be deactivated and an activated topology will go back to being activated).
The rebalance command can also be used to change the parallelism of a running topology.
Use the -n and -e switches to change the number of workers or number of executors of a component
respectively.
기본적으로 주로 두 가지 용법 이 있다.
1) storm rebalance topology-name -n new-work-num,
지정 한 토폴로지 의 워 크 넘 을 조정 합 니 다.
2)storm rebalance topology-name -e component=parallelism
지정 한 토폴로지 에서 지정 한 component 의 병렬 수량 을 조정 합 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
storm Async loop died! & reconnect자세히 보기 storm이 슈퍼바이저가 리셋되었을 때 topology가 오류를 보고하여 모든 spout이 소비되지 않습니다. 로그 위에 대량의reconnection IP에 로그인하여 6703 포트에 두 개의 워커가 있...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.