The BeeGfsRequestProvider uses the BeeGFS FileEventReceiver to get file events from a BeeGFS mete data server.
◆ processSources()
void followBeeGfsRequestProvider::processSources |
( |
const std::vector< std::string > & |
sources | ) |
|
|
overridevirtual |
Implements requestProvider.
Definition at line 14 of file followBeeGfsRequestProvider.cpp.
15 for (
auto& source : sources) {
16 BeeGFS::FileEventReceiver receiver(source);
18 const auto data = receiver.read();
19 if (data.first == BeeGFS::FileEventReceiver::ReadErrorCode::Success) {
20 auto&
event = data.second;
21 if (event.type == BeeGFS::FileEventType::CLOSE_WRITE) {
27 handleOther(path, dstPath, mapEntry, copyRequest::clock_type::now(),
false);
28 }
else if (event.type == BeeGFS::FileEventType::RENAME) {
36 target +=
event.targetPath;
39 handleMove(target, dstPath, fromPath, path, mapEntryD, copyRequest::clock_type::now());
40 }
else if (event.type == BeeGFS::FileEventType::UNLINK ||
41 event.type == BeeGFS::FileEventType::RMDIR) {
47 handleOther(path, dstPath, mapEntry, copyRequest::clock_type::now(),
true);
48 }
else if (event.type == BeeGFS::FileEventType::SYMLINK) {
51 path +=
event.targetPath;
54 handleOther(path, dstPath, mapEntry, copyRequest::clock_type::now(),
false);
References followBeeGfsRequestProvider::beegfsroot, requestProvider::getDstPath(), followRequestProvider::handleMove(), and followRequestProvider::handleOther().
virtual void handleMove(const std::string &srcPath, const std::string &dstPath, const std::string &fromPath, const std::string &origPath, const singleMap &mapEntry, copyRequest::clock_type::time_point timestamp)