18 #ifndef FOEDUS_STORAGE_PARTITIONER_HPP_
19 #define FOEDUS_STORAGE_PARTITIONER_HPP_
279 #endif // FOEDUS_STORAGE_PARTITIONER_HPP_
Packages handling of 4-bytes representation of position in log buffers.
uint32_t * written_count_
[OUT] how many logs written to output_buffer.
uint32_t shortest_key_length_
[masstree/hash] shortest key length in the log entries.
friend std::ostream & operator<<(std::ostream &o, const Partitioner &v)
PartitionId * results_
[OUT] this method will set the partition of logs[i] to results[i].
const snapshot::LogBuffer & log_buffer_
Converts from positions to physical pointers.
thread::ThreadGroupId PartitionId
As partition=NUMA node, this is just a synonym of foedus::thread::ThreadGroupId.
void sort_batch(const SortBatchArguments &args)
Called from log reducer to sort log entries by keys.
uint32_t logs_count_
number of entries to process.
memory::AlignedMemory * work_memory_
Working memory to be used in this method.
Epoch base_epoch_
All log entries in this inputs are assured to be after this epoch.
Definitions of IDs in this package and a few related constant values.
Typedefs of ID types used in snapshot package.
uint32_t StorageId
Unique ID for storage.
void initialize(bool recursive=false)
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
uint32_t logs_count_
number of entries to process.
uint32_t BufferPosition
Represents a position in some buffer.
Forward declarations of classes in root package.
Brings error stacktrace information as return value of functions.
Holds a set of read-only file objects for snapshot files.
Forward declarations of classes in cache package.
A mutex that can be placed in shared memory and used from multiple processes.
StorageType get_storage_type() const
snapshot::BufferPosition * output_buffer_
sorted results are written to this variable.
Partitioner(Engine *engine, StorageId id)
Instantiate an instance for the given storage.
#define CXX11_FINAL
Used in public headers in place of "final" of C++11.
Database engine object that holds all resources and provides APIs.
const snapshot::BufferPosition * log_positions_
positions of log records.
Auto-lock scope object for SharedMutex.
StorageId get_storage_id() const
uint32_t longest_key_length_
[masstree/hash] longest key length in the log entries.
Attachable Resources on Shared Memory.
Forward declarations of classes in memory package.
StorageType
Type of the storage, such as hash.
bool is_partitionable()
returns if this storage is partitionable.
#define CXX11_FUNC_DELETE
Used in public headers in place of " = delete" of C++11.
Represents one memory block aligned to actual OS/hardware pages.
void partition_batch(const PartitionBatchArguments &args)
Identifies the partition of each log record in a batched fashion.
memory::AlignedMemory * work_memory_
Working memory to be used in this method.
Partitioning and sorting logic for one storage.
bool is_valid() const
whether this object is ready for partitioning.
Arguments for sort_batch()
const snapshot::BufferPosition * log_positions_
positions of log records.
ErrorStack design_partition(const DesignPartitionArguments &args)
Determines partitioning scheme for this storage.
const snapshot::LogBuffer & log_buffer_
Converts from positions to physical pointers.
cache::SnapshotFileSet * snapshot_files_
ErrorCode
Enum of error codes defined in error_code.xmacro.
Arguments for design_partition()
const PartitionerMetadata & get_metadata() const
Returns tiny metadata of the partitioner in shared memory.
PartitionId local_partition_
The node the caller (mapper) resides in.
Arguments for partition_batch()