如何在BaseRichBolt实现中获取当前拓扑的名称?我看到我可以TopologyContext从prepare()调用中访问stormConfig Map和,但是如何从这两个中获取运行拓扑的名称并不明显。
您可以从config地图上获取。
使用config.get(Config.TOPOLOGY_NAME)
http://nathanmarz.github.io/storm/doc/backtype/storm/Config.html#TOPOLOGY_NAME
@ComputerDruid感谢您的纠正
| 归档时间: |
|
| 查看次数: |
1032 次 |
| 最近记录: |