Commit 216bd16d authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Changed the cta::eos and castor::tape::diskFile namespace into cta::disk namespace

parent 50bdb549
...@@ -38,7 +38,7 @@ namespace unitTests { ...@@ -38,7 +38,7 @@ namespace unitTests {
virtual void run() { virtual void run() {
for (int i=0; i<100; i++) { for (int i=0; i<100; i++) {
std::string payload = "Some payload... And some more..."; std::string payload = "Some payload... And some more...";
std::string signature = castor::tape::diskFile::CryptoPPSigner::sign( std::string signature = cta::disk::CryptoPPSigner::sign(
payload, m_key); payload, m_key);
} }
} }
...@@ -164,8 +164,8 @@ namespace unitTests { ...@@ -164,8 +164,8 @@ namespace unitTests {
} }
private: private:
virtual void run() { virtual void run() {
castor::tape::file::RadosStriperPool striperPool; cta::disk::RadosStriperPool striperPool;
castor::tape::diskFile::DiskFileFactory dff(m_keyPath, 0, cta::disk::DiskFileFactory dff(m_keyPath, 0,
striperPool); striperPool);
for (int i=0; i<5; i++) { for (int i=0; i<5; i++) {
// Read keys in parallel and in a loop to test MT protection of the // Read keys in parallel and in a loop to test MT protection of the
...@@ -230,7 +230,7 @@ namespace unitTests { ...@@ -230,7 +230,7 @@ namespace unitTests {
// This is the output of: // This is the output of:
// echo -n 'Any random message will do!' | openssl dgst -sha1 -sign ~/testRSAPrivate.pem | openssl enc -base64 | tr -d '\n' ; echo // echo -n 'Any random message will do!' | openssl dgst -sha1 -sign ~/testRSAPrivate.pem | openssl enc -base64 | tr -d '\n' ; echo
std::string osslSign("bfqLxACTFS7fMKH5ewNUOaglRlIGCEPWGhx4fRPErFGHtuCi2yWlYFsXIfjBxOT+yCyKRpTnZWGJTbcP72eT7os2qCqIOejAM3nTcsChHN5f3UyADvsi1f7C3DqhYVKVFQPaBdb3zm8IBHsFjmu2EzVE5juc1C9L+ztVmoABptw="); std::string osslSign("bfqLxACTFS7fMKH5ewNUOaglRlIGCEPWGhx4fRPErFGHtuCi2yWlYFsXIfjBxOT+yCyKRpTnZWGJTbcP72eT7os2qCqIOejAM3nTcsChHN5f3UyADvsi1f7C3DqhYVKVFQPaBdb3zm8IBHsFjmu2EzVE5juc1C9L+ztVmoABptw=");
std::string CryptoPPSign(castor::tape::diskFile::CryptoPPSigner::sign(msg,CryptoPPKey)); std::string CryptoPPSign(cta::disk::CryptoPPSigner::sign(msg,CryptoPPKey));
// std::cout << CryptoPPSign << std::endl; // std::cout << CryptoPPSign << std::endl;
ASSERT_EQ(osslSign,CryptoPPSign); ASSERT_EQ(osslSign,CryptoPPSign);
// A few examples generated with openssl's command line: // A few examples generated with openssl's command line:
...@@ -241,10 +241,10 @@ namespace unitTests { ...@@ -241,10 +241,10 @@ namespace unitTests {
// ~/testRSAPrivate.pem contains the same content as the variable somePrivateKey. // ~/testRSAPrivate.pem contains the same content as the variable somePrivateKey.
ASSERT_EQ("O8nSHzVPXyNRGRu8vaQ+CrqJjlv28qdsiFCTjlmeMFgc/aEnlJq+2b2q5al7BiHmPAFOd6fUkvn8xlFBm9IUlPFENhPLuMKJGqRSBndE7At0t+/vbS9UVnKiuOjrFepXo8JOvbt7lpqfp3jBwrQE5OZpOT92Nh8GXlpiCksvoxI=", ASSERT_EQ("O8nSHzVPXyNRGRu8vaQ+CrqJjlv28qdsiFCTjlmeMFgc/aEnlJq+2b2q5al7BiHmPAFOd6fUkvn8xlFBm9IUlPFENhPLuMKJGqRSBndE7At0t+/vbS9UVnKiuOjrFepXo8JOvbt7lpqfp3jBwrQE5OZpOT92Nh8GXlpiCksvoxI=",
castor::tape::diskFile::CryptoPPSigner::sign("rsoCb+KBj9j9Xk6wr5Cgh+TVuI3eDZHTzD9z8pTFjBPEjdyfiTFIeQ==",CryptoPPKey)); cta::disk::CryptoPPSigner::sign("rsoCb+KBj9j9Xk6wr5Cgh+TVuI3eDZHTzD9z8pTFjBPEjdyfiTFIeQ==",CryptoPPKey));
ASSERT_EQ("uf8Cgkwtmh9K1VFLfeIfkZFQMd/pfSGCHNYPByH0nm0COPHNQAkYEI38ez9DS43fsIBVU9Gdrs0x50dVIntzawgzDrjp8YJIeARJF73he8M+6/FUgWJumNMoDE8fdvgiBaCFTv4+di5vtSb/abKVfqY9IbUPSDByxYjDKKI0OF0=", ASSERT_EQ("uf8Cgkwtmh9K1VFLfeIfkZFQMd/pfSGCHNYPByH0nm0COPHNQAkYEI38ez9DS43fsIBVU9Gdrs0x50dVIntzawgzDrjp8YJIeARJF73he8M+6/FUgWJumNMoDE8fdvgiBaCFTv4+di5vtSb/abKVfqY9IbUPSDByxYjDKKI0OF0=",
castor::tape::diskFile::CryptoPPSigner::sign("MtvFsd09F8UQNpwsULF6eMyVkRDIU+uAvBXyJs/LoNM5HrjoJgZrig==",CryptoPPKey)); cta::disk::CryptoPPSigner::sign("MtvFsd09F8UQNpwsULF6eMyVkRDIU+uAvBXyJs/LoNM5HrjoJgZrig==",CryptoPPKey));
ASSERT_EQ("EzSR5Fd1kfmdrVhCiYgoWQ7E1MSdv8OYng3L7LepCfS9OStlEFTkJcMezt4VRqUZnarlcIZ0yPAvrmOUscjrAOAbqA0rMYKsvHnAwd19RaH54QZhtRCDwMloxpuLmUC1cmyJ/PAdRoMYCoHiMVr7yQw0CnVJ5168MUe5o0v3swY=", ASSERT_EQ("EzSR5Fd1kfmdrVhCiYgoWQ7E1MSdv8OYng3L7LepCfS9OStlEFTkJcMezt4VRqUZnarlcIZ0yPAvrmOUscjrAOAbqA0rMYKsvHnAwd19RaH54QZhtRCDwMloxpuLmUC1cmyJ/PAdRoMYCoHiMVr7yQw0CnVJ5168MUe5o0v3swY=",
castor::tape::diskFile::CryptoPPSigner::sign("v3lPb49U+Zz+DNdzoTf2R8AU+AFP+/9/7nLlJV1+HNf3Z+Nzl/HuiQ==",CryptoPPKey)); cta::disk::CryptoPPSigner::sign("v3lPb49U+Zz+DNdzoTf2R8AU+AFP+/9/7nLlJV1+HNf3Z+Nzl/HuiQ==",CryptoPPKey));
} }
} }
...@@ -35,12 +35,11 @@ ...@@ -35,12 +35,11 @@
#include <cryptopp/base64.h> #include <cryptopp/base64.h>
#include <cryptopp/osrng.h> #include <cryptopp/osrng.h>
namespace castor { namespace cta {
namespace tape { namespace disk {
namespace diskFile {
DiskFileFactory::DiskFileFactory(const std::string & xrootPrivateKeyFile, uint16_t xrootTimeout, DiskFileFactory::DiskFileFactory(const std::string & xrootPrivateKeyFile, uint16_t xrootTimeout,
castor::tape::file::RadosStriperPool & striperPool): cta::disk::RadosStriperPool & striperPool):
m_NoURLLocalFile("^(localhost:|)(/.*)$"), m_NoURLLocalFile("^(localhost:|)(/.*)$"),
m_NoURLRemoteFile("^([^:]*:)(.*)$"), m_NoURLRemoteFile("^([^:]*:)(.*)$"),
m_NoURLRadosStriperFile("^localhost:([^/]+)/(.*)$"), m_NoURLRadosStriperFile("^localhost:([^/]+)/(.*)$"),
...@@ -795,4 +794,4 @@ std::set<std::string> XRootdDirectory::getFilesName(){ ...@@ -795,4 +794,4 @@ std::set<std::string> XRootdDirectory::getFilesName(){
return ret; return ret;
} }
}}} //end of namespace diskFile }} //end of namespace cta::disk
...@@ -37,15 +37,14 @@ ...@@ -37,15 +37,14 @@
* There is still a single .cpp file * There is still a single .cpp file
*/ */
namespace castor { namespace cta {
namespace tape { namespace disk {
// Forward declaration of RadosStriperPool // Forward declaration of RadosStriperPool
namespace file { class RadosStriperPool; } class RadosStriperPool;
/** /**
* Namespace managing the reading and writing of files to and from disk. * Namespace managing the reading and writing of files to and from disk.
*/ */
namespace diskFile {
class ReadFile; class ReadFile;
class WriteFile; class WriteFile;
...@@ -60,7 +59,7 @@ namespace castor { ...@@ -60,7 +59,7 @@ namespace castor {
typedef cta::utils::Regex Regex; typedef cta::utils::Regex Regex;
public: public:
DiskFileFactory(const std::string & xrootPrivateKey, uint16_t xrootTimeout, DiskFileFactory(const std::string & xrootPrivateKey, uint16_t xrootTimeout,
castor::tape::file::RadosStriperPool & striperPool); cta::disk::RadosStriperPool & striperPool);
ReadFile * createReadFile(const std::string & path); ReadFile * createReadFile(const std::string & path);
WriteFile * createWriteFile(const std::string & path); WriteFile * createWriteFile(const std::string & path);
private: private:
...@@ -74,7 +73,7 @@ namespace castor { ...@@ -74,7 +73,7 @@ namespace castor {
CryptoPP::RSA::PrivateKey m_xrootPrivateKey; CryptoPP::RSA::PrivateKey m_xrootPrivateKey;
bool m_xrootPrivateKeyLoaded; bool m_xrootPrivateKeyLoaded;
const uint16_t m_xrootTimeout; const uint16_t m_xrootTimeout;
castor::tape::file::RadosStriperPool & m_striperPool; cta::disk::RadosStriperPool & m_striperPool;
public: public:
/** Return the private key. Read it from the file if necessary. */ /** Return the private key. Read it from the file if necessary. */
...@@ -240,7 +239,6 @@ namespace castor { ...@@ -240,7 +239,6 @@ namespace castor {
std::string m_URL; std::string m_URL;
}; };
} //end of namespace diskFile } //end of namespace disk
} //end of namespace cta
}}
...@@ -32,12 +32,11 @@ ...@@ -32,12 +32,11 @@
#include <cryptopp/rsa.h> #include <cryptopp/rsa.h>
#include <radosstriper/libradosstriper.hpp> #include <radosstriper/libradosstriper.hpp>
namespace castor { namespace cta {
namespace tape { namespace disk {
/** /**
* Namespace managing the reading and writing of files to and from disk. * Namespace managing the reading and writing of files to and from disk.
*/ */
namespace diskFile {
//Forward declarations //Forward declarations
class XRootdDiskFileRemover; class XRootdDiskFileRemover;
...@@ -278,5 +277,5 @@ namespace castor { ...@@ -278,5 +277,5 @@ namespace castor {
const uint16_t c_xrootTimeout = 15; const uint16_t c_xrootTimeout = 15;
}; };
} //end of namespace diskFile } //end of namespace disk
}} }
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <future> #include <future>
namespace cta { namespace eos { namespace cta { namespace disk {
class DiskReporter { class DiskReporter {
public: public:
...@@ -31,4 +31,4 @@ protected: ...@@ -31,4 +31,4 @@ protected:
std::promise<void> m_promise; std::promise<void> m_promise;
}; };
}} // name space cta::clientsystem }} // name space cta::disk
\ No newline at end of file \ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "common/exception/Exception.hpp" #include "common/exception/Exception.hpp"
#include "common/threading/MutexLocker.hpp" #include "common/threading/MutexLocker.hpp"
namespace cta { namespace eos { namespace cta { namespace disk {
DiskReporter* DiskReporterFactory::createDiskReporter(const std::string URL) { DiskReporter* DiskReporterFactory::createDiskReporter(const std::string URL) {
threading::MutexLocker ml(m_mutex); threading::MutexLocker ml(m_mutex);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <string> #include <string>
#include <future> #include <future>
namespace cta { namespace eos { namespace cta { namespace disk {
class DiskReporterFactory { class DiskReporterFactory {
public: public:
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "EOSReporter.hpp" #include "EOSReporter.hpp"
#include "common/exception/XrootCl.hpp" #include "common/exception/XrootCl.hpp"
namespace cta { namespace eos { namespace cta { namespace disk {
EOSReporter::EOSReporter(const std::string& hostURL, const std::string& queryValue): EOSReporter::EOSReporter(const std::string& hostURL, const std::string& queryValue):
m_fs(hostURL), m_query(queryValue) {} m_fs(hostURL), m_query(queryValue) {}
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include <future> #include <future>
namespace cta { namespace eos { namespace cta { namespace disk {
const uint16_t CTA_EOS_QUERY_TIMEOUT = 15; // Timeout in seconds that is rounded up to the nearest 15 seconds const uint16_t CTA_EOS_QUERY_TIMEOUT = 15; // Timeout in seconds that is rounded up to the nearest 15 seconds
class EOSReporter: public DiskReporter, public XrdCl::ResponseHandler { class EOSReporter: public DiskReporter, public XrdCl::ResponseHandler {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "DiskReporter.hpp" #include "DiskReporter.hpp"
namespace cta { namespace eos { namespace cta { namespace disk {
class NullReporter: public DiskReporter { class NullReporter: public DiskReporter {
public: public:
......
...@@ -36,9 +36,8 @@ private: ...@@ -36,9 +36,8 @@ private:
}; };
} }
namespace castor { namespace cta {
namespace tape { namespace disk {
namespace file {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Accessor to next striper pool index // Accessor to next striper pool index
...@@ -157,6 +156,5 @@ void RadosStriperPool::disconnectAll() { ...@@ -157,6 +156,5 @@ void RadosStriperPool::disconnectAll() {
m_stripers.clear(); m_stripers.clear();
} }
} // namespace file } // namespace disk
} // namespace tape } // namespace cta
} // namespace castor
...@@ -24,9 +24,8 @@ ...@@ -24,9 +24,8 @@
#include <map> #include <map>
#include <memory> #include <memory>
namespace castor { namespace cta {
namespace tape { namespace disk {
namespace file {
/** /**
* Utility singleton managing the rados stripers connections by name. * Utility singleton managing the rados stripers connections by name.
* The destructor will implicitly release the pool connections. * The destructor will implicitly release the pool connections.
...@@ -78,6 +77,5 @@ private: ...@@ -78,6 +77,5 @@ private:
unsigned int m_striperIdx; unsigned int m_striperIdx;
}; };
} // namespace file } // namespace disk
} // namespace tape } // namespace cta
} // namespace castor \ No newline at end of file
...@@ -131,7 +131,7 @@ private: ...@@ -131,7 +131,7 @@ private:
/** /**
* The reporter for the job. TODO: this should be generic and fed with a factory. * The reporter for the job. TODO: this should be generic and fed with a factory.
*/ */
std::unique_ptr<cta::eos::DiskReporter> m_reporter; std::unique_ptr<cta::disk::DiskReporter> m_reporter;
/** /**
* Report time measurement. * Report time measurement.
......
...@@ -117,7 +117,7 @@ void cta::ArchiveMount::checkTapeFSeqAndDeleteTapeFilesForWriting(uint64_t fSeq) ...@@ -117,7 +117,7 @@ void cta::ArchiveMount::checkTapeFSeqAndDeleteTapeFilesForWriting(uint64_t fSeq)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// createDiskReporter // createDiskReporter
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
cta::eos::DiskReporter* cta::ArchiveMount::createDiskReporter(std::string& URL) { cta::disk::DiskReporter* cta::ArchiveMount::createDiskReporter(std::string& URL) {
return m_reporterFactory.createDiskReporter(URL); return m_reporterFactory.createDiskReporter(URL);
} }
......
...@@ -186,7 +186,7 @@ namespace cta { ...@@ -186,7 +186,7 @@ namespace cta {
* @param reporterState void promise to be set when the report is done asynchronously. * @param reporterState void promise to be set when the report is done asynchronously.
* @return pointer to the reporter created. * @return pointer to the reporter created.
*/ */
eos::DiskReporter * createDiskReporter(std::string & URL); disk::DiskReporter * createDiskReporter(std::string & URL);
/** /**
* Update the catalog with a set of TapeFileWritten events. * Update the catalog with a set of TapeFileWritten events.
...@@ -219,7 +219,7 @@ namespace cta { ...@@ -219,7 +219,7 @@ namespace cta {
private: private:
/** An initialized-once factory for archive reports (indirectly used by ArchiveJobs) */ /** An initialized-once factory for archive reports (indirectly used by ArchiveJobs) */
eos::DiskReporterFactory m_reporterFactory; disk::DiskReporterFactory m_reporterFactory;
}; // class ArchiveMount }; // class ArchiveMount
} // namespace cta } // namespace cta
...@@ -33,6 +33,6 @@ public: ...@@ -33,6 +33,6 @@ public:
private: private:
Scheduler & m_scheduler; Scheduler & m_scheduler;
eos::DiskReporterFactory m_reporterFactory; disk::DiskReporterFactory m_reporterFactory;
}; };
} // namespace cta } // namespace cta
\ No newline at end of file
...@@ -4131,7 +4131,7 @@ void OStoreDB::RepackArchiveReportBatch::report(log::LogContext& lc){ ...@@ -4131,7 +4131,7 @@ void OStoreDB::RepackArchiveReportBatch::report(log::LogContext& lc){
} }
timingList.insertAndReset("asyncUpdateOrDeleteLaunchTime", t); timingList.insertAndReset("asyncUpdateOrDeleteLaunchTime", t);
struct DiskFileRemovers{ struct DiskFileRemovers{
std::unique_ptr<castor::tape::diskFile::AsyncDiskFileRemover> asyncRemover; std::unique_ptr<cta::disk::AsyncDiskFileRemover> asyncRemover;
RepackReportBatch::SubrequestInfo<objectstore::ArchiveRequest> & subrequestInfo; RepackReportBatch::SubrequestInfo<objectstore::ArchiveRequest> & subrequestInfo;
typedef std::list<DiskFileRemovers> List; typedef std::list<DiskFileRemovers> List;
}; };
...@@ -4145,8 +4145,8 @@ void OStoreDB::RepackArchiveReportBatch::report(log::LogContext& lc){ ...@@ -4145,8 +4145,8 @@ void OStoreDB::RepackArchiveReportBatch::report(log::LogContext& lc){
lc.log(log::INFO, "In OStoreDB::RepackArchiveReportBatch::report(): deleted request."); lc.log(log::INFO, "In OStoreDB::RepackArchiveReportBatch::report(): deleted request.");
try { try {
//Subrequest deleted, async delete the file from the disk //Subrequest deleted, async delete the file from the disk
castor::tape::diskFile::AsyncDiskFileRemoverFactory asyncDiskFileRemoverFactory; cta::disk::AsyncDiskFileRemoverFactory asyncDiskFileRemoverFactory;
std::unique_ptr<castor::tape::diskFile::AsyncDiskFileRemover> asyncRemover(asyncDiskFileRemoverFactory.createAsyncDiskFileRemover(d.subrequestInfo.repackInfo.fileBufferURL)); std::unique_ptr<cta::disk::AsyncDiskFileRemover> asyncRemover(asyncDiskFileRemoverFactory.createAsyncDiskFileRemover(d.subrequestInfo.repackInfo.fileBufferURL));
diskFileRemoverList.push_back({std::move(asyncRemover),d.subrequestInfo}); diskFileRemoverList.push_back({std::move(asyncRemover),d.subrequestInfo});
diskFileRemoverList.back().asyncRemover->asyncDelete(); diskFileRemoverList.back().asyncRemover->asyncDelete();
} catch (const cta::exception::Exception &ex){ } catch (const cta::exception::Exception &ex){
...@@ -4185,9 +4185,9 @@ void OStoreDB::RepackArchiveReportBatch::report(log::LogContext& lc){ ...@@ -4185,9 +4185,9 @@ void OStoreDB::RepackArchiveReportBatch::report(log::LogContext& lc){
} }
if(repackRequestStatus == objectstore::serializers::RepackRequestStatus::RRS_Complete){ if(repackRequestStatus == objectstore::serializers::RepackRequestStatus::RRS_Complete){
//Repack Request is complete, delete the directory in the buffer //Repack Request is complete, delete the directory in the buffer
castor::tape::diskFile::DirectoryFactory directoryFactory; cta::disk::DirectoryFactory directoryFactory;
std::string directoryPath = cta::utils::getEnclosingPath(bufferURL); std::string directoryPath = cta::utils::getEnclosingPath(bufferURL);
std::unique_ptr<castor::tape::diskFile::Directory> directory; std::unique_ptr<cta::disk::Directory> directory;
try{ try{
directory.reset(directoryFactory.createDirectory(directoryPath)); directory.reset(directoryFactory.createDirectory(directoryPath));
directory->rmdir(); directory->rmdir();
......
...@@ -216,7 +216,7 @@ void cta::RetrieveMount::flushAsyncSuccessReports(std::queue<std::unique_ptr<cta ...@@ -216,7 +216,7 @@ void cta::RetrieveMount::flushAsyncSuccessReports(std::queue<std::unique_ptr<cta
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// createDiskReporter() // createDiskReporter()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
cta::eos::DiskReporter* cta::RetrieveMount::createDiskReporter(std::string& URL) { cta::disk::DiskReporter* cta::RetrieveMount::createDiskReporter(std::string& URL) {
return m_reporterFactory.createDiskReporter(URL); return m_reporterFactory.createDiskReporter(URL);
} }
......
...@@ -181,7 +181,7 @@ namespace cta { ...@@ -181,7 +181,7 @@ namespace cta {
* @param URL: report address * @param URL: report address
* @return pointer to the reporter created. * @return pointer to the reporter created.
*/ */
eos::DiskReporter * createDiskReporter(std::string & URL); disk::DiskReporter * createDiskReporter(std::string & URL);
/** /**
* Destructor. * Destructor.
...@@ -211,7 +211,7 @@ namespace cta { ...@@ -211,7 +211,7 @@ namespace cta {
bool m_diskRunning; bool m_diskRunning;
/** An initialized-once factory for archive reports (indirectly used by ArchiveJobs) */ /** An initialized-once factory for archive reports (indirectly used by ArchiveJobs) */
eos::DiskReporterFactory m_reporterFactory; disk::DiskReporterFactory m_reporterFactory;
}; // class RetrieveMount }; // class RetrieveMount
......
...@@ -441,8 +441,8 @@ void Scheduler::expandRepackRequest(std::unique_ptr<RepackRequest>& repackReques ...@@ -441,8 +441,8 @@ void Scheduler::expandRepackRequest(std::unique_ptr<RepackRequest>& repackReques
cta::catalogue::ArchiveFileItor archiveFilesForCatalogue = m_catalogue.getArchiveFilesForRepackItor(repackInfo.vid, fSeq); cta::catalogue::ArchiveFileItor archiveFilesForCatalogue = m_catalogue.getArchiveFilesForRepackItor(repackInfo.vid, fSeq);
std::stringstream dirBufferURL; std::stringstream dirBufferURL;
dirBufferURL << repackInfo.repackBufferBaseURL << "/" << repackInfo.vid << "/"; dirBufferURL << repackInfo.repackBufferBaseURL << "/" << repackInfo.vid << "/";
castor::tape::diskFile::DirectoryFactory dirFactory; cta::disk::DirectoryFactory dirFactory;
std::unique_ptr<castor::tape::diskFile::Directory> dir; std::unique_ptr<cta::disk::Directory> dir;
dir.reset(dirFactory.createDirectory(dirBufferURL.str())); dir.reset(dirFactory.createDirectory(dirBufferURL.str()));
std::set<std::string> filesInDirectory; std::set<std::string> filesInDirectory;
if(dir->exist()){ if(dir->exist()){
...@@ -483,9 +483,9 @@ void Scheduler::expandRepackRequest(std::unique_ptr<RepackRequest>& repackReques ...@@ -483,9 +483,9 @@ void Scheduler::expandRepackRequest(std::unique_ptr<RepackRequest>& repackReques
fileName << std::setw(9) << std::setfill('0') << retrieveSubRequest.fSeq; fileName << std::setw(9) << std::setfill('0') << retrieveSubRequest.fSeq;
bool createArchiveSubrequest = false; bool createArchiveSubrequest = false;
if(filesInDirectory.count(fileName.str())){ if(filesInDirectory.count(fileName.str())){
castor::tape::file::RadosStriperPool radosStriperPool; cta::disk::RadosStriperPool radosStriperPool;
castor::tape::diskFile::DiskFileFactory fileFactory("",0,radosStriperPool); cta::disk::DiskFileFactory fileFactory("",0,radosStriperPool);
castor::tape::diskFile::ReadFile *fileReader = fileFactory.createReadFile(dirBufferURL.str() + fileName.str()); cta::disk::ReadFile *fileReader = fileFactory.createReadFile(dirBufferURL.str() + fileName.str());
if(fileReader->size() == archiveFile.fileSize){ if(fileReader->size() == archiveFile.fileSize){
createArchiveSubrequest = true; createArchiveSubrequest = true;
retrieveSubrequests.pop_back(); retrieveSubrequests.pop_back();
...@@ -1389,11 +1389,11 @@ SchedulerDatabase::JobsFailedSummary Scheduler::getRetrieveJobsFailedSummary(log ...@@ -1389,11 +1389,11 @@ SchedulerDatabase::JobsFailedSummary Scheduler::getRetrieveJobsFailedSummary(log
// reportArchiveJobsBatch // reportArchiveJobsBatch
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Scheduler::reportArchiveJobsBatch(std::list<std::unique_ptr<ArchiveJob> >& archiveJobsBatch, void Scheduler::reportArchiveJobsBatch(std::list<std::unique_ptr<ArchiveJob> >& archiveJobsBatch,
eos::DiskReporterFactory & reporterFactory, log::TimingList& timingList, utils::Timer& t, disk::DiskReporterFactory & reporterFactory, log::TimingList& timingList, utils::Timer& t,
log::LogContext& lc){ log::LogContext& lc){
// Create the reporters // Create the reporters
struct JobAndReporter { struct JobAndReporter {
std::unique_ptr<eos::DiskReporter> reporter; std::unique_ptr<disk::DiskReporter> reporter;
ArchiveJob * archiveJob; ArchiveJob * archiveJob;
}; };
std::list<JobAndReporter> pendingReports; std::list<JobAndReporter> pendingReports;
...@@ -1460,11 +1460,11 @@ void Scheduler::reportArchiveJobsBatch(std::list<std::unique_ptr<ArchiveJob> >& ...@@ -1460,11 +1460,11 @@ void Scheduler::reportArchiveJobsBatch(std::list<std::unique_ptr<ArchiveJob> >&
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Scheduler:: void Scheduler::
reportRetrieveJobsBatch(std::list<std::unique_ptr<RetrieveJob>> & retrieveJobsBatch, reportRetrieveJobsBatch(std::list<std::unique_ptr<RetrieveJob>> & retrieveJobsBatch,
eos::DiskReporterFactory & reporterFactory, log::TimingList & timingList, utils::Timer & t, log::LogContext & lc) disk::DiskReporterFactory & reporterFactory, log::TimingList & timingList, utils::Timer & t, log::LogContext & lc)
{ {
// Create the reporters // Create the reporters
struct JobAndReporter { struct JobAndReporter {
std::unique_ptr<eos::DiskReporter> reporter; std::unique_ptr<disk::DiskReporter> reporter;
RetrieveJob * retrieveJob; RetrieveJob * retrieveJob;
}; };
std::list<JobAndReporter> pendingReports; std::list<JobAndReporter> pendingReports;
......
Markdown is supported
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