reformat source code

according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
gm
2021-06-16 15:48:42 +08:00
committed by MizuhaHimuraki
parent 8c4a2f26a6
commit 4a92b6d7df
3314 changed files with 23131 additions and 23401 deletions

View File

@ -248,7 +248,7 @@ struct ObExecTimestamp {
};
class ObSchedInfo {
public:
public:
ObSchedInfo() : sched_info_(NULL), sched_info_len_(0)
{}
void reset()
@ -291,7 +291,7 @@ class ObSchedInfo {
return sched_info_len_;
}
private:
private:
char* sched_info_;
int64_t sched_info_len_;
};

View File

@ -31,7 +31,7 @@ class ObSql;
class ObPhysicalPlan;
class ObSQLSessionInfo;
class ObExecStatCollector {
public:
public:
ObExecStatCollector() : length_(0)
{}
~ObExecStatCollector()
@ -43,7 +43,7 @@ class ObExecStatCollector {
int get_extend_info(common::ObIAllocator& allocator, common::ObString& str);
void reset();
private:
private:
template <class T>
int add_stat(const T* value);
@ -55,25 +55,25 @@ class ObExecStatCollector {
};
class ObExecStatDispatch {
public:
public:
ObExecStatDispatch() : stat_str_(), pos_(0){};
~ObExecStatDispatch(){};
int set_extend_info(const common::ObString& str);
int dispatch(bool need_add_monitor, ObPhyPlanMonitorInfo* monitor_info, bool need_update_plan, ObPhysicalPlan* plan);
private:
private:
int get_next_type(StatType& type);
template <class T>
int get_value(T* value);
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObExecStatDispatch);
common::ObString stat_str_;
int64_t pos_;
};
class ObExecStatUtils {
public:
public:
template <class T>
OB_INLINE static void record_exec_timestamp(const T& process,
bool is_first, // fir execution, not retry
@ -105,7 +105,7 @@ class ObExecStatUtils {
// K(exec_timestamp.single_process_ts_));
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObExecStatUtils);
ObExecStatUtils();
~ObExecStatUtils();

View File

@ -17,7 +17,7 @@ namespace sql {
enum StatType { OB_INVALID_STAT_TYPE = 0, PLAN_MONITOR_INFO };
class ObIValue {
public:
public:
explicit ObIValue(StatType type)
{
value_type_ = type;
@ -29,7 +29,7 @@ class ObIValue {
return value_type_;
}
protected:
protected:
StatType value_type_;
};
} // namespace sql

View File

@ -17,7 +17,7 @@ namespace oceanbase {
namespace sql {
class ObMonitorInfoManager;
class ObMonitorInfoEliminationTask : public common::ObTimerTask {
public:
public:
ObMonitorInfoEliminationTask() : monitor_info_(NULL)
{}
~ObMonitorInfoEliminationTask()
@ -25,10 +25,10 @@ class ObMonitorInfoEliminationTask : public common::ObTimerTask {
int init(ObMonitorInfoManager* monitor_info);
virtual void runTimerTask();
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObMonitorInfoEliminationTask);
private:
private:
ObMonitorInfoManager* monitor_info_;
};

View File

@ -38,7 +38,7 @@ struct PlanKey {
class ObMonitorInfoManager {
friend class TestMonitorInfoManager_tets_duplicated_Test;
struct ReclainCond {
public:
public:
ReclainCond(int64_t curr_timestamp, int64_t max_remain_interval)
: curr_timestamp_(curr_timestamp), max_remain_interval_(max_remain_interval)
{}
@ -57,7 +57,7 @@ class ObMonitorInfoManager {
};
typedef common::ObRaQueue::Ref Ref;
public:
public:
ObMonitorInfoManager();
~ObMonitorInfoManager();
int init();
@ -102,7 +102,7 @@ class ObMonitorInfoManager {
static const int64_t OB_BATCH_GC_COUNT = 2000;
static const int64_t OB_MAX_PUSH_INTERVAL = 10 * 1000 * 1000;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObMonitorInfoManager);
void clear_queue(int64_t limit);
int reclain_map();
@ -111,7 +111,7 @@ class ObMonitorInfoManager {
max_push_interval_ = time;
}
private:
private:
common::ObConcurrentFIFOAllocator allocator_;
common::ObRaQueue slow_query_queue_;
common::ObTimer timer_; // for timing task for cleaning data.

View File

@ -49,7 +49,7 @@ static const MonitorName OB_OPERATOR_MONITOR_INFOS[] = {
class ObPhyOperatorMonitorInfo : public ObIValue {
OB_UNIS_VERSION(1);
public:
public:
ObPhyOperatorMonitorInfo();
virtual ~ObPhyOperatorMonitorInfo();
int set_operator_id(int64_t op_id);
@ -85,15 +85,15 @@ class ObPhyOperatorMonitorInfo : public ObIValue {
void increase_value(ObOperatorMonitorInfoIds index);
static const int64_t OB_MAX_INFORMATION_COUNT = MONITOR_INFO_END;
private:
private:
int64_t get_valid_info_count() const;
virtual bool is_timestamp(int64_t index) const;
protected:
protected:
int64_t op_id_;
int64_t job_id_; // Effective in distributed execution plan
int64_t task_id_; // Effective in distributed execution plan
private:
private:
ObPhyOperatorType op_type_;
uint64_t info_array_[OB_MAX_INFORMATION_COUNT];
};

View File

@ -27,7 +27,7 @@ namespace StatId {
enum StatId { INPUT_ROWS = 0, RESCAN_TIMES, OUTPUT_ROWS, MAX_STAT };
}
class ObPhyOperatorStats {
public:
public:
friend class TestPhyOperatorStats_init_Test;
friend class TestPhyOperatorStats_test_add_Test;
friend class TestPhyOperatorStats_test_accumulation_Test;
@ -52,7 +52,7 @@ class ObPhyOperatorStats {
return execution_times_;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObPhyOperatorStats);
int64_t* op_stats_array_;
int64_t op_count_;

View File

@ -52,7 +52,7 @@ static const MonitorName OB_PLAN_MONITOR_INFOS[] = {
{MAX_EVENT_ID, "max_event"}};
class ObPhyPlanExecInfo final : public ObPhyOperatorMonitorInfo {
public:
public:
ObPhyPlanExecInfo()
{}
inline virtual int64_t print_info(char* buf, int64_t buf_len) const;
@ -63,7 +63,7 @@ class ObPhyPlanExecInfo final : public ObPhyOperatorMonitorInfo {
return print_info(buf, buf_len);
}
private:
private:
void set_value(ObPlanMonitorInfoIds index, int64_t value)
{
plan_info_array_[index] = value;
@ -74,7 +74,7 @@ class ObPhyPlanExecInfo final : public ObPhyOperatorMonitorInfo {
}
DISALLOW_COPY_AND_ASSIGN(ObPhyPlanExecInfo);
private:
private:
common::ObWaitEventDesc max_wait_event_;
int64_t plan_info_array_[MAX_EVENT_ID];
};

View File

@ -21,10 +21,10 @@
namespace oceanbase {
namespace sql {
class ObPhyPlanMonitorInfo final {
public:
public:
OB_UNIS_VERSION(1);
public:
public:
const static int OPERATOR_LOCAL_COUNT = 8;
explicit ObPhyPlanMonitorInfo(common::ObConcurrentFIFOAllocator& allocator);
virtual void destroy()
@ -107,10 +107,10 @@ class ObPhyPlanMonitorInfo final {
return scheduler_addr_;
}
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObPhyPlanMonitorInfo);
private:
private:
common::ObConcurrentFIFOAllocator& allocator_;
int64_t request_id_;
common::ObAddr scheduler_addr_;