|
libgrape-lite
A C++ library for parallel graph processing
|
A default adaptor to read/write files from local locations. More...
#include <local_io_adaptor.h>
Public Member Functions | |
| LocalIOAdaptor (std::string location) | |
| void | Open () override |
| void | Open (const char *mode) override |
| void | Close () override |
| bool | Configure (const std::string &key, const std::string &value) override |
| Configure sub-class specific items. e.g., odps_access_key = abcd; oss_read_concurrency = 16; whether ReadLine for local location uses std::getline;. | |
| bool | SetPartialRead (int index, int total_parts) override |
| Set each worker only scan related parts of the whole file. | |
| bool | ReadLine (std::string &line) override |
| bool | ReadArchive (OutArchive &archive) override |
| bool | WriteArchive (InArchive &archive) override |
| bool | Read (void *buffer, size_t size) override |
| bool | Write (void *buffer, size_t size) override |
| void | MakeDirectory (const std::string &path) override |
| bool | IsExist () override |
Private Types | |
| enum | FileLocation { kFileLocationBegin = 0 , kFileLocationCurrent = 1 , kFileLocationEnd = 2 } |
Private Member Functions | |
| int64_t | tell () |
| void | seek (int64_t offset, FileLocation seek_from) |
| bool | setPartialReadImpl () |
Static Private Attributes | |
| static constexpr size_t | LINE_SIZE = 65535 |
A default adaptor to read/write files from local locations.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Configure sub-class specific items. e.g., odps_access_key = abcd; oss_read_concurrency = 16; whether ReadLine for local location uses std::getline;.
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Set each worker only scan related parts of the whole file.
for local: read with offset, from a big file.
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.
|
overridevirtual |
Implements grape::IOAdaptorBase.