1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -23,56 +23,54 @@
#include "bytestream.h"
#include "bytestreampool.h"
namespace idbdatafile
namespace idbdatafile
{
class SMComm : public boost::noncopyable
{
public:
// This is a singleton. Get it with get()
static SMComm *get();
/* Open currently returns a stat struct so SMDataFile can set its initial position, otherwise
behaves how you'd think. */
int open(const std::string &filename, const int mode, struct stat *statbuf);
ssize_t pread(const std::string &filename, void *buf, const size_t count, const off_t offset);
ssize_t pwrite(const std::string &filename, const void *buf, const size_t count, const off_t offset);
/* append exists for cases where the file is open in append mode. A normal write won't work
because the file position/size may be out of date if there are multiple writers. */
ssize_t append(const std::string &filename, const void *buf, const size_t count);
int unlink(const std::string &filename);
int stat(const std::string &filename, struct stat *statbuf);
// added this one because it should be trivial to implement in SM, and prevents a large
// operation in SMDataFile.
int truncate(const std::string &filename, const off64_t length);
int listDirectory(const std::string &path, std::list<std::string> *entries);
// health indicator. 0 = processes are talking to each other and SM has read/write access to
// the specified S3 bucket. Need to define specific error codes.
int ping();
int sync();
public:
// This is a singleton. Get it with get()
static SMComm* get();
int copyFile(const std::string &file1, const std::string &file2);
virtual ~SMComm();
private:
SMComm();
std::string getAbsFilename(const std::string &filename);
SocketPool sockets;
messageqcpp::ByteStreamPool buffers;
std::string cwd;
/* Open currently returns a stat struct so SMDataFile can set its initial position, otherwise
behaves how you'd think. */
int open(const std::string& filename, const int mode, struct stat* statbuf);
ssize_t pread(const std::string& filename, void* buf, const size_t count, const off_t offset);
ssize_t pwrite(const std::string& filename, const void* buf, const size_t count, const off_t offset);
/* append exists for cases where the file is open in append mode. A normal write won't work
because the file position/size may be out of date if there are multiple writers. */
ssize_t append(const std::string& filename, const void* buf, const size_t count);
int unlink(const std::string& filename);
int stat(const std::string& filename, struct stat* statbuf);
// added this one because it should be trivial to implement in SM, and prevents a large
// operation in SMDataFile.
int truncate(const std::string& filename, const off64_t length);
int listDirectory(const std::string& path, std::list<std::string>* entries);
// health indicator. 0 = processes are talking to each other and SM has read/write access to
// the specified S3 bucket. Need to define specific error codes.
int ping();
int sync();
int copyFile(const std::string& file1, const std::string& file2);
virtual ~SMComm();
private:
SMComm();
std::string getAbsFilename(const std::string& filename);
SocketPool sockets;
messageqcpp::ByteStreamPool buffers;
std::string cwd;
};
}
} // namespace idbdatafile