Question

How is the source SortedKeyValueIterator set for iterators? In many iterators I see an initialization ( init ) method and source.get* methods but I don't see concrete implementations of these methods. Is there a base iterator that all of these iterators are implemented on top of that I am not seeing?

Was it helpful?

Solution

The whole iterator stack is constructed on the tablet server (TServer).

At the bottom of the stack, are the built-in system iterators that read your data, merged from memory/files. Just on top of that are system iterators that implement access control and pruning of delete markers. At the top, are all your user iterators, ordered by the priority you set in your per-table and/or scan configuration.

The init method is called by the TServer during the construction of this stack of iterators, and it handles passing the one iterator on to the init method of the next in the stack.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top