我下面http://jayatiatblogs.blogspot.com/2011/11/storm-installation.html&http://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html#sc_zkMulitServerSetup设置Apache风暴在AWS EC2中的Ubuntu 14.04 LTS中的集群.
我的主节点是10.0.0.185.我的slave节点分别为10.0.0.79,10.0.0.124和10.0.0.84,其myid分别为1,2和3.我建立了一个由Apache Zookeeper组成的所有3个从属节点.
下面是我的slave.cfg我的slave节点:
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/home/ubuntu/zookeeper-data
clientPort=2181
server.1=10.0.0.79:2888:3888
server.2=10.0.0.124:2888:3888
server.3=10.0.0.84:2888:3888
autopurge.snapRetainCount=3
autopurge.purgeInterval=1
Run Code Online (Sandbox Code Playgroud)
下面是我对我的slave节点的storm.yaml :
########### These MUST be filled in for a storm configuration
storm.zookeeper.server:
- "10.0.0.79"
- "10.0.0.124"
- "10.0.0.84"
# - "localhost"
storm.zookeeper.port: 2181
# nimbus.host: "localhost"
nimbus.host: "10.0.0.185"
storm.local.dir: "/home/ubuntu/storm/data"
java.library.path: "/usr/lib/jvm/java-7-oracle"
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
- 6704
#
# worker.childopts: "-Xmx768m"
# nimbus.childopts: "-Xmx512m"
# supervisor.childopts: "-Xmx256m"
# …Run Code Online (Sandbox Code Playgroud) 是否有可能在Apache Storm中将不同的元组从1个喷口发送到不同的螺栓?例如,我有Spout A,需要将Buple B发送给Bolt C,将Tuple D发送给Bolt E.我应该如何使用Java中的spout实现它?我的意思是如何编写代码.
OutputCollector.emit(new Values(B, C))?
Run Code Online (Sandbox Code Playgroud) 螺栓是否可以从不同的喷口/螺栓接收多个输入元组?例如,Bolt C从Spout A接收输入元组,从Bolt B接收要处理的元组.我该如何实施呢?我的意思是编写Bolt C的Java代码及其拓扑.