监控storm 的 作业收发数据情况

通过这篇文章的介绍:

           http://tutorials.github.io/pages/retrieving-storm-data-from-nimbus.html#.UdPrdJyZvFA

写了一个简单的脚本,监控nimbus:

     cluster_info = nimbus.getClusterInfo()
        topology_id = None
        for topology in cluster_info.topologies:
                if topology.name == topology_name:
                        topology_id = topology.id
                        print topology_id

        topology_info = nimbus.getTopologyInfo(topology_id)


但是,出了一个这样的问题:

     Traceback (most recent call last):
  File "monitor.py", line 55, in ?
    stastic(nimbus_host, nimbus_port, topology_name, component_name)
  File "monitor.py", line 33, in stastic
    topology_info = nimbus.getTopologyInfo(topology_id)
  File "/home/q/storm/storm-0.8.1-wip9/src/gen-py/storm/Nimbus.py", line 505, in getTopologyInfo
    return self.recv_getTopologyInfo()
  File "/home/q/storm/storm-0.8.1-wip9/src/gen-py/storm/Nimbus.py", line 523, in recv_getTopologyInfo
    result.read(self._iprot)
  File "/home/q/storm/storm-0.8.1-wip9/src/gen-py/storm/Nimbus.py", line 2437, in read
    self.success.read(iprot)
  File "/home/q/storm/storm-0.8.1-wip9/src/gen-py/storm/ttypes.py", line 2626, in read
    _elem229.read(iprot)
  File "/home/q/storm/storm-0.8.1-wip9/src/gen-py/storm/ttypes.py", line 2502, in read
    self.stats.read(iprot)
  File "/home/q/storm/storm-0.8.1-wip9/src/gen-py/storm/ttypes.py", line 2293, in read
    self.specific.read(iprot)
  File "/home/q/storm/storm-0.8.1-wip9/src/gen-py/storm/ttypes.py", line 2182, in read
    self.bolt.read(iprot)
  File "/home/q/storm/storm-0.8.1-wip9/src/gen-py/storm/ttypes.py", line 1891, in read
    _val86[_key92] = _val93
TypeError: unhashable instance


到网上找了一些资料,发现

https://github.com/nathanmarz/storm/issues/539


但是尝试storm自带的py , 还是不好使.。

明天改成java试试

java版 已经放到github上:

https://github.com/JulySouthWind/storm-monitor-tools



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值