Commit ef76fe8d authored by Michael Davis's avatar Michael Davis
Browse files

[os-failedrequests] Lists failure log entries with -l option

parent 6d50a900
......@@ -20,7 +20,6 @@
#include <list>
#include <map>
#include <stdint.h>
#include <string>
#include "common/dataStructures/ArchiveRequest.hpp"
......@@ -46,6 +45,7 @@ struct ArchiveJob {
std::string instanceName;
uint64_t copyNumber;
uint64_t archiveFileID;
std::list<std::string> failurelogs;
}; // struct ArchiveJob
......
......@@ -20,7 +20,6 @@
#include <list>
#include <map>
#include <stdint.h>
#include <string>
#include "common/dataStructures/RetrieveRequest.hpp"
......@@ -45,6 +44,7 @@ struct RetrieveJob {
RetrieveRequest request;
uint64_t fileSize;
std::map<std::string,std::pair<uint64_t,TapeFile>> tapeCopies;
std::list<std::string> failurelogs;
}; // struct RetrieveJob
......
......@@ -784,8 +784,4 @@ std::string ArchiveRequest::getTapePoolForJob(uint16_t copyNumber) {
throw exception::Exception("In ArchiveRequest::getTapePoolForJob(): job not found.");
}
}} // namespace cta::objectstore
......@@ -119,6 +119,7 @@ getQueueJobs(const jobQueue_t &jobQueueChunk)
job.request.srcURL = osar.first.getSrcURL();
job.request.archiveReportURL = osar.first.getArchiveReportURL();
job.request.storageClass = osar.first.getArchiveFile().storageClass;
job.failurelogs = osar.first.getFailures();
m_jobCache.push_back(job);
}
......@@ -209,6 +210,7 @@ getQueueJobs(const jobQueue_t &jobQueueChunk)
job.request = osrr.first.getSchedulerRequest();
job.fileSize = osrr.first.getArchiveFile().fileSize;
job.tapeCopies[tf.second.vid] = std::make_pair(tf.second.copyNb, tf.second);
job.failurelogs = osrr.first.getFailures();
m_jobCache.push_back(job);
}
......
......@@ -136,13 +136,8 @@ pushRecord(XrdSsiPb::OStreamBuffer<Data> *streambuf, const common::dataStructure
record.mutable_frls_item()->mutable_af()->mutable_df()->set_path(item.request.diskFileInfo.path);
if(m_isLogEntries) {
#if 0
for(auto &errLogMsg : item.failurelogs) {
record.mutable_frls_item()->mutable_failurelogs()->Add(errLogMsg);
}
#endif
*record.mutable_frls_item()->mutable_failurelogs() = { item.failurelogs.begin(), item.failurelogs.end() };
}
return streambuf->Push(record);
}
......@@ -165,6 +160,9 @@ pushRecord(XrdSsiPb::OStreamBuffer<Data> *streambuf, const common::dataStructure
record.mutable_frls_item()->mutable_requester()->set_groupname(item.request.requester.group);
record.mutable_frls_item()->mutable_af()->mutable_df()->set_path(item.request.diskFileInfo.path);
if(m_isLogEntries) {
*record.mutable_frls_item()->mutable_failurelogs() = { item.failurelogs.begin(), item.failurelogs.end() };
}
return streambuf->Push(record);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment