You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
clang format apply
This commit is contained in:
@ -16,8 +16,8 @@
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/*
|
||||
* $Id: we_redistributeworkerthread.h 4450 2013-01-21 14:13:24Z rdempsey $
|
||||
*/
|
||||
* $Id: we_redistributeworkerthread.h 4450 2013-01-21 14:13:24Z rdempsey $
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
#include "brmtypes.h"
|
||||
#include "we_redistributedef.h"
|
||||
|
||||
|
||||
// forward reference
|
||||
namespace config
|
||||
{
|
||||
@ -54,104 +53,92 @@ namespace messageqcpp
|
||||
{
|
||||
class ByteStream;
|
||||
class IOSocket;
|
||||
}
|
||||
} // namespace messageqcpp
|
||||
|
||||
namespace messagequeue
|
||||
{
|
||||
class MessageQueueClient;
|
||||
}
|
||||
|
||||
|
||||
namespace redistribute
|
||||
{
|
||||
|
||||
|
||||
class RedistributeWorkerThread
|
||||
{
|
||||
public:
|
||||
RedistributeWorkerThread(messageqcpp::ByteStream& bs, messageqcpp::IOSocket& ios);
|
||||
~RedistributeWorkerThread();
|
||||
public:
|
||||
RedistributeWorkerThread(messageqcpp::ByteStream& bs, messageqcpp::IOSocket& ios);
|
||||
~RedistributeWorkerThread();
|
||||
|
||||
void operator()();
|
||||
void operator()();
|
||||
|
||||
private:
|
||||
private:
|
||||
void handleRequest();
|
||||
void handleStop();
|
||||
void handleData();
|
||||
void handleUnknowJobMsg();
|
||||
|
||||
void handleRequest();
|
||||
void handleStop();
|
||||
void handleData();
|
||||
void handleUnknowJobMsg();
|
||||
int setup();
|
||||
int grabTableLock();
|
||||
int buildEntryList();
|
||||
int sendData();
|
||||
int connectToWes(int);
|
||||
int updateDbrm();
|
||||
void confirmToPeer();
|
||||
bool checkDataTransferAck(messageqcpp::SBS&, size_t);
|
||||
|
||||
int setup();
|
||||
int grabTableLock();
|
||||
int buildEntryList();
|
||||
int sendData();
|
||||
int connectToWes(int);
|
||||
int updateDbrm();
|
||||
void confirmToPeer();
|
||||
bool checkDataTransferAck(messageqcpp::SBS&, size_t);
|
||||
void sendResponse(uint32_t);
|
||||
|
||||
void sendResponse(uint32_t);
|
||||
void doAbort();
|
||||
|
||||
void doAbort();
|
||||
void handleDataInit();
|
||||
void handleDataStart(messageqcpp::SBS&, size_t&);
|
||||
void handleDataCont(messageqcpp::SBS&, size_t&);
|
||||
void handleDataFinish(messageqcpp::SBS&, size_t&);
|
||||
void handleDataCommit(messageqcpp::SBS&, size_t&);
|
||||
void handleDataAbort(messageqcpp::SBS&, size_t&);
|
||||
void handleUnknowDataMsg();
|
||||
|
||||
void handleDataInit();
|
||||
void handleDataStart(messageqcpp::SBS&, size_t&);
|
||||
void handleDataCont(messageqcpp::SBS&, size_t&);
|
||||
void handleDataFinish(messageqcpp::SBS&, size_t&);
|
||||
void handleDataCommit(messageqcpp::SBS&, size_t&);
|
||||
void handleDataAbort(messageqcpp::SBS&, size_t&);
|
||||
void handleUnknowDataMsg();
|
||||
int buildFullHdfsPath(std::map<int, std::string>& rootToPathMap, int64_t colOid, int16_t dbRoot,
|
||||
uint32_t partition, int16_t segment, std::string& fullFileName);
|
||||
|
||||
int buildFullHdfsPath( std::map<int, std::string>& rootToPathMap,
|
||||
int64_t colOid,
|
||||
int16_t dbRoot,
|
||||
uint32_t partition,
|
||||
int16_t segment,
|
||||
std::string& fullFileName);
|
||||
void closeFile(FILE*); // for tracing, may remove later.
|
||||
void addToDirSet(const char*, bool);
|
||||
void logMessage(const std::string&, int);
|
||||
|
||||
void closeFile(FILE*); // for tracing, may remove later.
|
||||
void addToDirSet(const char*, bool);
|
||||
void logMessage(const std::string&, int);
|
||||
oam::OamCache* fOamCache;
|
||||
config::Config* fConfig;
|
||||
boost::shared_ptr<messageqcpp::MessageQueueClient> fMsgQueueClient;
|
||||
|
||||
oam::OamCache* fOamCache;
|
||||
config::Config* fConfig;
|
||||
boost::shared_ptr<messageqcpp::MessageQueueClient> fMsgQueueClient;
|
||||
RedistributeMsgHeader fMsgHeader;
|
||||
messageqcpp::ByteStream& fBs;
|
||||
messageqcpp::IOSocket& fIOSocket;
|
||||
RedistributePlanEntry fPlanEntry;
|
||||
uint64_t fTableLockId;
|
||||
int32_t fErrorCode;
|
||||
std::string fErrorMsg;
|
||||
std::pair<int, int> fMyId; // <dbroot, pmid>
|
||||
std::pair<int, int> fPeerId; // <dbroot, pmid>
|
||||
std::set<int16_t> fSegments;
|
||||
std::vector<int64_t> fOids; // column oids
|
||||
std::vector<BRM::BulkUpdateDBRootArg> fUpdateRtEntries; // for dbrm update
|
||||
std::vector<BRM::BulkSetHWMArg> fUpdateHwmEntries; // for dbrm update
|
||||
|
||||
RedistributeMsgHeader fMsgHeader;
|
||||
messageqcpp::ByteStream& fBs;
|
||||
messageqcpp::IOSocket& fIOSocket;
|
||||
RedistributePlanEntry fPlanEntry;
|
||||
uint64_t fTableLockId;
|
||||
int32_t fErrorCode;
|
||||
std::string fErrorMsg;
|
||||
std::pair<int, int> fMyId; // <dbroot, pmid>
|
||||
std::pair<int, int> fPeerId; // <dbroot, pmid>
|
||||
std::set<int16_t> fSegments;
|
||||
std::vector<int64_t> fOids; // column oids
|
||||
std::vector<BRM::BulkUpdateDBRootArg> fUpdateRtEntries; // for dbrm update
|
||||
std::vector<BRM::BulkSetHWMArg> fUpdateHwmEntries; // for dbrm update
|
||||
FILE* fNewFilePtr;
|
||||
FILE* fOldFilePtr;
|
||||
std::set<std::string> fNewDirSet;
|
||||
std::set<std::string> fOldDirSet;
|
||||
boost::shared_array<char> fWriteBuffer;
|
||||
|
||||
FILE* fNewFilePtr;
|
||||
FILE* fOldFilePtr;
|
||||
std::set<std::string> fNewDirSet;
|
||||
std::set<std::string> fOldDirSet;
|
||||
boost::shared_array<char> fWriteBuffer;
|
||||
boost::shared_ptr<BRM::DBRM> fDbrm;
|
||||
|
||||
boost::shared_ptr<BRM::DBRM> fDbrm;
|
||||
// for segment file # workaround
|
||||
// uint64_t fSegPerRoot;
|
||||
|
||||
// for segment file # workaround
|
||||
//uint64_t fSegPerRoot;
|
||||
|
||||
|
||||
static boost::mutex fActionMutex;
|
||||
static volatile bool fStopAction;
|
||||
static volatile bool fCommitted;
|
||||
static std::string fWesInUse;
|
||||
static boost::mutex fActionMutex;
|
||||
static volatile bool fStopAction;
|
||||
static volatile bool fCommitted;
|
||||
static std::string fWesInUse;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
} // namespace redistribute
|
||||
|
||||
// vim:ts=4 sw=4:
|
||||
|
||||
|
Reference in New Issue
Block a user