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

@ -20,7 +20,7 @@ namespace oceanbase {
namespace share {
class ObFakePartitionKey {
public:
public:
uint64_t table_id_;
int64_t partition_id_;
inline int64_t hash() const
@ -34,7 +34,7 @@ class ObFakePartitionKey {
};
class ObFakePartitionLocationCache : public ObPartitionLocationCache {
public:
public:
ObFakePartitionLocationCache(ObILocationFetcher& location_fetcher);
virtual ~ObFakePartitionLocationCache();
@ -44,7 +44,7 @@ class ObFakePartitionLocationCache : public ObPartitionLocationCache {
int add_location(ObFakePartitionKey key, ObPartitionLocation location);
private:
private:
common::hash::ObHashMap<ObFakePartitionKey, ObPartitionLocation> partition_loc_map_;
DISALLOW_COPY_AND_ASSIGN(ObFakePartitionLocationCache);
};

View File

@ -23,7 +23,7 @@ namespace oceanbase {
namespace sql {
class ObFakeTableScanIterator : public common::ObNewRowIterator {
public:
public:
ObFakeTableScanIterator() : col_num_(0)
{}
virtual ~ObFakeTableScanIterator()
@ -42,18 +42,18 @@ class ObFakeTableScanIterator : public common::ObNewRowIterator {
col_num_ = col_num;
}
private:
private:
common::ObRowStore::Iterator row_store_it_;
int64_t col_num_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObFakeTableScanIterator);
};
} // namespace sql
namespace storage {
class ObFakePartitionServiceForSQL : public oceanbase::storage::ObPartitionService {
public:
public:
ObFakePartitionServiceForSQL();
virtual ~ObFakePartitionServiceForSQL();
virtual int init(const blocksstable::ObStorageEnv& env, const common::ObAddr& self_addr,
@ -1298,21 +1298,21 @@ class ObFakePartitionServiceForSQL : public oceanbase::storage::ObPartitionServi
return OB_SUCCESS;
}
private:
private:
common::ObScanner scanner_;
int64_t col_num_;
obrpc::ObCommonRpcProxy* rs_rpc_proxy_;
ObPartitionServiceRpc* pts_rpc_;
ObAddr addr_;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObFakePartitionServiceForSQL);
};
class ObFakePartitionServiceForGI : public ObFakePartitionServiceForSQL {
public:
public:
class ObGIResult {
public:
public:
ObGIResult() : macros_count_idx_(), pkeys_(), macros_count_(){};
virtual ~ObGIResult() = default;
int macros_count_idx_;
@ -1321,7 +1321,7 @@ class ObFakePartitionServiceForGI : public ObFakePartitionServiceForSQL {
TO_STRING_KV(K(macros_count_), K(pkeys_));
};
public:
public:
ObFakePartitionServiceForGI() : ObFakePartitionServiceForSQL(), result_set_(), case_idx_(), pkey_idx_()
{}
virtual ~ObFakePartitionServiceForGI() = default;
@ -1330,13 +1330,13 @@ class ObFakePartitionServiceForGI : public ObFakePartitionServiceForSQL {
const int64_t* total_task_count, ObIArray<common::ObStoreRange>* splitted_ranges,
common::ObIArray<int64_t>* split_index) override;
private:
private:
DISALLOW_COPY_AND_ASSIGN(ObFakePartitionServiceForGI);
public:
public:
ObSEArray<ObGIResult, 32> result_set_;
private:
private:
int case_idx_;
int pkey_idx_;
};

View File

@ -38,7 +38,7 @@ using namespace oceanbase::share::schema;
array.push_back(item)
class ObGiPumpTest : public ::testing::Test {
public:
public:
const static int64_t TEST_PARTITION_COUNT = 5;
const static int64_t TEST_SPLIT_TASK_COUNT = 8;
@ -48,12 +48,12 @@ class ObGiPumpTest : public ::testing::Test {
virtual void TearDown();
void TestGISplitTaskCase(int64_t case_idx);
private:
private:
// disallow copy
ObGiPumpTest(const ObGiPumpTest& other);
ObGiPumpTest& operator=(const ObGiPumpTest& other);
public:
public:
// data members
ObSEArray<ObPartitionArray, 32> pkeys_array_;
ObFakePartitionServiceForGI partition_service_;

View File

@ -29,27 +29,27 @@ using namespace oceanbase::common;
using namespace oceanbase::sql::dtl;
class ObMergeSortReceiveTest : public ::testing::Test {
public:
public:
void test_sort(int64_t n_channel, bool local_order, int64_t row_count);
int mock_channel_loop(
ObPxMergeSortReceive::ObPxMergeSortReceiveCtx* recv_ctx, int64_t n_channel, int64_t row_count, bool local_order);
int init_merge_sort_input(ObExecContext& ctx, ObPxMergeSortReceive::ObPxMergeSortReceiveCtx* recv_ctx,
ObPxMergeSortReceive& merge_sort_receive, int64_t n_channel);
private:
private:
int init_open(ObExecContext& ctx, ObPxMergeSortReceive& merge_sort_receive, int64_t n_channel, int64_t row_count,
bool local_order);
};
class ObMockPxNewRow : public ObPxNewRow {
public:
public:
ObMockPxNewRow(int64_t count, bool local_order, int64_t n_channel)
: count_(count), local_order_(local_order), cur_(0), n_channel_(n_channel)
{}
~ObMockPxNewRow() = default;
virtual int get_row(ObNewRow& row);
private:
private:
int64_t count_;
bool local_order_;
int64_t cur_;
@ -57,7 +57,7 @@ class ObMockPxNewRow : public ObPxNewRow {
};
class ObMockChannelLoop : public ObDtlChannelLoop {
public:
public:
ObMockChannelLoop(int64_t n_channel) : n_channel_(n_channel), nth_process_channel_(0)
{}
~ObMockChannelLoop() = default;
@ -65,7 +65,7 @@ class ObMockChannelLoop : public ObDtlChannelLoop {
virtual int process_one(int64_t& nth_channel, int64_t timeout);
virtual int process_one_if(PredFunc pred, int64_t timeout, int64_t& nth_channel);
private:
private:
int64_t n_channel_;
int64_t nth_process_channel_;
};

View File

@ -27,7 +27,7 @@ using namespace oceanbase::share;
using namespace oceanbase::share::schema;
class ObRandomAffiTaskSplitTest : public ::testing::Test {
public:
public:
const static int64_t TEST_PARTITION_COUNT = 5;
const static int64_t TEST_SPLIT_TASK_COUNT = 8;
@ -36,7 +36,7 @@ class ObRandomAffiTaskSplitTest : public ::testing::Test {
virtual void SetUp(){};
virtual void TearDown(){};
private:
private:
// disallow copy
ObRandomAffiTaskSplitTest(const ObRandomAffiTaskSplitTest& other);
ObRandomAffiTaskSplitTest& operator=(const ObRandomAffiTaskSplitTest& other);