You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Fixed some linker errors, integrated the cloudio factory
into idbfactory.
This commit is contained in:
@ -67,6 +67,14 @@ SMComm * SMComm::get()
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SMComm::SMComm()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
SMComm::~SMComm()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
int SMComm::open(const string &filename, const int mode, struct stat *statbuf)
|
int SMComm::open(const string &filename, const int mode, struct stat *statbuf)
|
||||||
{
|
{
|
||||||
ByteStream *command = buffers.getByteStream();
|
ByteStream *command = buffers.getByteStream();
|
||||||
|
@ -24,6 +24,10 @@ using namespace std;
|
|||||||
namespace idbdatafile
|
namespace idbdatafile
|
||||||
{
|
{
|
||||||
|
|
||||||
|
SMDataFile::~SMDataFile()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
SMDataFile::SMDataFile(const char *name, int _openmode, const struct stat &_stat) :
|
SMDataFile::SMDataFile(const char *name, int _openmode, const struct stat &_stat) :
|
||||||
IDBDataFile(name)
|
IDBDataFile(name)
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,11 @@ SMFileSystem::SMFileSystem() : IDBFileSystem(IDBFileSystem::CLOUD)
|
|||||||
SMComm::get(); // get SMComm running
|
SMComm::get(); // get SMComm running
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMFileSystem::mkdir(const char *path) const
|
SMFileSystem::~SMFileSystem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
int SMFileSystem::mkdir(const char *path)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -53,13 +57,13 @@ off64_t SMFileSystem::compressedSize(const char *filename) const
|
|||||||
throw NotImplementedYet(__func__);
|
throw NotImplementedYet(__func__);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMFileSystem::remove(const char *filename) const
|
int SMFileSystem::remove(const char *filename)
|
||||||
{
|
{
|
||||||
SMComm *comm = SMComm::get();
|
SMComm *comm = SMComm::get();
|
||||||
return comm->unlink(filename);
|
return comm->unlink(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMFileSystem::rename(const char *oldFile, const char *newFile) const
|
int SMFileSystem::rename(const char *oldFile, const char *newFile)
|
||||||
{
|
{
|
||||||
// This will actually be pretty expensive to do b/c we store the filename in
|
// This will actually be pretty expensive to do b/c we store the filename in
|
||||||
// the key in cloud. If we do this a lot, we'll have to implement copy() in the SM.
|
// the key in cloud. If we do this a lot, we'll have to implement copy() in the SM.
|
||||||
|
@ -33,11 +33,12 @@ class SMFileSystem : public IDBFileSystem, boost::noncopyable
|
|||||||
SMFileSystem();
|
SMFileSystem();
|
||||||
virtual ~SMFileSystem();
|
virtual ~SMFileSystem();
|
||||||
|
|
||||||
int mkdir(const char* pathname) const;
|
// why are some of these const and some not const in IDBFileSystem?
|
||||||
|
int mkdir(const char* pathname);
|
||||||
off64_t size(const char* path) const;
|
off64_t size(const char* path) const;
|
||||||
off64_t compressedSize(const char* path) const;
|
off64_t compressedSize(const char* path) const;
|
||||||
int remove(const char* pathname) const;
|
int remove(const char* pathname);
|
||||||
int rename(const char* oldpath, const char* newpath) const;
|
int rename(const char* oldpath, const char* newpath);
|
||||||
bool exists(const char* pathname) const;
|
bool exists(const char* pathname) const;
|
||||||
int listDirectory(const char* pathname, std::list<std::string>& contents) const;
|
int listDirectory(const char* pathname, std::list<std::string>& contents) const;
|
||||||
bool isDir(const char* pathname) const;
|
bool isDir(const char* pathname) const;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
include_directories( ${ENGINE_COMMON_INCLUDES} )
|
include_directories( ${ENGINE_COMMON_INCLUDES} ../cloudio)
|
||||||
|
|
||||||
|
|
||||||
########### next target ###############
|
########### next target ###############
|
||||||
|
|
||||||
@ -16,7 +15,7 @@ set(idbdatafile_LIB_SRCS
|
|||||||
|
|
||||||
add_library(idbdatafile SHARED ${idbdatafile_LIB_SRCS})
|
add_library(idbdatafile SHARED ${idbdatafile_LIB_SRCS})
|
||||||
|
|
||||||
target_link_libraries(idbdatafile ${NETSNMP_LIBRARIES})
|
target_link_libraries(idbdatafile ${NETSNMP_LIBRARIES} cloudio)
|
||||||
|
|
||||||
set_target_properties(idbdatafile PROPERTIES VERSION 1.0.0 SOVERSION 1)
|
set_target_properties(idbdatafile PROPERTIES VERSION 1.0.0 SOVERSION 1)
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
#include "BufferedFileFactory.h"
|
#include "BufferedFileFactory.h"
|
||||||
#include "UnbufferedFileFactory.h"
|
#include "UnbufferedFileFactory.h"
|
||||||
#include "PosixFileSystem.h"
|
#include "PosixFileSystem.h"
|
||||||
|
#include "SMFileSystem.h"
|
||||||
|
#include "SMFileFactory.h"
|
||||||
#include "IDBLogger.h"
|
#include "IDBLogger.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -50,6 +52,7 @@ bool IDBFactory::installDefaultPlugins()
|
|||||||
|
|
||||||
s_plugins[IDBDataFile::BUFFERED] = FileFactoryEnt(IDBDataFile::BUFFERED, "buffered", new BufferedFileFactory(), new PosixFileSystem());
|
s_plugins[IDBDataFile::BUFFERED] = FileFactoryEnt(IDBDataFile::BUFFERED, "buffered", new BufferedFileFactory(), new PosixFileSystem());
|
||||||
s_plugins[IDBDataFile::UNBUFFERED] = FileFactoryEnt(IDBDataFile::UNBUFFERED, "unbuffered", new UnbufferedFileFactory(), new PosixFileSystem());
|
s_plugins[IDBDataFile::UNBUFFERED] = FileFactoryEnt(IDBDataFile::UNBUFFERED, "unbuffered", new UnbufferedFileFactory(), new PosixFileSystem());
|
||||||
|
s_plugins[IDBDataFile::CLOUD] = FileFactoryEnt(IDBDataFile::CLOUD, "cloud", new SMFileFactory(), new SMFileSystem());
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user