我只想尝试并行地从Kafka接收流数据。这是我的密码:
val myKafkaStream = (1 to numReceivers.toInt).map { i =>
KafkaUtils.createStream(ssc, zkQuorum, group, topicMap)
}
我在Yarn上运行代码,numreceiver是5,代码确实有效。但问题是只有两个接收器接收数据。num executor是5,executor core是2
结果是:
KafkaReveiver-0 : 49637.95 event/sec
KafkaReveiver-1 : 0.0 event/sec
KafkaReveiver-2 : 0.0 event/sec
KafkaReveiver-3 : 49616.85 event/sec
KafkaReveiver-4 : 0.0 event/sec
暂无答案!
目前还没有任何答案,快来回答吧!