An interface for writing and merging inverted chunks of postings_data for a disk_index.
More...
#include <chunk_handler.h>
|
using | index_pdata_type = typename Index::index_pdata_type |
|
using | primary_key_type = typename index_pdata_type::primary_key_type |
|
using | secondary_key_type = typename index_pdata_type::secondary_key_type |
|
using | chunk_t = chunk< primary_key_type, secondary_key_type > |
|
|
void | write_chunk (std::vector< index_pdata_type > &pdata) |
|
|
std::string | prefix_ |
| The prefix for all chunks to be written.
|
|
std::atomic< uint32_t > | chunk_num_ {0} |
| The current chunk number.
|
|
std::priority_queue< chunk_t > | chunks_ |
| Queue of chunks on disk that need to be merged */.
|
|
std::mutex | mutables_ |
| Mutex used for protecting the chunk queue.
|
|
util::optional< uint64_t > | unique_primary_keys_ |
| Number of unique primary keys encountered while merging.
|
|
template<class Index>
class meta::index::chunk_handler< Index >
An interface for writing and merging inverted chunks of postings_data for a disk_index.
Constructs a chunk_handler that writes to the given prefix.
- Parameters
-
prefix | The prefix for all chunks to be written |
Creates a producer for this chunk_handler.
Producers are designed to be thread-local buffers of chunks that write to disk when their buffer is full.
- Returns
- a new producer
- Returns
- the number of chunks this handler has written to disk.
- Returns
- the size, in bytes, of the last chunk written to disk after merging.
- Returns
- the number of unique primary keys seen while merging chunks.
- Parameters
-
pdata | The collection of postings_data objects to combine into a chunk |
The documentation for this class was generated from the following files: