kv_parallel_store_iterator()

#include <kvstore.h>

kv_error_tkv_parallel_store_iterator(kv_store_t *store,
          const kv_key_t *parent_key,
          kv_parallel_scan_iterator_t **return_parallel_scan_iterator,
          const kv_key_range_t *sub_range,kv_depth_enumdepth,kv_direction_enumdirection,
          int batch_size,
          kv_consistency_t *consistency,
          kv_timeout_t timeout_ms,kv_store_iterator_config_t *store_iterator_config) 

Creates a parallel scan iterator which iterates over all key/value pairs in unsorted order. The result is not transactional and the operation effectively provides read-committed isolation. The implementation batches the fetching of key/value pairs in the iterator, to minimize the number of network round trips, while not monopolizing the available bandwidth.

Parameters

  • store

    The store parameter is the handle to the store for which you want an iterator.

  • parent_key

    The parent_key parameter is the parent key whose "child" records are to be retrieved. May be NULL, or may have only a partial major key path.

  • return_parallel_scan_iterator

    The return_parallel_scan_iterator parameter references memory into which is copied the results set. Release the resources used by this iterator using kv_release_parallel_scan_iterator().

  • sub_range

    The sub_range parameter further restricts the range under the parent_key to the minor path components in this key range. It may be NULL.

    You construct a key range using kv_init_key_range().

  • depth

    The depth parameter specifies how deep the retrieval can go. You can allow only children to be retrieved, the parent and all the children, all descendants, and so forth. See kv_depth_enum for a description of all your depth options.

  • direction

    The direction parameter specifies the order in which records are returned by the iterator. Only kv_direction_enum.KV_DIRECTION_UNORDERED is supported by this function.

  • batch_size

    The batch_size parameter provides the suggested number of records to fetch during each network round trip. If only the first or last key/value pair is desired, passing a value of one (1) is recommended. If zero, an internally determined default is used.

  • consistency

    The consistency parameter identifies the consistency policy to use for this read operation. Consistency policies are created using kv_create_simple_consistency(),kv_create_time_consistency(), or kv_create_version_consistency().

  • timeout_ms

    The timeout_ms parameter provides an upper bound on the time interval for processing the operation. A best effort is made not to exceed the specified limit. If zero, the default request timeout is used. The default request timeout is set using kv_config_set_timeouts().

  • store_iterator_config

    The store_iterator_config parameter configures the parallel scan operation. Both the maximum number of requests and the maximum number of results batches can be specified using akv_store_iterator_config_t structure.