Skip to content
Snippets Groups Projects
Commit 8e1e7fd2 authored by Eric Cano's avatar Eric Cano
Browse files

Fixed several bugs in EOSReporter. Added support for "null:" report URL.

parent 124523d7
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ private:
// which itself will be translated into (roughly) :
// XrdCl::FileSystem(XrdCl::URL("eoserver.cern.ch")).Query("/eos/wfe/passwd?mgm.pcmd=event&mgm.fid=112&mgm.logid=cta&mgm.event=migrated&mgm.workflow=default&mgm.path=/eos/wfe/passwd&mgm.ruid=0&mgm.rgid=0");
cta::utils::Regex m_EosUrlRegex{"^eosQuery://([^/]+)(/.*)$"};
cta::utils::Regex m_NullRegex{"^$"};
cta::utils::Regex m_NullRegex{"^$|^null:$"};
/// This mutex ensures we do not use the regexes in parallel.
cta::threading::Mutex m_mutex;
};
......
......@@ -22,15 +22,18 @@
namespace cta { namespace disk {
EOSReporter::EOSReporter(const std::string& hostURL, const std::string& queryValue):
m_fs(hostURL) {}
m_fs(hostURL), m_query(queryValue) {}
void EOSReporter::reportArchiveFullyComplete() {
auto qcOpaque = XrdCl::QueryCode::OpaqueFile;
XrdCl::Buffer arg (m_query.size());
arg.FromString(m_query);
cta::exception::XrootCl::throwOnError(m_fs.Query(qcOpaque, arg, nullptr),
XrdCl::Buffer * resp = nullptr;
XrdCl::XRootDStatus status=m_fs.Query(qcOpaque, arg, resp);
delete (resp);
cta::exception::XrootCl::throwOnError(status,
"In EOSReporter::reportArchiveFullyComplete(): failed to XrdCl::FileSystem::Query()");
}
}
}} // namespace cta::disk
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment