提交 8fbd3f49 编写于 作者: H Hongze Cheng

refact

上级 36d3adc2
...@@ -16,12 +16,16 @@ ...@@ -16,12 +16,16 @@
#ifndef _TD_META_CACHE_H_ #ifndef _TD_META_CACHE_H_
#define _TD_META_CACHE_H_ #define _TD_META_CACHE_H_
#include "rocksdb/c.h"
#include "meta.h" #include "meta.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef rocksdb_cache_t meta_cache_t;
int metaOpenCache(SMeta *pMeta); int metaOpenCache(SMeta *pMeta);
void metaCloseCache(SMeta *pMeta); void metaCloseCache(SMeta *pMeta);
......
...@@ -16,12 +16,16 @@ ...@@ -16,12 +16,16 @@
#ifndef _TD_META_DB_H_ #ifndef _TD_META_DB_H_
#define _TD_META_DB_H_ #define _TD_META_DB_H_
#include "rocksdb/c.h"
#include "meta.h" #include "meta.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef rocksdb_t meta_db_t;
int metaOpenDB(SMeta *pMeta); int metaOpenDB(SMeta *pMeta);
void metaCloseDB(SMeta *pMeta); void metaCloseDB(SMeta *pMeta);
......
...@@ -16,8 +16,9 @@ ...@@ -16,8 +16,9 @@
#ifndef _TD_META_DEF_H_ #ifndef _TD_META_DEF_H_
#define _TD_META_DEF_H_ #define _TD_META_DEF_H_
#include "rocksdb/c.h" #include "metaCache.h"
#include "metaDB.h"
#include "metaIdx.h"
#include "metaTbUid.h" #include "metaTbUid.h"
#ifdef __cplusplus #ifdef __cplusplus
...@@ -25,12 +26,12 @@ extern "C" { ...@@ -25,12 +26,12 @@ extern "C" {
#endif #endif
struct SMeta { struct SMeta {
char * path; // path of current meta char* path; // path of current meta
SMetaOptions options; // meta option SMetaOptions options; // meta option
rocksdb_t * pDB; meta_db_t* pDB; // raw data db
rocksdb_t * pIdx; meta_index_t* pIdx; // tag index
rocksdb_cache_t *pCache; meta_cache_t* pCache; // LRU cache
STbUidGenerator uidGnrt; // meta table UID generator STbUidGenerator uidGnrt; // meta table UID generator
}; };
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -16,12 +16,16 @@ ...@@ -16,12 +16,16 @@
#ifndef _TD_META_IDX_H_ #ifndef _TD_META_IDX_H_
#define _TD_META_IDX_H_ #define _TD_META_IDX_H_
#include "rocksdb/c.h"
#include "meta.h" #include "meta.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
typedef rocksdb_t meta_index_t;
int metaOpenIdx(SMeta *pMeta); int metaOpenIdx(SMeta *pMeta);
void metaCloseIdx(SMeta *pMeta); void metaCloseIdx(SMeta *pMeta);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册