Commit 2bf5c414 authored by Eric Cano's avatar Eric Cano
Browse files

Fixed the wrong renaming of cta::common::dataStructures::ArchiveFile::diskFileID to dstURL

parent ad44251b
......@@ -1922,7 +1922,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, prepareToRetrieveFile) {
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->getArchiveFileById(archiveFileId);
ASSERT_EQ(file1Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file1Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file1Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file1Written.size, archiveFile.fileSize);
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
......@@ -1964,7 +1964,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, prepareToRetrieveFile) {
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->getArchiveFileById(archiveFileId);
ASSERT_EQ(file2Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file2Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file2Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file2Written.size, archiveFile.fileSize);
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
......@@ -2147,7 +2147,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, fileWrittenToTape_2_tape_files_diffe
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->getArchiveFileById(archiveFileId);
ASSERT_EQ(file1Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file1Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file1Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file1Written.size, archiveFile.fileSize);
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
......@@ -2197,7 +2197,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, fileWrittenToTape_2_tape_files_diffe
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->getArchiveFileById(archiveFileId);
ASSERT_EQ(file2Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file2Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file2Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file2Written.size, archiveFile.fileSize);
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
......@@ -2314,7 +2314,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, fileWrittenToTape_2_tape_files_same_
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->getArchiveFileById(archiveFileId);
ASSERT_EQ(file1Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file1Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file1Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file1Written.size, archiveFile.fileSize);
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
......@@ -2428,7 +2428,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, fileWrittenToTape_2_tape_files_corru
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->getArchiveFileById(archiveFileId);
ASSERT_EQ(file1Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file1Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file1Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file1Written.size, archiveFile.fileSize);
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
......@@ -2583,7 +2583,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
const common::dataStructures::ArchiveFile archiveFile = mItor->second;
ASSERT_EQ(file1Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file1Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file1Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file1Written.size, archiveFile.fileSize);
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
......@@ -2608,7 +2608,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->getArchiveFileById(archiveFileId);
ASSERT_EQ(file1Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file1Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file1Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file1Written.size, archiveFile.fileSize);
ASSERT_EQ(file1Written.storageClassName, archiveFile.storageClass);
......@@ -2666,7 +2666,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
const common::dataStructures::ArchiveFile archiveFile = mItor->second;
ASSERT_EQ(file2Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file2Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file2Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file2Written.size, archiveFile.fileSize);
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
......@@ -2702,7 +2702,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->getArchiveFileById(archiveFileId);
ASSERT_EQ(file2Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file2Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file2Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file2Written.size, archiveFile.fileSize);
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
......@@ -2737,7 +2737,7 @@ TEST_F(cta_catalogue_InMemoryCatalogueTest, deleteArchiveFile) {
const common::dataStructures::ArchiveFile archiveFile = m_catalogue->deleteArchiveFile(archiveFileId);
ASSERT_EQ(file2Written.archiveFileId, archiveFile.archiveFileID);
ASSERT_EQ(file2Written.diskFileId, archiveFile.dstURL);
ASSERT_EQ(file2Written.diskFileId, archiveFile.diskFileId);
ASSERT_EQ(file2Written.size, archiveFile.fileSize);
ASSERT_EQ(file2Written.storageClassName, archiveFile.storageClass);
......
......@@ -2476,7 +2476,7 @@ std::list<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveFilesFo
archiveFile.archiveFileID = archiveFileId;
archiveFile.diskInstance = rset->columnText("DISK_INSTANCE");
archiveFile.dstURL = rset->columnText("DISK_FILE_ID");
archiveFile.diskFileId = rset->columnText("DISK_FILE_ID");
archiveFile.drData.drPath = rset->columnText("DISK_FILE_PATH");
archiveFile.drData.drOwner = rset->columnText("DISK_FILE_USER");
archiveFile.drData.drGroup = rset->columnText("DISK_FILE_GROUP");
......@@ -2725,9 +2725,9 @@ void RdbmsCatalogue::throwIfCommonEventDataMismatch(const common::dataStructures
const TapeFileWritten &actual) const {
// Throw an exception if the common disk information of this tape file
// written event does not match the previous
if(expected.dstURL != actual.diskFileId) {
if(expected.diskFileId != actual.diskFileId) {
exception::Exception ex;
ex.getMessage() << "Disk file ID mismatch: expected=" << expected.dstURL << " actual=" <<
ex.getMessage() << "Disk file ID mismatch: expected=" << expected.diskFileId << " actual=" <<
actual.diskFileId;
throw ex;
}
......@@ -3148,7 +3148,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveF
archiveFile->archiveFileID = rset->columnUint64("ARCHIVE_FILE_ID");
archiveFile->diskInstance = rset->columnText("DISK_INSTANCE");
archiveFile->dstURL = rset->columnText("DISK_FILE_ID");
archiveFile->diskFileId = rset->columnText("DISK_FILE_ID");
archiveFile->drData.drPath = rset->columnText("DISK_FILE_PATH");
archiveFile->drData.drOwner = rset->columnText("DISK_FILE_USER");
archiveFile->drData.drGroup = rset->columnText("DISK_FILE_GROUP");
......
......@@ -90,7 +90,7 @@ common::dataStructures::ArchiveFile SqliteCatalogue::deleteArchiveFile(const uin
archiveFile->archiveFileID = selectRset->columnUint64("ARCHIVE_FILE_ID");
archiveFile->diskInstance = selectRset->columnText("DISK_INSTANCE");
archiveFile->dstURL = selectRset->columnText("DISK_FILE_ID");
archiveFile->diskFileId = selectRset->columnText("DISK_FILE_ID");
archiveFile->drData.drPath = selectRset->columnText("DISK_FILE_PATH");
archiveFile->drData.drOwner = selectRset->columnText("DISK_FILE_USER");
archiveFile->drData.drGroup = selectRset->columnText("DISK_FILE_GROUP");
......
......@@ -39,7 +39,7 @@ ArchiveFile::ArchiveFile():
//------------------------------------------------------------------------------
bool ArchiveFile::operator==(const ArchiveFile &rhs) const {
return archiveFileID == rhs.archiveFileID
&& dstURL == rhs.dstURL
&& diskFileId == rhs.diskFileId
&& diskInstance == rhs.diskInstance
&& fileSize == rhs.fileSize
&& checksumType == rhs.checksumType
......@@ -63,7 +63,7 @@ std::ostream &operator<<(std::ostream &os, ArchiveFile &obj) {
os <<
"{"
"archiveFileID=" << obj.archiveFileID << ","
"diskFileID=" << obj.dstURL << ","
"diskFileID=" << obj.diskFileId << ","
"diskInstance=" << obj.diskInstance << ","
"fileSize=" << obj.fileSize << ","
"checksumType=" << obj.checksumType << ","
......
......@@ -50,7 +50,7 @@ struct ArchiveFile {
bool operator!=(const ArchiveFile &rhs) const;
uint64_t archiveFileID;
std::string dstURL;
std::string diskFileId;
std::string diskInstance;
uint64_t fileSize;
/**
......
......@@ -38,7 +38,7 @@ TEST_F(cta_common_dataStructures_ArchiveFileTest, copy_constructor) {
ArchiveFile archiveFile1;
archiveFile1.archiveFileID = 1234;
archiveFile1.dstURL = "EOS_file_ID";
archiveFile1.diskFileId = "EOS_file_ID";
archiveFile1.fileSize = 1;
archiveFile1.checksumType = "checksum_type";
archiveFile1.checksumValue = "cheskum_value";
......@@ -75,7 +75,7 @@ TEST_F(cta_common_dataStructures_ArchiveFileTest, copy_constructor) {
archiveFile2 = archiveFile1;
ASSERT_EQ(archiveFile1.archiveFileID, archiveFile2.archiveFileID);
ASSERT_EQ(archiveFile1.dstURL, archiveFile2.dstURL);
ASSERT_EQ(archiveFile1.diskFileId, archiveFile2.diskFileId);
ASSERT_EQ(archiveFile1.fileSize, archiveFile2.fileSize);
ASSERT_EQ(archiveFile1.checksumType, archiveFile2.checksumType);
ASSERT_EQ(archiveFile1.checksumValue, archiveFile2.checksumValue);
......
......@@ -99,7 +99,7 @@ cta::common::dataStructures::ArchiveFile RetrieveRequest::getArchiveFile() {
ret.checksumType = m_payload.archivefile().checksumtype();
ret.checksumValue = m_payload.archivefile().checksumvalue();
ret.creationTime = m_payload.archivefile().creationtime();
ret.dstURL = m_payload.dsturl();
ret.diskFileId = m_payload.archivefile().diskfileid();
ret.diskInstance = m_payload.diskinstance();
ret.drData.drBlob = m_payload.drdata().drblob();
ret.drData.drGroup = m_payload.drdata().drgroup();
......
......@@ -191,9 +191,10 @@ message MountCriteria {
message ArchiveFile {
required uint64 fileId = 4351;
required uint64 size = 4352;
required string checksumtype = 4353;
required string checksumvalue = 4354;
required uint64 creationtime = 4355;
required string diskfileid = 4353;
required string checksumtype = 4354;
required string checksumvalue = 4355;
required uint64 creationtime = 4356;
}
// ------------- Archive Jobs --------------------------------------------------
......
......@@ -1647,7 +1647,7 @@ int XrdCtaFile::xCom_archivefile() {
currentRow.push_back(jt->second.vid);
currentRow.push_back(std::to_string((unsigned long long)jt->second.fSeq));
currentRow.push_back(std::to_string((unsigned long long)jt->second.blockId));
currentRow.push_back(archiveFile.dstURL);
currentRow.push_back(archiveFile.diskFileId);
currentRow.push_back(archiveFile.diskInstance);
currentRow.push_back(std::to_string((unsigned long long)archiveFile.fileSize));
currentRow.push_back(archiveFile.checksumType);
......@@ -1830,7 +1830,7 @@ int XrdCtaFile::xCom_reconcile() {
currentRow.push_back(jt->second.vid);
currentRow.push_back(std::to_string((unsigned long long)jt->second.fSeq));
currentRow.push_back(std::to_string((unsigned long long)jt->second.blockId));
currentRow.push_back(it->dstURL);
currentRow.push_back(it->diskFileId);
currentRow.push_back(it->diskInstance);
currentRow.push_back(std::to_string((unsigned long long)it->fileSize));
currentRow.push_back(it->checksumType);
......
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