java - 有状态迭代器 Java

标签 java hadoop iterator

什么是有状态迭代器?

这个问题与 Hadoop 中定义的用于执行连接的迭代器有关。作为引用documentation状态:

This defines an interface to a stateful Iterator that can replay elements added to it directly. Note that this does not extend Iterator.

“直接添加回放元素”是什么意思?这个迭代器与普通迭代器有何不同?

最佳答案

以下是有关有状态迭代器的更多信息:

http://en.wikipedia.org/wiki/Iterator (查看生成器)

这里还有一些进一步的信息:

http://www.itmaybeahack.com/book/python-2.6/html/p02/p02c08_generators.html

终于到了:

http://www.devdaily.com/java/jwarehouse/trove-1.1b3/src/gnu/trove/TIntIntIterator.java.shtml

As the iteration is stateful, access to the key/value parts of the current map entry happens in constant time.

希望这对您有所帮助。

关于java - 有状态迭代器 Java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9957977/

相关文章:

hadoop - 何时使用 Hadoop、HBase、Hive 和 Pig?

iterator - 我该如何编写一个迭代器来返回对自身的引用?

c++ - 使用迭代器提取字符串

c++ - 确定字符串是否仅包含字母数字字符(或空格)

java - 独立加速发生器

java - 如何获取向导页面中的所有字段?

java - 搜索文本文件

java - Android FirebaseRecyclerView 实现搜索用户功能时遇到的问题

hadoop - 在 Hadoop 中使用 HBase 而不是 Hive 的目的

hadoop - 如果数据不是本地的,任务跟踪器如何从另一个节点获取 map task 的数据?