天天看点

Storm之LocalCluster.clj

       此类初始化了一些配置参数,实现了ilocalcluster接口,将拓扑结构提交到nimbus,最终通过nimbus来执行

其中最重要的看

gen-class中定义了init的函数名为”init”,继承了ilocalcluster接口

下面看init函数:

定义了3种init函数

无参数 设置了topology-enable-message-timeouts,返回ret作为state

string 和 long 两个参数,分别制定zookeeper的host和port,返回ret作为state

java中的map,直接返回,将map当做state