我刚刚学习了storm,并测试了来自这里的这里示例代码。它使用setDebug(true)来启用调试日志记录。
但我对以下调试信息感到困惑:
13867 [storm.starter.WordCountTopology.main()] INFO backtype.storm.daemon.nimbus -
Setting new assignment for topology id word-count-1-1403745226:
#backtype.storm.daemon.common.Assignment{:master-code-dir "/tmp/4ef1358b-92ce-4051-a4ce-
b33a25ace66d/nimbus/stormdist/word-count-1-1403745226", :node->host {"47fdd74b-65e0-4650-
a000-f1f0418dd7c7" "ms-VirtualBox"}, :executor->node+port {[2 2] ["47fdd74b-65e0-4650-a000-
f1f0418dd7c7" 1027], [3 3] ["47fdd74b-65e0-4650-a000-f1f0418dd7c7" 1027], [4 4] ["47fdd74b-
65e0-4650-a000-f1f0418dd7c7" 1027], [5 5] ["47fdd74b-65e0-4650-a000-f1f0418dd7c7" 1027], [6
6] ["47fdd74b-65e0-4650-a000-f1f0418dd7c7" 1027], [7 7] ["47fdd74b-65e0-4650-a000-
f1f0418dd7c7" 1027], [8 8] ["47fdd74b-65e0-4650-a000-f1f0418dd7c7" 1027], [9 9] ["47fdd74b-
65e0-4650-a000-f1f0418dd7c7" 1027], [10 10] ["47fdd74b-65e0-4650-a000-f1f0418dd7c7" 1027],
[1 1] ["47fdd74b-65e0-4650-a000-f1f0418dd7c7" 1027]}, :executor->start-time-secs {[2 2]
1403745226, [3 3] 1403745226, [4 4] 1403745226, [5 5] 1403745226, [6 6] 1403745226, [7 7]
1403745226, [8 8] 1403745226, [9 9] 1403745226, [10 10] 1403745226, [1 1] 1403745226}}
...
14547 [Thread-6] INFO backtype.storm.daemon.supervisor - Launching worker with
assignment #backtype.storm.daemon.supervisor.LocalAssignment{:storm-id "word-count-1-
1403745226", :executors ([2 2] [3 3] [4 4] [5 5] [6 6] [7 7] [8 8] [9 9] [10 10] [1 1])} for
this supervisor 47fdd74b-65e0-4650-a000-f1f0418dd7c7 on port 1027 with id 80043f34-85af-
4862-840e-99a58b1cf1f5
...
16140 [Thread-6] INFO backtype.storm.daemon.executor - Loading executor count:[2 2]
16153 [Thread-6] INFO backtype.storm.daemon.task - Emitting: count __system ["startup"]
16155 [Thread-6] INFO backtype.storm.daemon.executor - Loaded executor tasks count:[2
2]
16182 [Thread-6] INFO backtype.storm.daemon.executor - Finished loading executor count:[2 2]
16186 [Thread-8-count] INFO backtype.storm.daemon.executor - Preparing bolt count:(2)
16198 [Thread-6] INFO backtype.storm.daemon.executor - Loading executor count:[3 3]
16198 [Thread-6] INFO backtype.storm.daemon.task - Emitting: count __system ["startup"]
16198 [Thread-6] INFO backtype.storm.daemon.executor - Loaded executor tasks count:[3
3]
16206 [Thread-8-count] INFO backtype.storm.daemon.executor - Prepared bolt count:(2)
16213 [Thread-6] INFO backtype.storm.daemon.executor - Finished loading executor count:
[3 3]
16217 [Thread-10-count] INFO backtype.storm.daemon.executor - Preparing bolt count:(3)
16221 [Thread-10-count] INFO backtype.storm.daemon.executor - Prepared bolt count:(3)[1 1],[2 2] .卑劣?谁能给我详细解释一下。非常感谢。
发布于 2014-06-26 15:20:35
谢谢你的评论,我在那里发现了一些有用的东西。
在深入研究了component、node、worker、executor、task等概念之后,我知道[1 1]的含义。
首先
:node->host {"47fdd74b-65e0-4650-a000-f1f0418dd7c7" "ms-VirtualBox"}这意味着这里只有一个节点。节点id为47fdd74b-65e0-4650-a000-f1f0418dd7c7,响应于主机ms-VirtualBox。
第二点
:executor->node+port {[2 2] ["47fdd74b-65e0-4650-a000-f1f0418dd7c7" 1027],
...执行器是一个线程,运行喷口/螺栓实例,上面的句子显示执行者在哪里。2是执行器id,它响应节点47fdd74b-65e0-4650-a000-f1f0418dd7c7的1027端口。
由于WordCountTopology有代码片段conf.setMaxTaskParallelism(3);,并且有3个喷口/螺栓,因此喷管/螺栓的最大执行器数为9(从[2 2]到[10 10])。(在本例中,一个任务响应于一个执行器)此外,生成了另一个执行器([1 1]),称为acker,它将跟踪元组树并检测喷管元组何时已被完全处理。因此,总共有10个执行者,从[1 1]到[10 10]。
https://stackoverflow.com/questions/24421652
复制相似问题