1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-12-18 13:54:11 +03:00

Implemented IOC::open() + updated unit test

This commit is contained in:
Patrick LeBlanc
2019-03-28 16:05:18 -05:00
parent a2897e593a
commit 9be168eb64
4 changed files with 62 additions and 32 deletions

View File

@@ -8,6 +8,7 @@
#include "SMLogging.h"
#include <string>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdint.h>
#include <vector>
#include <iostream>
@@ -32,8 +33,9 @@ class MetadataFile
MetadataFile(const char* filename, no_create_t); // this one won't create it if it doesn't exist
~MetadataFile();
bool exists();
bool exists() const;
void printObjects();
int stat(struct stat *) const;
// returns the objects needed to update
std::vector<metadataObject> metadataRead(off_t offset, size_t length);
// updates the metadatafile with new object
@@ -55,12 +57,12 @@ class MetadataFile
private:
Config *mpConfig;
std::string prefix;
SMLogging *mpLogger;
int mVersion;
int mRevision;
size_t mObjectSize;
std::string msMetadataPath;
std::string mFilename;
std::set<metadataObject> mObjects;
bool _exists;
//vector<metadataObject> mObjects;