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

Reformat all code to coding standard

This commit is contained in:
Andrew Hutchings
2017-10-26 17:18:17 +01:00
parent 4985f3456e
commit 01446d1e22
1296 changed files with 403852 additions and 353747 deletions

View File

@ -61,64 +61,68 @@ class RedistributeControl;
class RedistributeControlThread
{
public:
RedistributeControlThread(uint32_t act);
~RedistributeControlThread();
public:
RedistributeControlThread(uint32_t act);
~RedistributeControlThread();
int handleJobMsg(RedistributeMsgHeader&, messageqcpp::ByteStream&, messageqcpp::IOSocket&);
int handleJobMsg(RedistributeMsgHeader&, messageqcpp::ByteStream&, messageqcpp::IOSocket&);
void operator()();
void operator()();
// used by control to change status
static void setStopAction(bool);
// used by control to change status
static void setStopAction(bool);
private:
// struct for sort partitions
struct PartitionInfo
{
int32_t dbroot;
int32_t partition;
private:
// struct for sort partitions
struct PartitionInfo
{
int32_t dbroot;
int32_t partition;
PartitionInfo() : dbroot(0), partition(0) {}
PartitionInfo(int32_t d, int32_t p) : dbroot(d), partition(p) {}
PartitionInfo() : dbroot(0), partition(0) {}
PartitionInfo(int32_t d, int32_t p) : dbroot(d), partition(p) {}
bool operator < (const struct PartitionInfo& rhs) const
{ return ((dbroot < rhs.dbroot) || (dbroot == rhs.dbroot && partition < rhs.partition)); }
bool operator == (const struct PartitionInfo& rhs) const
{ return (dbroot == rhs.dbroot && partition == rhs.partition); }
bool operator < (const struct PartitionInfo& rhs) const
{
return ((dbroot < rhs.dbroot) || (dbroot == rhs.dbroot && partition < rhs.partition));
}
};
bool operator == (const struct PartitionInfo& rhs) const
{
return (dbroot == rhs.dbroot && partition == rhs.partition);
}
void doRedistribute();
void doStopAction();
};
int setup();
int makeRedistributePlan();
int executeRedistributePlan();
void doRedistribute();
void doStopAction();
int connectToWes(int);
void dumpPlanToFile(uint64_t, vector<PartitionInfo>&, int);
void displayPlan();
int setup();
int makeRedistributePlan();
int executeRedistributePlan();
uint32_t fAction;
oam::OamCache* fOamCache;
config::Config* fConfig;
boost::shared_ptr<messageqcpp::MessageQueueClient> fMsgQueueClient;
int connectToWes(int);
void dumpPlanToFile(uint64_t, vector<PartitionInfo>&, int);
void displayPlan();
std::set<int> fSourceSet;
std::set<int> fTargetSet;
std::set<int> fDbrootSet; // Union of fSourceSet and fTargetSet
int fMaxDbroot;
uint32_t fEntryCount;
std::string fErrorMsg;
int32_t fErrorCode;
uint32_t fAction;
oam::OamCache* fOamCache;
config::Config* fConfig;
boost::shared_ptr<messageqcpp::MessageQueueClient> fMsgQueueClient;
RedistributeControl* fControl;
std::set<int> fSourceSet;
std::set<int> fTargetSet;
std::set<int> fDbrootSet; // Union of fSourceSet and fTargetSet
int fMaxDbroot;
uint32_t fEntryCount;
std::string fErrorMsg;
int32_t fErrorCode;
static boost::mutex fActionMutex;
static volatile bool fStopAction;
static std::string fWesInUse;
RedistributeControl* fControl;
static boost::mutex fActionMutex;
static volatile bool fStopAction;
static std::string fWesInUse;
};