Commit be4a9fe2 authored by Steven Murray's avatar Steven Murray
Browse files

Appropriate DB column names now end with _IN_BYTES

parent fbd73320
......@@ -62,7 +62,7 @@ common::dataStructures::ArchiveFile OracleCatalogue::deleteArchiveFile(
"ARCHIVE_FILE.DISK_FILE_USER AS DISK_FILE_USER,"
"ARCHIVE_FILE.DISK_FILE_GROUP AS DISK_FILE_GROUP,"
"ARCHIVE_FILE.DISK_FILE_RECOVERY_BLOB AS DISK_FILE_RECOVERY_BLOB,"
"ARCHIVE_FILE.FILE_SIZE AS FILE_SIZE,"
"ARCHIVE_FILE.SIZE_IN_BYTES AS SIZE_IN_BYTES,"
"ARCHIVE_FILE.CHECKSUM_TYPE AS CHECKSUM_TYPE,"
"ARCHIVE_FILE.CHECKSUM_VALUE AS CHECKSUM_VALUE,"
"ARCHIVE_FILE.STORAGE_CLASS_NAME AS STORAGE_CLASS_NAME,"
......@@ -71,7 +71,7 @@ common::dataStructures::ArchiveFile OracleCatalogue::deleteArchiveFile(
"TAPE_FILE.VID AS VID,"
"TAPE_FILE.FSEQ AS FSEQ,"
"TAPE_FILE.BLOCK_ID AS BLOCK_ID,"
"TAPE_FILE.COMPRESSED_SIZE AS COMPRESSED_SIZE,"
"TAPE_FILE.COMPRESSED_SIZE_IN_BYTES AS COMPRESSED_SIZE_IN_BYTES,"
"TAPE_FILE.COPY_NB AS COPY_NB,"
"TAPE_FILE.CREATION_TIME AS TAPE_FILE_CREATION_TIME "
"FROM "
......@@ -97,7 +97,7 @@ common::dataStructures::ArchiveFile OracleCatalogue::deleteArchiveFile(
archiveFile->diskFileInfo.owner = selectRset->columnString("DISK_FILE_USER");
archiveFile->diskFileInfo.group = selectRset->columnString("DISK_FILE_GROUP");
archiveFile->diskFileInfo.recoveryBlob = selectRset->columnString("DISK_FILE_RECOVERY_BLOB");
archiveFile->fileSize = selectRset->columnUint64("FILE_SIZE");
archiveFile->fileSize = selectRset->columnUint64("SIZE_IN_BYTES");
archiveFile->checksumType = selectRset->columnString("CHECKSUM_TYPE");
archiveFile->checksumValue = selectRset->columnString("CHECKSUM_VALUE");
archiveFile->storageClass = selectRset->columnString("STORAGE_CLASS_NAME");
......@@ -112,7 +112,7 @@ common::dataStructures::ArchiveFile OracleCatalogue::deleteArchiveFile(
tapeFile.vid = selectRset->columnString("VID");
tapeFile.fSeq = selectRset->columnUint64("FSEQ");
tapeFile.blockId = selectRset->columnUint64("BLOCK_ID");
tapeFile.compressedSize = selectRset->columnUint64("COMPRESSED_SIZE");
tapeFile.compressedSize = selectRset->columnUint64("COMPRESSED_SIZE_IN_BYTES");
tapeFile.copyNb = selectRset->columnUint64("COPY_NB");
tapeFile.creationTime = selectRset->columnUint64("TAPE_FILE_CREATION_TIME");
tapeFile.checksumType = archiveFile->checksumType; // Duplicated for convenience
......
......@@ -3281,7 +3281,7 @@ void RdbmsCatalogue::insertArchiveFile(rdbms::Conn &conn, const ArchiveFileRow &
"DISK_FILE_USER,"
"DISK_FILE_GROUP,"
"DISK_FILE_RECOVERY_BLOB,"
"FILE_SIZE,"
"SIZE_IN_BYTES,"
"CHECKSUM_TYPE,"
"CHECKSUM_VALUE,"
"STORAGE_CLASS_NAME,"
......@@ -3295,7 +3295,7 @@ void RdbmsCatalogue::insertArchiveFile(rdbms::Conn &conn, const ArchiveFileRow &
":DISK_FILE_USER,"
":DISK_FILE_GROUP,"
":DISK_FILE_RECOVERY_BLOB,"
":FILE_SIZE,"
":SIZE_IN_BYTES,"
":CHECKSUM_TYPE,"
":CHECKSUM_VALUE,"
":STORAGE_CLASS_NAME,"
......@@ -3310,7 +3310,7 @@ void RdbmsCatalogue::insertArchiveFile(rdbms::Conn &conn, const ArchiveFileRow &
stmt->bindString(":DISK_FILE_USER", row.diskFileUser);
stmt->bindString(":DISK_FILE_GROUP", row.diskFileGroup);
stmt->bindString(":DISK_FILE_RECOVERY_BLOB", row.diskFileRecoveryBlob);
stmt->bindUint64(":FILE_SIZE", row.size);
stmt->bindUint64(":SIZE_IN_BYTES", row.size);
stmt->bindString(":CHECKSUM_TYPE", row.checksumType);
stmt->bindString(":CHECKSUM_VALUE", row.checksumValue);
stmt->bindString(":STORAGE_CLASS_NAME", row.storageClassName);
......@@ -3419,7 +3419,7 @@ std::list<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveFilesFo
"ARCHIVE_FILE.DISK_FILE_USER AS DISK_FILE_USER,"
"ARCHIVE_FILE.DISK_FILE_GROUP AS DISK_FILE_GROUP,"
"ARCHIVE_FILE.DISK_FILE_RECOVERY_BLOB AS DISK_FILE_RECOVERY_BLOB,"
"ARCHIVE_FILE.FILE_SIZE AS FILE_SIZE,"
"ARCHIVE_FILE.SIZE_IN_BYTES AS SIZE_IN_BYTES,"
"ARCHIVE_FILE.CHECKSUM_TYPE AS CHECKSUM_TYPE,"
"ARCHIVE_FILE.CHECKSUM_VALUE AS CHECKSUM_VALUE,"
"ARCHIVE_FILE.STORAGE_CLASS_NAME AS STORAGE_CLASS_NAME,"
......@@ -3428,7 +3428,7 @@ std::list<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveFilesFo
"TAPE_FILE.VID AS VID,"
"TAPE_FILE.FSEQ AS FSEQ,"
"TAPE_FILE.BLOCK_ID AS BLOCK_ID,"
"TAPE_FILE.COMPRESSED_SIZE AS COMPRESSED_SIZE,"
"TAPE_FILE.COMPRESSED_SIZE_IN_BYTES AS COMPRESSED_SIZE_IN_BYTES,"
"TAPE_FILE.COPY_NB AS COPY_NB,"
"TAPE_FILE.CREATION_TIME AS TAPE_FILE_CREATION_TIME, "
"TAPE.TAPE_POOL_NAME AS TAPE_POOL_NAME "
......@@ -3535,7 +3535,7 @@ std::list<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveFilesFo
archiveFile.diskFileInfo.owner = rset->columnString("DISK_FILE_USER");
archiveFile.diskFileInfo.group = rset->columnString("DISK_FILE_GROUP");
archiveFile.diskFileInfo.recoveryBlob = rset->columnString("DISK_FILE_RECOVERY_BLOB");
archiveFile.fileSize = rset->columnUint64("FILE_SIZE");
archiveFile.fileSize = rset->columnUint64("SIZE_IN_BYTES");
archiveFile.checksumType = rset->columnString("CHECKSUM_TYPE");
archiveFile.checksumValue = rset->columnString("CHECKSUM_VALUE");
archiveFile.storageClass = rset->columnString("STORAGE_CLASS_NAME");
......@@ -3553,7 +3553,7 @@ std::list<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveFilesFo
tapeFile.vid = rset->columnString("VID");
tapeFile.fSeq = rset->columnUint64("FSEQ");
tapeFile.blockId = rset->columnUint64("BLOCK_ID");
tapeFile.compressedSize = rset->columnUint64("COMPRESSED_SIZE");
tapeFile.compressedSize = rset->columnUint64("COMPRESSED_SIZE_IN_BYTES");
tapeFile.copyNb = rset->columnUint64("COPY_NB");
tapeFile.creationTime = rset->columnUint64("TAPE_FILE_CREATION_TIME");
tapeFile.checksumType = archiveFile.checksumType; // Duplicated for convenience
......@@ -3577,8 +3577,8 @@ common::dataStructures::ArchiveFileSummary RdbmsCatalogue::getTapeFileSummary(
try {
std::string sql =
"SELECT "
"COALESCE(SUM(ARCHIVE_FILE.FILE_SIZE), 0) AS TOTAL_BYTES,"
"COALESCE(SUM(TAPE_FILE.COMPRESSED_SIZE), 0) AS TOTAL_COMPRESSED_BYTES,"
"COALESCE(SUM(ARCHIVE_FILE.SIZE_IN_BYTES), 0) AS TOTAL_BYTES,"
"COALESCE(SUM(TAPE_FILE.COMPRESSED_SIZE_IN_BYTES), 0) AS TOTAL_COMPRESSED_BYTES,"
"COUNT(ARCHIVE_FILE.ARCHIVE_FILE_ID) AS TOTAL_FILES "
"FROM "
"ARCHIVE_FILE "
......@@ -4265,7 +4265,7 @@ void RdbmsCatalogue::insertTapeFile(
"VID,"
"FSEQ,"
"BLOCK_ID,"
"COMPRESSED_SIZE,"
"COMPRESSED_SIZE_IN_BYTES,"
"COPY_NB,"
"CREATION_TIME,"
"ARCHIVE_FILE_ID)"
......@@ -4273,7 +4273,7 @@ void RdbmsCatalogue::insertTapeFile(
":VID,"
":FSEQ,"
":BLOCK_ID,"
":COMPRESSED_SIZE,"
":COMPRESSED_SIZE_IN_BYTES,"
":COPY_NB,"
":CREATION_TIME,"
":ARCHIVE_FILE_ID)";
......@@ -4282,7 +4282,7 @@ void RdbmsCatalogue::insertTapeFile(
stmt->bindString(":VID", tapeFile.vid);
stmt->bindUint64(":FSEQ", tapeFile.fSeq);
stmt->bindUint64(":BLOCK_ID", tapeFile.blockId);
stmt->bindUint64(":COMPRESSED_SIZE", tapeFile.compressedSize);
stmt->bindUint64(":COMPRESSED_SIZE_IN_BYTES", tapeFile.compressedSize);
stmt->bindUint64(":COPY_NB", tapeFile.copyNb);
stmt->bindUint64(":CREATION_TIME", now);
stmt->bindUint64(":ARCHIVE_FILE_ID", archiveFileId);
......@@ -4361,7 +4361,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveF
"ARCHIVE_FILE.DISK_FILE_USER AS DISK_FILE_USER,"
"ARCHIVE_FILE.DISK_FILE_GROUP AS DISK_FILE_GROUP,"
"ARCHIVE_FILE.DISK_FILE_RECOVERY_BLOB AS DISK_FILE_RECOVERY_BLOB,"
"ARCHIVE_FILE.FILE_SIZE AS FILE_SIZE,"
"ARCHIVE_FILE.SIZE_IN_BYTES AS SIZE_IN_BYTES,"
"ARCHIVE_FILE.CHECKSUM_TYPE AS CHECKSUM_TYPE,"
"ARCHIVE_FILE.CHECKSUM_VALUE AS CHECKSUM_VALUE,"
"ARCHIVE_FILE.STORAGE_CLASS_NAME AS STORAGE_CLASS_NAME,"
......@@ -4370,7 +4370,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveF
"TAPE_FILE.VID AS VID,"
"TAPE_FILE.FSEQ AS FSEQ,"
"TAPE_FILE.BLOCK_ID AS BLOCK_ID,"
"TAPE_FILE.COMPRESSED_SIZE AS COMPRESSED_SIZE,"
"TAPE_FILE.COMPRESSED_SIZE_IN_BYTES AS COMPRESSED_SIZE_IN_BYTES,"
"TAPE_FILE.COPY_NB AS COPY_NB,"
"TAPE_FILE.CREATION_TIME AS TAPE_FILE_CREATION_TIME "
"FROM "
......@@ -4394,7 +4394,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveF
archiveFile->diskFileInfo.owner = rset->columnString("DISK_FILE_USER");
archiveFile->diskFileInfo.group = rset->columnString("DISK_FILE_GROUP");
archiveFile->diskFileInfo.recoveryBlob = rset->columnString("DISK_FILE_RECOVERY_BLOB");
archiveFile->fileSize = rset->columnUint64("FILE_SIZE");
archiveFile->fileSize = rset->columnUint64("SIZE_IN_BYTES");
archiveFile->checksumType = rset->columnString("CHECKSUM_TYPE");
archiveFile->checksumValue = rset->columnString("CHECKSUM_VALUE");
archiveFile->storageClass = rset->columnString("STORAGE_CLASS_NAME");
......@@ -4409,7 +4409,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveF
tapeFile.vid = rset->columnString("VID");
tapeFile.fSeq = rset->columnUint64("FSEQ");
tapeFile.blockId = rset->columnUint64("BLOCK_ID");
tapeFile.compressedSize = rset->columnUint64("COMPRESSED_SIZE");
tapeFile.compressedSize = rset->columnUint64("COMPRESSED_SIZE_IN_BYTES");
tapeFile.copyNb = rset->columnUint64("COPY_NB");
tapeFile.creationTime = rset->columnUint64("TAPE_FILE_CREATION_TIME");
tapeFile.checksumType = archiveFile->checksumType; // Duplicated for convenience
......
......@@ -163,7 +163,7 @@ CREATE TABLE ARCHIVE_FILE(
DISK_FILE_USER VARCHAR2(100) NOT NULL,
DISK_FILE_GROUP VARCHAR2(100) NOT NULL,
DISK_FILE_RECOVERY_BLOB VARCHAR2(2000) NOT NULL,
FILE_SIZE INTEGER NOT NULL,
SIZE_IN_BYTES INTEGER NOT NULL,
CHECKSUM_TYPE VARCHAR2(100) NOT NULL,
CHECKSUM_VALUE VARCHAR2(100) NOT NULL,
STORAGE_CLASS_NAME VARCHAR2(100) NOT NULL,
......@@ -174,13 +174,13 @@ CREATE TABLE ARCHIVE_FILE(
REFERENCES STORAGE_CLASS(DISK_INSTANCE_NAME, STORAGE_CLASS_NAME)
);
CREATE TABLE TAPE_FILE(
VID VARCHAR2(100) NOT NULL,
FSEQ INTEGER NOT NULL,
BLOCK_ID INTEGER NOT NULL,
COMPRESSED_SIZE INTEGER NOT NULL,
COPY_NB INTEGER NOT NULL,
CREATION_TIME INTEGER NOT NULL,
ARCHIVE_FILE_ID INTEGER NOT NULL,
VID VARCHAR2(100) NOT NULL,
FSEQ INTEGER NOT NULL,
BLOCK_ID INTEGER NOT NULL,
COMPRESSED_SIZE_IN_BYTES INTEGER NOT NULL,
COPY_NB INTEGER NOT NULL,
CREATION_TIME INTEGER NOT NULL,
ARCHIVE_FILE_ID INTEGER NOT NULL,
CONSTRAINT TAPE_FILE_PK PRIMARY KEY(VID, FSEQ),
CONSTRAINT TAPE_FILE_TAPE_FK FOREIGN KEY(VID)
REFERENCES TAPE(VID),
......
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