HCM

Happy Coding Monkey

使用Pyleus开发Storm应用

2015-01-23


Storm

Pyleus

遇到的坑

定义muti-stream时的语法

注意,当只有一个stream时,文档中定义muti-stream的语法有有问题,运行提交topoplogy时会报错

Topology submission exception. (topology name='top_name') #<InvalidTopologyException InvalidTopologyException(msg:Component: [my_bolt] subscribes from non-existent stream:
class MultipleBolt(Bolt):
    OUTPUT_FIELDS = {
        "stream-id": ["id", "value"],
        "stream-fake": ["fake"], ##只有一个stream时,记得加个假的,不然会出错
    }