Class ChunkWriteOperation
Defined in File data.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public gkfs::data::ChunkOperation< ChunkWriteOperation >
(Template Class ChunkOperation)
Class Documentation
-
class gkfs::data::ChunkWriteOperation : public gkfs::data::ChunkOperation<ChunkWriteOperation>
Chunk operation class for write operations with one object per write RPC request. May involve multiple I/O task depending on the number of chunks involved.
Public Functions
-
ChunkWriteOperation(const std::string &path, size_t n)
-
~ChunkWriteOperation() = default
-
void write_nonblock(size_t idx, uint64_t chunk_id, const char *bulk_buf_ptr, size_t size, off64_t offset)
Write request called by RPC handler function and launches a non-blocking tasklet.
- Parameters
idx – Number of non-blocking write for write RPC request
chunk_id – The affected chunk id
bulk_buf_ptr – The buffer to write for the chunk
size – Size to write for chunk
offset – Offset for individual chunk
- Throws
-
std::pair<int, size_t> wait_for_tasks()
Wait for all write tasklets to finish.
- Returns
Pair for error code for success (0) or failure and written size
Private Functions
-
void clear_task_args()
Resets the task_arg_ struct.
Private Members
-
std::vector<struct chunk_write_args> task_args_
tasklet input structs
Private Static Functions
-
static void write_file_abt(void *_arg)
Exclusively used by the Argobots tasklet.
- Parameters
_arg – Pointer to input struct of type <chunk_write_args>. Error code<int> is placed into eventual to signal its failure or success.
Friends
- friend class ChunkOperation< ChunkWriteOperation >
-
struct chunk_write_args
Struct for an chunk write operation.
-
ChunkWriteOperation(const std::string &path, size_t n)