apache-zookeeper - Storm nimbus 如何从 worker 那里得到 ACK?它使用动物园管理员吗?

标签 apache-zookeeper apache-storm

如何运作?他们是否使用zookeeper来实现这一点?将ACK保存在znode内? 我正在尝试使用zookeeper构建一个分布式系统,我需要从集群中的各个机器获得确认,200k ack/秒。

是否可以使用zookeeper来做到这一点?

最佳答案

Storm 不使用 Zookeeper 来确认元组,也不将确认发送到 nimbus。它们被直接发送到 spout。

来自guaranteeing message processing页面:

A Storm topology has a set of special "acker" tasks that track the DAG of tuples for every spout tuple. When an acker sees that a DAG is complete, it sends a message to the spout task that created the spout tuple to ack the message.

您需要重写 spout 中的 ack 方法:

@Override
public void ack(Object id) {
    int number = (Integer)id;
    System.out.println(String.format("Spout ack -> %d", number));
}

关于apache-zookeeper - Storm nimbus 如何从 worker 那里得到 ACK?它使用动物园管理员吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27508375/

相关文章:

hadoop - Apache Kafka和Apache Hadoop是否应该共享同一个ZooKeeper实例?

尝试连接到 HBase 时出现 java.lang.NumberFormatException

java - 什么是 zookeeper 端口及其用途?

solr - 将 Zookeeper 与 Solr 一起使用,但只有 2 台服务器

hbase -/hbase 的 ConnectionLoss + 对等方重置的连接?

java - 两部分 : How to run 'ls' from a java program and how to tell computers on a storm cluster to execute specific commands

java - Zookeeper集群设置

java - Storm Trident中的批处理大小

java - Storm 拓扑事务和数据库事务

java - Apache Storm - 如何在生产集群中排除 Maven 中的storm jar