reformat source code
according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
@ -102,7 +102,7 @@ int alloc_key(BtreeKey*& ret_key, int64_t key)
|
||||
}
|
||||
|
||||
class FakeAllocator : public ObIAllocator {
|
||||
public:
|
||||
public:
|
||||
void* alloc(int64_t size)
|
||||
{
|
||||
return ob_malloc(size, attr);
|
||||
|
@ -23,7 +23,7 @@ using namespace oceanbase::common;
|
||||
using namespace oceanbase::memtable;
|
||||
|
||||
class ObMockTransCallback : public ObITransCallback {
|
||||
public:
|
||||
public:
|
||||
ObMockTransCallback(ObMemtable* mt) : fake_mt_(mt)
|
||||
{}
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace unittest {
|
||||
#include "strutils.h"
|
||||
typedef ObSEArray<share::schema::ObColDesc, 64> ColDescArray;
|
||||
class ColDescBuilder {
|
||||
public:
|
||||
public:
|
||||
const ColDescArray& get_columns() const
|
||||
{
|
||||
return columns_;
|
||||
@ -40,12 +40,12 @@ class ColDescBuilder {
|
||||
columns_.push_back(col_desc);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ColDescArray columns_;
|
||||
};
|
||||
|
||||
class RowIterBuilder {
|
||||
public:
|
||||
public:
|
||||
enum { MAX_ROWKEY_OBJ = 64 };
|
||||
RowIterBuilder(const ColDescArray& cols) : cols_(cols)
|
||||
{}
|
||||
@ -70,7 +70,7 @@ class RowIterBuilder {
|
||||
return obj_array_;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
static int parse_obj(ObObj& obj, const char* val)
|
||||
{
|
||||
int err = OB_SUCCESS;
|
||||
@ -78,7 +78,7 @@ class RowIterBuilder {
|
||||
return err;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
const ColDescArray& cols_;
|
||||
ObObj obj_array_[MAX_ROWKEY_OBJ];
|
||||
ObMtRowIterator iter_;
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
class Printer {
|
||||
public:
|
||||
public:
|
||||
enum { MAX_BUF_SIZE = 4096 };
|
||||
Printer() : limit_(MAX_BUF_SIZE), pos_(0)
|
||||
{
|
||||
@ -60,14 +60,14 @@ class Printer {
|
||||
return src;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
char buf_[MAX_BUF_SIZE];
|
||||
int64_t limit_;
|
||||
int64_t pos_;
|
||||
};
|
||||
|
||||
class Tokenizer {
|
||||
public:
|
||||
public:
|
||||
Tokenizer(char* str, const char* delim) : str_(str), delim_(delim), saveptr_(NULL)
|
||||
{}
|
||||
~Tokenizer()
|
||||
@ -83,7 +83,7 @@ class Tokenizer {
|
||||
return ret;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
char* str_;
|
||||
const char* delim_;
|
||||
char* saveptr_;
|
||||
|
@ -60,7 +60,7 @@ struct Callable {
|
||||
|
||||
typedef void* (*pthread_handler_t)(void*);
|
||||
class BaseWorker {
|
||||
public:
|
||||
public:
|
||||
static const int64_t MAX_N_THREAD = 16;
|
||||
struct WorkContext {
|
||||
WorkContext() : callable_(NULL), idx_(0)
|
||||
@ -78,7 +78,7 @@ class BaseWorker {
|
||||
int64_t idx_;
|
||||
};
|
||||
|
||||
public:
|
||||
public:
|
||||
BaseWorker() : n_thread_(0), thread_running_(false)
|
||||
{}
|
||||
~BaseWorker()
|
||||
@ -86,7 +86,7 @@ class BaseWorker {
|
||||
wait();
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
BaseWorker& set_thread_num(int64_t n)
|
||||
{
|
||||
n_thread_ = n;
|
||||
@ -150,7 +150,7 @@ class BaseWorker {
|
||||
return err;
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
int64_t n_thread_;
|
||||
bool thread_running_;
|
||||
WorkContext ctx_[MAX_N_THREAD];
|
||||
@ -214,13 +214,13 @@ class RWT : public Callable {
|
||||
int64_t idx_;
|
||||
};
|
||||
|
||||
public:
|
||||
public:
|
||||
RWT() : n_read_thread_(0), n_write_thread_(0), n_admin_thread_(0)
|
||||
{}
|
||||
virtual ~RWT()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
int64_t get_thread_num()
|
||||
{
|
||||
return 1 + n_read_thread_ + n_write_thread_ + n_admin_thread_;
|
||||
@ -296,7 +296,7 @@ class RWT : public Callable {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
int64_t n_read_thread_;
|
||||
int64_t n_write_thread_;
|
||||
int64_t n_admin_thread_;
|
||||
@ -354,13 +354,13 @@ struct BaseConfig {
|
||||
};
|
||||
|
||||
class FixedAllocator : public ObIAllocator {
|
||||
public:
|
||||
public:
|
||||
FixedAllocator(char* buf, int64_t limit) : buf_(buf), limit_(limit), pos_(0)
|
||||
{}
|
||||
virtual ~FixedAllocator()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
void reset()
|
||||
{
|
||||
pos_ = 0;
|
||||
@ -381,7 +381,7 @@ class FixedAllocator : public ObIAllocator {
|
||||
UNUSED(ptr);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
char* buf_;
|
||||
int64_t limit_;
|
||||
int64_t pos_;
|
||||
|
@ -37,7 +37,7 @@ using namespace rpc::frame;
|
||||
using namespace compaction;
|
||||
namespace memtable {
|
||||
class TestMemtableMultiVersionRowIterator : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
static const int64_t TEST_ROWKEY_COLUMN_CNT = 2;
|
||||
static const int64_t TEST_COLUMN_CNT = ObExtendType;
|
||||
TestMemtableMultiVersionRowIterator();
|
||||
@ -48,10 +48,10 @@ class TestMemtableMultiVersionRowIterator : public ::testing::Test {
|
||||
void init();
|
||||
void init_table_param(const ObTableSchema& schema, const ObColDescIArray& cols);
|
||||
|
||||
private:
|
||||
private:
|
||||
bool is_inited_;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
ObTableIterParam table_param_;
|
||||
ObTableAccessContext table_access_context_;
|
||||
ObArenaAllocator allocator_;
|
||||
|
@ -32,13 +32,13 @@ struct ObMtCtxMembers {
|
||||
};
|
||||
|
||||
class ObMtCtx : public ObIMemtableCtx, public ObMtCtxMembers {
|
||||
public:
|
||||
public:
|
||||
ObMtCtx()
|
||||
{}
|
||||
~ObMtCtx()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
void fill_trace_log(const char* fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
@ -74,7 +74,7 @@ class ObMtCtx : public ObIMemtableCtx, public ObMtCtxMembers {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
int trans_begin()
|
||||
{
|
||||
return OB_SUCCESS;
|
||||
|
@ -26,7 +26,7 @@ using namespace oceanbase::memtable;
|
||||
using namespace oceanbase::storage;
|
||||
|
||||
class ObMtRowIterator : public ObStoreRowIterator {
|
||||
public:
|
||||
public:
|
||||
ObMtRowIterator() : cursor_(0)
|
||||
{}
|
||||
~ObMtRowIterator()
|
||||
@ -55,7 +55,7 @@ class ObMtRowIterator : public ObStoreRowIterator {
|
||||
rows_.push_back(row);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
int64_t cursor_;
|
||||
ObSEArray<ObStoreRow, 64> rows_;
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ namespace unittest {
|
||||
using namespace oceanbase::common;
|
||||
|
||||
class ObModAllocator : public DefaultPageAllocator {
|
||||
public:
|
||||
public:
|
||||
void* mod_alloc(const int64_t size, const char* label)
|
||||
{
|
||||
set_label(label);
|
||||
|
@ -25,7 +25,7 @@ namespace unittest {
|
||||
using namespace oceanbase::common;
|
||||
|
||||
class ObStoreRowkeyWrapper {
|
||||
public:
|
||||
public:
|
||||
template <class... Args>
|
||||
ObStoreRowkeyWrapper(const Args&... args) : obj_cnt_(0)
|
||||
{
|
||||
@ -38,7 +38,7 @@ class ObStoreRowkeyWrapper {
|
||||
~ObStoreRowkeyWrapper()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
CharArena& get_allocator()
|
||||
{
|
||||
return allocator_;
|
||||
@ -68,7 +68,7 @@ class ObStoreRowkeyWrapper {
|
||||
return rowkey_ = ObStoreRowkey(objs_, obj_cnt_);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
template <class T, class... Args>
|
||||
void fill(const T& head, const Args&... args)
|
||||
{
|
||||
@ -79,7 +79,7 @@ class ObStoreRowkeyWrapper {
|
||||
{ /*for recursion exit*/
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
CharArena allocator_;
|
||||
mutable ObObj objs_[OB_MAX_ROWKEY_COLUMN_NUMBER];
|
||||
int64_t obj_cnt_;
|
||||
@ -87,7 +87,7 @@ class ObStoreRowkeyWrapper {
|
||||
};
|
||||
|
||||
class ObColumnDesc {
|
||||
public:
|
||||
public:
|
||||
template <class... Args>
|
||||
ObColumnDesc(const Args&... args)
|
||||
{
|
||||
@ -98,7 +98,7 @@ class ObColumnDesc {
|
||||
return columns_;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
template <class... Args>
|
||||
void fill(const uint64_t col_id, const ObObjType col_type, const ObCollationType col_collation, const Args&... args)
|
||||
{
|
||||
@ -113,7 +113,7 @@ class ObColumnDesc {
|
||||
{ /*for recursion exit*/
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObSEArray<share::schema::ObColDesc, 64> columns_;
|
||||
};
|
||||
|
||||
@ -121,33 +121,33 @@ class ObColumnDesc {
|
||||
|
||||
#define DEFINE_TYPE_OBJ(classname, ctype, obtype) \
|
||||
class classname { \
|
||||
public: \
|
||||
public: \
|
||||
classname(const ctype v) : v_(v) \
|
||||
{} \
|
||||
~classname() \
|
||||
{} \
|
||||
\
|
||||
public: \
|
||||
public: \
|
||||
void build(ObStoreRowkeyWrapper& rowkey_wrapper) const \
|
||||
{ \
|
||||
rowkey_wrapper.get_cur_obj().set_##obtype(v_); \
|
||||
rowkey_wrapper.add_obj(); \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
private: \
|
||||
const ctype v_; \
|
||||
};
|
||||
|
||||
#define DEFINE_CHARTYPE_OBJ(classname, obtype, cltype) \
|
||||
class classname { \
|
||||
public: \
|
||||
public: \
|
||||
classname(const char* str, const int64_t len, const ObCollationType cltype = CS_TYPE_UTF8MB4_BIN) \
|
||||
: str_(str), len_(len), cltype_(cltype) \
|
||||
{} \
|
||||
~classname() \
|
||||
{} \
|
||||
\
|
||||
public: \
|
||||
public: \
|
||||
void build(ObStoreRowkeyWrapper& rowkey_wrapper) const \
|
||||
{ \
|
||||
ObString obstr; \
|
||||
@ -157,7 +157,7 @@ class ObColumnDesc {
|
||||
rowkey_wrapper.add_obj(); \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
private: \
|
||||
const char* str_; \
|
||||
const int64_t len_; \
|
||||
const ObCollationType cltype_; \
|
||||
@ -165,13 +165,13 @@ class ObColumnDesc {
|
||||
|
||||
#define DEFINE_NMBTYPE_OBJ(classname, obtype) \
|
||||
class classname { \
|
||||
public: \
|
||||
public: \
|
||||
classname(const char* str) : str_(str) \
|
||||
{} \
|
||||
~classname() \
|
||||
{} \
|
||||
\
|
||||
public: \
|
||||
public: \
|
||||
void build(ObStoreRowkeyWrapper& rowkey_wrapper) const \
|
||||
{ \
|
||||
number::ObNumber obnmb; \
|
||||
@ -180,18 +180,18 @@ class ObColumnDesc {
|
||||
rowkey_wrapper.add_obj(); \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
private: \
|
||||
const char* str_; \
|
||||
};
|
||||
|
||||
class U {
|
||||
public:
|
||||
public:
|
||||
U()
|
||||
{}
|
||||
~U()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
void build(ObStoreRowkeyWrapper& rowkey_wrapper) const
|
||||
{
|
||||
rowkey_wrapper.get_cur_obj().set_null();
|
||||
@ -200,13 +200,13 @@ class U {
|
||||
};
|
||||
|
||||
class OBMIN {
|
||||
public:
|
||||
public:
|
||||
OBMIN()
|
||||
{}
|
||||
~OBMIN()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
void build(ObStoreRowkeyWrapper& rowkey_wrapper) const
|
||||
{
|
||||
rowkey_wrapper.get_cur_obj().set_ext(ObObj::MIN_OBJECT_VALUE);
|
||||
@ -215,13 +215,13 @@ class OBMIN {
|
||||
};
|
||||
|
||||
class OBMAX {
|
||||
public:
|
||||
public:
|
||||
OBMAX()
|
||||
{}
|
||||
~OBMAX()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
void build(ObStoreRowkeyWrapper& rowkey_wrapper) const
|
||||
{
|
||||
rowkey_wrapper.get_cur_obj().set_ext(ObObj::MAX_OBJECT_VALUE);
|
||||
|
Reference in New Issue
Block a user